Skip to content

Commit

Permalink
Add QEMU action
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Oct 23, 2024
1 parent 8bad0f2 commit 7b77fa6
Showing 1 changed file with 69 additions and 61 deletions.
130 changes: 69 additions & 61 deletions .github/workflows/build_ft_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,61 @@ on:
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: '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
# 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: '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 $JAVA_HOME
# 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

bdist-wheels-linux-aarch64:
runs-on: ${{ matrix.info.machine }}
Expand All @@ -73,18 +74,25 @@ jobs:
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
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# - 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

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_FREE_THREADED_SUPPORT: true
CIBW_ARCHS_LINUX: "aarch64"
CIBW_BUILD: "cp313t-*"
CIBW_BEFORE_ALL_LINUX: yum install -y java-11-openjdk-devel
CIBW_ENVIRONMENT: JAVA_HOME=/etc/alternatives/jre
with:
package-dir: .
output-dir: dist
Expand Down

0 comments on commit 7b77fa6

Please sign in to comment.