Skip to content

Commit

Permalink
bugfix in ci yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton committed Aug 17, 2023
1 parent 40b6565 commit 3ac1abe
Showing 1 changed file with 43 additions and 19 deletions.
62 changes: 43 additions & 19 deletions .github/workflows/build_python_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,44 +10,68 @@ on:

jobs:
build_wheels: # credit to https://github.com/samuelcolvin/rtoml/blob/main/.github/workflows/ci.yml
name: >
build ${{ matrix.python-version }} on ${{ matrix.platform || matrix.os }}
(${{ matrix.alt_arch_name || matrix.arch }})
runs-on: ${{ matrix.os }}
name: build ${{ matrix.python-version }} on ${{ matrix.os }} (${{ matrix.target }})

runs-on: ${{ matrix.os }}-latest

strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python-version: ['cp310', 'pp38', 'pp39', 'pp310']
arch: [main, alt]
target: [x86_64, aarch64]
python-version: ['cp310', 'pp39', 'pp310', 'pp311']
manylinux: [auto]
include:
- os: ubuntu
platform: linux
- os: windows
ls: dir
- os: windows
ls: dir
target: i686
python-architecture: x86
- os: macos
arch: alt
alt_arch_name: 'arm64 universal2'
target: aarch64
- os: ubuntu
target: i686
# GCC 4.8.5 in manylinux2014 container doesn't support c11 atomic
# we use manylinux_2_24 container for aarch64 and armv7 targets instead,
- os: ubuntu
target: aarch64
container: messense/manylinux_2_24-cross:aarch64
- os: ubuntu
target: armv7
container: messense/manylinux_2_24-cross:armv7
- os: ubuntu
target: ppc64le
container: messense/manylinux_2_24-cross:ppc64le
- os: ubuntu
target: s390x
container: messense/manylinux_2_24-cross:s390x
# musllinux
- os: ubuntu
target: x86_64
manylinux: musllinux_1_1
- os: ubuntu
target: aarch64
manylinux: musllinux_1_1
exclude:
# this fails
- os: windows
target: aarch64

runs-on: ${{ format('{0}-latest', matrix.os) }}
steps:
- uses: actions/checkout@v3

- name: set up python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
architecture: ${{ matrix.python-architecture || 'x64' }}

- name: set up rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: set up Rust cache
uses: swatinem/rust-cache@v2
with:
key: ${{ matrix.alt_arch_name }}

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
Expand All @@ -63,9 +87,9 @@ jobs:

- name: install python dependencies
run: pip install -U setuptools wheel twine cibuildwheel platformdirs

- name: build sdist
if: matrix.os == 'ubuntu' && matrix.python-version == 'cp310'
if: ${{ matrix.os == 'ubuntu' && matrix.target == 'x86_64' && matrix.manylinux == 'auto' }}
run: |
python -m build --sdist -o wheelhouse crates/hyperdrive-math-py/
Expand Down

0 comments on commit 3ac1abe

Please sign in to comment.