Skip to content

Commit

Permalink
Add free-threaded build in GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Oct 21, 2024
1 parent e93774a commit 425724b
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ jobs:
distribution: 'temurin'
java-version: '8'

- run: pip install setuptools
- run: ${{ matrix.info.cmd }}

- uses: actions/upload-artifact@v4
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/build_ft_wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build Free-Threaded JPY distributions

on:
pull_request:
branches: [ 'master', 'release/v*' ]
push:
branches: [ 'master', 'release/v*' ]

jobs:
bdist-wheels:
runs-on: ${{ matrix.info.machine }}
strategy:
fail-fast: false
matrix:
info:
- { machine: 'ubuntu-20.04', python: '3.13t', arch: 'amd64', cmd: '.github/env/Linux/bdist-wheel.sh' }
# - { machine: 'ubuntu-20.04', python: '3.13', arch: 'arm64', cmd: '.github/env/Linux/bdist-wheel.sh' }
# - { machine: 'windows-2022', python: '3.13', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' }
- { machine: 'macos-13', python: '3.13t', arch: 'amd64', cmd: '.github/env/macOS/bdist-wheel.sh' }
- { machine: 'macos-latest', python: '3.13t', arch: 'arm64', cmd: '.github/env/macOS/bdist-wheel.sh' }


steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v3
- run: |
uv python install 3.13t
uv venv --python 3.13t
source .venv/bin/activate
uv pip install pip
echo PATH=$PATH >> $GITHUB_ENV
- run: ${{ matrix.info.cmd }}

- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.info.python }}-${{ matrix.info.machine }}-${{ matrix.info.arch }}
path: dist/*.whl
retention-days: 1

bdist-wheels-windows:
runs-on: ${{ matrix.info.machine }}
strategy:
fail-fast: false
matrix:
info:
- { machine: 'windows-2022', python: '3.13t', arch: 'amd64', cmd: '.\.github\env\Windows\bdist-wheel.ps1' }

steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v3
- run: |
uv python install 3.13t
uv venv --python 3.13t
.venv\Scripts\Activate.ps1
uv pip install pip
echo PATH=%PATH% >> $GITHUB_ENV
${{ matrix.info.cmd }}
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.info.python }}-${{ matrix.info.machine }}-${{ matrix.info.arch }}
path: dist/*.whl
retention-days: 1
6 changes: 6 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ jobs:

- name: Run Test
run: python setup.py test

test-free-threaded:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

0 comments on commit 425724b

Please sign in to comment.