Skip to content

Commit

Permalink
updated maturin version and ccargo build to build yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tbar4 committed Nov 27, 2024
1 parent 534f9f9 commit b29af3c
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,30 +221,24 @@ jobs:
path: .

- run: cat LICENSE.txt

- name: Install Protobug Compiler (Setup protoc not working)
run: sudo apt-get install protobuf-compiler


- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "27.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo Build
run: cd python && cargo build
- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install maturin
run: pip install maturin==1.5.1
- name: Cargo Build
run: cd python && cargo build

- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUST_BACKTRACE: 1
with:
rust-toolchain: nightly
target: aarch64
# Use manylinux_2_28-cross because the manylinux2014-cross has GCC 4.8.5, which causes the build to fail
manylinux: 2_28
rustup-components: rust-std rustfmt # Keep them in one line due to https://github.com/PyO3/maturin-action/issues/153
working-directory: python
args: --release
- name: Build Python package
run: cd python && maturin build --release --strip
- name: Archive wheels
uses: actions/upload-artifact@v4
with:
Expand All @@ -265,26 +259,17 @@ jobs:
path: .

- run: cat LICENSE.txt

- name: Install Protobug Compiler (Setup protoc not working)
run: sudo apt-get install protobuf-compiler


- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "27.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cargo Build
run: cd python && cargo build
- name: Build Python package
run: cd python && maturin build --release --sdist --out dist --strip

- name: Build sdist
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
manylinux: auto
rustup-components: rust-std rustfmt
working-directory: python
args: --release --sdist --out dist
- name: Assert sdist build does not generate wheels
run: |
if [ "$(ls -A target/wheels)" ]; then
Expand Down

0 comments on commit b29af3c

Please sign in to comment.