Skip to content

Commit

Permalink
fix(ci): build Python module using specific Rust version (not nightly)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelspark committed Mar 5, 2023
1 parent dd88065 commit b7e13e5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/create-py-mac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
tags:
- "v*" # Push events to matching wonnx-py-v*

env:
RUST_BACKTRACE: 1
RUST_VERSION: 1.66

jobs:
build:
name: Create Release
Expand All @@ -16,12 +20,12 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Install latest Rust nightly
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-01-01
toolchain: ${{ env.RUST_VERSION }}
profile: minimal
override: true
components: rustfmt, clippy
- name: Setup universal2 targets for Rust
run: |
rustup target add aarch64-apple-darwin
Expand All @@ -33,7 +37,6 @@ jobs:
shell: bash
run: |
cd wonnx-py
rustup override set nightly-2022-01-01
- name: maturin publish
uses: messense/maturin-action@v1
env:
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/create-py-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching wonnx-py-v*

env:
RUST_BACKTRACE: 1
RUST_VERSION: 1.66

jobs:
build:
name: Create Release
Expand All @@ -15,12 +20,12 @@ jobs:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Install latest Rust nightly
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-01-01
toolchain: ${{ env.RUST_VERSION }}
profile: minimal
override: true
components: rustfmt, clippy
- name: Set up Python
uses: actions/setup-python@v2
with:
Expand All @@ -35,8 +40,6 @@ jobs:
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
run: |
cd wonnx-py
rustup override set nightly-2022-01-01
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3'
maturin publish \
--no-sdist \
--skip-existing \
Expand Down

0 comments on commit b7e13e5

Please sign in to comment.