-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: macos deployment target and maturin updates (#2879)
- macOS fixes from conda-forge/sourmash-minimal-feedstock#55 - bump maturin to 1.4.0 - use maturin-action for linux `aarch64` and `ppc64le` (`s390x` is still annoying to get right) and windows (turns out it just works)
- Loading branch information
Showing
2 changed files
with
45 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,77 @@ | ||
name: cibuildwheel_ubuntu | ||
name: maturin wheels | ||
|
||
on: | ||
#pull_request: # use for testing modifications to this action | ||
pull_request: # use for testing modifications to this action | ||
push: | ||
branches: [latest] | ||
tags: v* | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 0 * * *" # daily | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build_wheels: | ||
name: Build wheels for ${{ matrix.os }}-${{ matrix.arch }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
build: [ | ||
linux-aarch64, | ||
#linux-ppc64le, | ||
#linux-s390x, | ||
] | ||
include: | ||
- build: linux-aarch64 | ||
os: ubuntu-20.04 | ||
arch: aarch64 | ||
macos_target: '' | ||
fail-fast: false | ||
|
||
target: [aarch64, ppc64le] | ||
#target: [aarch64, s390x, ppc64le] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: '3.10' | ||
|
||
# Added due to weird error when building inside docker container | ||
# for other platforms... | ||
# https://github.com/JonasAlfredsson/docker-nginx-certbot/issues/30 | ||
- name: Set Swap Space | ||
if: runner.os == 'Linux' | ||
uses: pierotofy/[email protected] | ||
- name: Build wheels | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
swap-size-gb: 10 | ||
- run: | | ||
# Workaround for https://github.com/rust-lang/cargo/issues/8719 | ||
sudo mkdir -p /var/lib/docker | ||
sudo mount -t tmpfs -o size=10G none /var/lib/docker | ||
sudo systemctl restart docker | ||
if: runner.os == 'Linux' | ||
target: ${{ matrix.target }} | ||
args: --release --out dist --find-interpreter --zig --strip | ||
sccache: 'true' | ||
manylinux: auto | ||
container: 'off' | ||
|
||
- name: Set up QEMU | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
platforms: all | ||
name: wheels | ||
path: dist | ||
|
||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
architecture: ${{ matrix.target }} | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_ENVIRONMENT_MACOS: ${{ matrix.macos_target }} | ||
CIBW_ARCHS_LINUX: ${{ matrix.arch }} | ||
CIBW_ARCHS_MACOS: ${{ matrix.arch }} | ||
CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
uses: PyO3/maturin-action@v1 | ||
with: | ||
target: x64 | ||
args: --release --out dist --find-interpreter | ||
sccache: 'true' | ||
|
||
- uses: actions/upload-artifact@v3 | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: './wheelhouse/sourmash*.whl' | ||
name: wheels | ||
path: dist | ||
|
||
release: | ||
name: Publish wheels | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: build_wheels | ||
needs: [linux, windows] | ||
|
||
steps: | ||
- name: Fetch wheels from artifacts | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters