Skip to content

Commit

Permalink
allow choosing python version
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Oct 10, 2024
1 parent 4d200c1 commit 0127737
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ on:
description: 'Use massif for testing memory usage'
required: false
default: false
python-tag:
type: boolean
required: false
default: false

jobs:
build-manylinux-wheel:
uses: ./.github/workflows/build-wheels.yml
with:
python-tags: '["cp38"]'
python-tags: '["${{ inputs.python-tag }}"]'
platform-tag: manylinux_x86_64
sha-to-build-and-test: ${{ github.sha }}
secrets: inherit
Expand All @@ -38,14 +42,31 @@ jobs:
submodules: recursive
fetch-depth: 0

# TODO: create helper func
- name: Convert Python tag to Python version
# Don't use sed because we want this command to work on both mac and windows
# The command used in GNU sed is different than in macOS sed
run: |
PYTHON_TAG=${{ inputs.python-tag }}
if [[ $PYTHON_TAG == pp* ]]; then
PREFIX_TO_REPLACE=pp
NEW_PREFIX=pypy
else
PREFIX_TO_REPLACE=cp
NEW_PREFIX=""
fi
PYTHON_VERSION="${PYTHON_TAG/$PREFIX_TO_REPLACE/$NEW_PREFIX}"
echo PYTHON_VERSION="${PYTHON_VERSION/3/3.}" >> $GITHUB_ENV
shell: bash

- uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: ${{ env.PYTHON_VERSION }}
architecture: 'x64'

- uses: actions/download-artifact@v4
with:
name: cp38-manylinux_x86_64.build
name: ${{ inputs.python-tag }}-manylinux_x86_64.build

- name: Install client
run: pip install ./*.whl
Expand Down

0 comments on commit 0127737

Please sign in to comment.