Skip to content

Commit

Permalink
Merge pull request #33 from deedy5/dev
Browse files Browse the repository at this point in the history
1) CI: [macos]: rust-toolchain: nightly
2) CI: remove zig
3) CI: [linux, musl] - don't use containers
P.S. 
`linux  x86_64` - manylinux_2_28 (debian>=10, ubuntu >= 20.04)
`linux aarch64` - manylinux_2_34 (debian>=12, ubuntu >= 22.04)
  • Loading branch information
deedy5 authored Aug 12, 2024
2 parents 73742d3 + 8590eb1 commit c3639a1
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 188 deletions.
36 changes: 31 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This file is autogenerated by maturin v1.7.0
# To update, run
#
# maturin generate-ci github -o .github/workflows/CI.yml --pytest --zig
# maturin generate-ci github -o .github/workflows/CI.yml --pytest
#
name: CI

Expand All @@ -25,24 +25,33 @@ jobs:
fail-fast: false
matrix:
platform:
- runner: ubuntu-latest
- runner: ubuntu-20.04
target: x86_64
- runner: ubuntu-latest
- runner: ubuntu-22.04
target: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install aarch64 build dependencies
if: ${{ startsWith(matrix.platform.target, 'aarch64') }}
run: sudo apt-get update && sudo apt-get install --yes crossbuild-essential-arm64
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: --release --out dist --zig
args: --release --out dist
sccache: 'true'
manylinux: auto
container: 'off'
env:
CFLAGS_aarch64_unknown_linux_gnu: "-D__ARM_ARCH=8"
CC: ${{ matrix.platform.target }}-linux-gnu-gcc
CXX: ${{ matrix.platform.target }}-linux-gnu-g++
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER: x86_64-linux-gnu-g++
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-g++
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -97,13 +106,28 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install aarch64 build dependencies
if: ${{ startsWith(matrix.platform.target, 'aarch64') }}
run: sudo apt-get update && sudo apt-get install --yes crossbuild-essential-arm64
- name: Prepare musl cross-compiler
run: |
curl -O http://musl.cc/${{ matrix.platform.target }}-linux-musl-cross.tgz
tar xzf ${{ matrix.platform.target }}-linux-musl-cross.tgz -C /opt
echo "/opt/${{ matrix.platform.target }}-linux-musl-cross/bin/" >> $GITHUB_PATH
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: --release --out dist --zig
args: --release --out dist
sccache: 'true'
manylinux: musllinux_1_2
container: 'off'
env:
CC: ${{ matrix.platform.target }}-linux-musl-gcc
CXX: ${{ matrix.platform.target }}-linux-musl-g++
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: x86_64-linux-musl-g++
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER: aarch64-linux-musl-g++
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -145,6 +169,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
Expand Down Expand Up @@ -185,6 +210,7 @@ jobs:
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: nightly
target: ${{ matrix.platform.target }}
args: --release --out dist
sccache: 'true'
Expand Down
Loading

0 comments on commit c3639a1

Please sign in to comment.