From 4d200c1447bfd92b2e163c0c37981d07cbd3c7be Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:13:34 -0700 Subject: [PATCH 1/4] build pp310 --- .github/workflows/build-wheels.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index be0f8f342..11a6eb212 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -27,7 +27,7 @@ on: type: string description: Valid JSON list of Python tags to build the client for required: false - default: '["cp38", "cp39", "cp310", "cp311", "cp312"]' + default: '["cp38", "cp39", "cp310", "cp311", "cp312", "pp310"]' platform-tag: description: Platform to build the client for. type: choice @@ -76,7 +76,7 @@ on: python-tags: type: string required: false - default: '["cp38", "cp39", "cp310", "cp311", "cp312"]' + default: '["cp38", "cp39", "cp310", "cp311", "cp312", "pp310"]' platform-tag: type: string required: true @@ -316,7 +316,14 @@ jobs: # The command used in GNU sed is different than in macOS sed run: | PYTHON_TAG=${{ matrix.python-tag }} - PYTHON_VERSION="${PYTHON_TAG/cp/}" + 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 From 01277373b3fec860963bb5c94c64b03bea33e842 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:21:58 -0700 Subject: [PATCH 2/4] allow choosing python version --- .github/workflows/valgrind.yml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index 15de27cee..a3b3d7b05 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -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 @@ -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 From d0495420fa63ef9b1c42ce6599a6511639ed9bd8 Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:23:11 -0700 Subject: [PATCH 3/4] fix --- .github/workflows/valgrind.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index a3b3d7b05..81a80ce48 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -18,9 +18,9 @@ on: required: false default: false python-tag: - type: boolean + type: string required: false - default: false + default: cp38 jobs: build-manylinux-wheel: From c5109fdaccb901fa8dbe8c84463e6a21054dddaa Mon Sep 17 00:00:00 2001 From: Julian Nguyen <109386615+juliannguyen4@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:26:31 -0700 Subject: [PATCH 4/4] update --- .github/workflows/valgrind.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index 81a80ce48..64ce366e7 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -59,7 +59,7 @@ jobs: echo PYTHON_VERSION="${PYTHON_VERSION/3/3.}" >> $GITHUB_ENV shell: bash - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON_VERSION }} architecture: 'x64'