-
-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1233: Replace unmaintained `actions-rs` with `dtolnay/rust-toolchain` r=messense a=messense Co-authored-by: messense <[email protected]>
- Loading branch information
Showing
3 changed files
with
40 additions
and
88 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
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
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 |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
python-version: ${{ steps.generate-matrix.outputs.python-version }} | ||
fail-fast: ${{ steps.generate-matrix.outputs.fail-fast }} | ||
steps: | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- run: npm install js-yaml | ||
|
@@ -113,13 +113,10 @@ jobs: | |
run: pip install cffi | ||
- name: Install python packages | ||
run: pip install virtualenv ziglang~=0.9.0 twine | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
id: rustup | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
target: wasm32-wasi # Additional target | ||
targets: wasm32-wasi # Additional target | ||
- name: Install cargo-nextest | ||
uses: taiki-e/install-action@nextest | ||
- name: Install aarch64-apple-darwin Rust target | ||
|
@@ -148,14 +145,14 @@ jobs: | |
brew install gnu-tar | ||
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH | ||
- name: Cache cargo build | ||
uses: Swatinem/rust-cache@v1 | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: maturin-${{ runner.os }} | ||
- name: Cache test crates cargo build | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: test-crates/targets | ||
key: test-crates-${{ runner.os }}-${{ steps.rustup.outputs.rustc_hash }}-${{ matrix.python-version }}-${{ hashFiles('test-crates/*/Cargo.lock') }} | ||
key: test-crates-${{ runner.os }}-${{ steps.rustup.outputs.cachekey }}-${{ matrix.python-version }}-${{ hashFiles('test-crates/*/Cargo.lock') }} | ||
- name: Set MATURIN_TEST_PYTHON for PyPy | ||
shell: bash | ||
if: contains(matrix.python-version, 'pypy') | ||
|
@@ -233,14 +230,11 @@ jobs: | |
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
profile: minimal | ||
toolchain: nightly | ||
components: rust-src | ||
target: wasm32-unknown-emscripten | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
targets: wasm32-unknown-emscripten | ||
- uses: Swatinem/rust-cache@v2 | ||
- run: pip install nox | ||
- name: Setup Pyodide | ||
run: nox -s setup-pyodide | ||
|
@@ -269,11 +263,11 @@ jobs: | |
apk add cargo python3-dev libffi-dev py3-pip curl bash tar zstd | ||
pip3 install cffi virtualenv | ||
- name: Cache cargo build | ||
uses: Swatinem/rust-cache@v1 | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: maturin-${{ runner.os }}-alpine | ||
- name: Cache test crates cargo build | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: test-crates/targets | ||
key: test-crates-${{ runner.os }}-alpine-${{ hashFiles('test-crates/*/Cargo.lock') }} | ||
|
@@ -298,22 +292,18 @@ jobs: | |
container: quay.io/pypa/${{ matrix.manylinux }}_x86_64 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
id: rustup | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
# Caching | ||
- name: Cache cargo build | ||
uses: Swatinem/rust-cache@v1 | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: maturin-${{ runner.os }} | ||
- name: Cache test crates cargo build | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: test-crates/*/target | ||
key: auditwheel-test-crates-${{ runner.os }}-${{ steps.rustup.outputs.rustc_hash }}-${{ hashFiles('test-crates/*/Cargo.lock') }} | ||
key: auditwheel-test-crates-${{ runner.os }}-${{ steps.rustup.outputs.cachekey }}-${{ hashFiles('test-crates/*/Cargo.lock') }} | ||
- name: Compliant Build | ||
run: tests/manylinux_compliant.sh ${{ matrix.manylinux }} | ||
- name: Incompliant Build | ||
|
@@ -340,7 +330,7 @@ jobs: | |
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
- name: Cache test crates cargo build | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: test-crates/*/target | ||
# Dockerfile contains the rustc version | ||
|
@@ -383,13 +373,9 @@ jobs: | |
container: ghcr.io/messense/manylinux2014-cross:aarch64 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
id: rustup | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
target: ${{ matrix.platform.target }} | ||
targets: ${{ matrix.platform.target }} | ||
- name: Build wheels | ||
run: | | ||
set -ex | ||
|
@@ -423,16 +409,12 @@ jobs: | |
- 'setup.py' | ||
- 'MANIFEST.in' | ||
- '.github/workflows/test.yml' | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
if: steps.changes.outputs.changed == 'true' | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
# Caching | ||
- name: Cache cargo build | ||
if: steps.changes.outputs.changed == 'true' | ||
uses: Swatinem/rust-cache@v1 | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: maturin-${{ runner.os }}-bootstrap | ||
- uses: actions/setup-python@v4 | ||
|
@@ -463,14 +445,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: '1.61.0' | ||
override: true | ||
- uses: dtolnay/[email protected] | ||
# Caching | ||
- name: Cache cargo build | ||
uses: Swatinem/rust-cache@v1 | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: maturin-${{ runner.os }}-msrv | ||
- name: cargo build | ||
|
@@ -491,14 +469,11 @@ jobs: | |
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y ${{ matrix.platform.apt-packages }} | ||
- uses: actions-rs/toolchain@v1 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
target: ${{ matrix.platform.target }} | ||
override: true | ||
targets: ${{ matrix.platform.target }} | ||
- name: Cache cargo build | ||
uses: Swatinem/rust-cache@v1 | ||
uses: Swatinem/rust-cache@v2 | ||
- name: cargo check | ||
run: cargo check --target ${{ matrix.platform.target }} | ||
|
||
|