Skip to content

Commit

Permalink
CI/CD fix to add linux builds (#3)
Browse files Browse the repository at this point in the history
* [Temp] Simplify CI/CD, undo before merging

* Remove (probably?) unneeded flag

* Update and re-add linux to the build process

* [Temp] Simplify CI/CD for testing

* Revert "[Temp] Simplify CI/CD for testing"

This reverts commit d931b04.

* Revert "[Temp] Simplify CI/CD, undo before merging"

This reverts commit 83bad73.

* Add linux builds to the release process

* Added more linux architectures to build process
  • Loading branch information
scnerd authored Jan 17, 2025
1 parent 61e66a1 commit 742022e
Showing 1 changed file with 40 additions and 36 deletions.
76 changes: 40 additions & 36 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,48 +45,52 @@ jobs:
- name: Run tests
run: uv run pytest tests

# linux:
# runs-on: ${{ matrix.platform.runner }}
# needs: [test]
# strategy:
# matrix:
# platform:
# - runner: ubuntu-latest
# target: x86_64
# - runner: ubuntu-latest
# target: x86
# - runner: ubuntu-latest
# target: aarch64
# - runner: ubuntu-latest
# target: armv7
linux:
runs-on: ${{ matrix.platform.runner }}
needs: [test]
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
- runner: ubuntu-latest
target: aarch64
- runner: ubuntu-latest
target: armv7
# - runner: ubuntu-latest
# target: s390x
# - runner: ubuntu-latest
# target: ppc64le
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - run: pip install -e .[test]
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# manylinux: auto
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-linux-${{ matrix.platform.target }}
# path: dist
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Set up Python
run: uv python install

- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.platform.target }}
path: dist

musllinux:
runs-on: ${{ matrix.platform.runner }}
needs: [test]
env:
RUSTFLAGS: "-Ctarget-feature=-crt-static"
strategy:
matrix:
platform:
Expand Down Expand Up @@ -116,6 +120,7 @@ jobs:
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: musllinux_1_2

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -215,8 +220,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
# needs: [linux, musllinux, windows, macos, sdist]
needs: [musllinux, windows, macos, sdist]
needs: [linux, musllinux, windows, macos, sdist]
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
Expand Down

0 comments on commit 742022e

Please sign in to comment.