From e6f84be167eac90e31d645563d1a3d09886cbd7f Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 2 Nov 2022 09:39:34 +0800 Subject: [PATCH 1/4] CI: switch from `actions-rs/toolchain` to `dtolnay/rust-toolchain` --- .github/workflows/ci.yml | 47 ++++++++++------------------------ .github/workflows/gh-pages.yml | 17 +++--------- 2 files changed, 16 insertions(+), 48 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ea3043c..1d42679f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,10 +21,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - run: pip install nox - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal components: rustfmt - name: Check python formatting (black) run: nox -s fmt-py @@ -37,10 +35,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - run: pip install nox - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - profile: minimal components: clippy - run: nox -s clippy @@ -56,13 +52,9 @@ jobs: steps: - uses: actions/checkout@v3 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - target: ${{ matrix.target }} - profile: minimal - default: true - + targets: ${{ matrix.target }} - name: Run cargo checks run: | set -x @@ -158,12 +150,10 @@ jobs: architecture: ${{ matrix.platform.python-architecture }} - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - target: ${{ matrix.platform.rust-target }} - profile: minimal - default: true + targets: ${{ matrix.platform.rust-target }} # needed to correctly format errors, see #1865 components: rust-src @@ -330,13 +320,9 @@ jobs: with: key: cargo-valgrind continue-on-error: true - - uses: actions-rs/toolchain@v1 - with: - # FIXME(adamreichold): Switch to stable when Valgrind understands DWARF5 as generated by LLVM 14, - # c.f. https://bugs.kde.org/show_bug.cgi?id=452758#c35 - toolchain: 1.61.0 - override: true - profile: minimal + # FIXME(adamreichold): Switch to stable when Valgrind understands DWARF5 as generated by LLVM 14, + # c.f. https://bugs.kde.org/show_bug.cgi?id=452758#c35 + - uses: dtolnay/rust-toolchain@1.61.0 - uses: taiki-e/install-action@valgrind - run: python -m pip install -U pip nox - run: nox -s test-rust -- release skip-full @@ -357,11 +343,8 @@ jobs: with: key: cargo-careful continue-on-error: true - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@nightly with: - toolchain: nightly - override: true - profile: minimal components: rust-src - run: cargo install cargo-careful - run: python -m pip install -U pip nox @@ -386,11 +369,8 @@ jobs: with: key: coverage-cargo-${{ matrix.os }} continue-on-error: true - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true - profile: minimal components: llvm-tools-preview - name: Install cargo-llvm-cov uses: taiki-e/install-action@cargo-llvm-cov @@ -411,10 +391,9 @@ jobs: with: python-version: 3.11.0-beta.4 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - target: wasm32-unknown-emscripten + targets: wasm32-unknown-emscripten - uses: actions/setup-node@v3 with: node-version: 14 diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index efc09ab3..8425b260 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -23,10 +23,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal + - uses: dtolnay/rust-toolchain@nightly - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 @@ -64,11 +61,7 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - uses: actions/cache@v3 with: @@ -113,11 +106,7 @@ jobs: steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - uses: actions/cache@v3 with: From 7bc5a962774214cc4efe9ead29d2fc9cc9e1a1ad Mon Sep 17 00:00:00 2001 From: messense Date: Wed, 2 Nov 2022 09:42:55 +0800 Subject: [PATCH 2/4] Update `Swatinem/rust-cache` to v2 --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d42679f..42b8d5ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -157,7 +157,7 @@ jobs: # needed to correctly format errors, see #1865 components: rust-src - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: key: cargo-${{ matrix.platform.python-architecture }}-${{ matrix.platform.os }}-${{ matrix.msrv }} continue-on-error: true @@ -316,7 +316,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.10" - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: key: cargo-valgrind continue-on-error: true @@ -339,7 +339,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.10" - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: key: cargo-careful continue-on-error: true @@ -365,7 +365,7 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.10" - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: key: coverage-cargo-${{ matrix.os }} continue-on-error: true @@ -404,7 +404,7 @@ jobs: path: | .nox/emscripten key: ${{ hashFiles('emscripten/*') }} - ${{ hashFiles('noxfile.py') }} - ${{ steps.setup-python.outputs.python-path }} - - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 with: key: cargo-emscripten-wasm32 - name: Build From 2f11cc86446554b8925946f07b3b9a61cf94ae8d Mon Sep 17 00:00:00 2001 From: messense Date: Fri, 4 Nov 2022 14:21:45 +0800 Subject: [PATCH 3/4] maturin-action moved to PyO3 org --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42b8d5ca..83e1dce4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -244,7 +244,7 @@ jobs: - name: Test cross compilation if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.9' }} - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 env: PYO3_CROSS_LIB_DIR: /opt/python/cp39-cp39/lib with: @@ -256,7 +256,7 @@ jobs: if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.9' }} - name: Test cross compile to same architecture if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.9' }} - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 env: PYO3_CROSS_LIB_DIR: /opt/python/cp39-cp39/lib with: @@ -266,7 +266,7 @@ jobs: - name: Test cross compilation if: ${{ matrix.platform.os == 'macos-latest' && matrix.python-version == '3.9' }} - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 with: target: aarch64-apple-darwin args: --release -i python3.9 -m examples/maturin-starter/Cargo.toml @@ -289,7 +289,7 @@ jobs: cargo xwin build --manifest-path examples/maturin-starter/Cargo.toml --features generate-import-lib --target x86_64-pc-windows-msvc - name: Test cross compile to Windows with maturin if: ${{ matrix.platform.os == 'ubuntu-latest' && matrix.python-version == '3.8' }} - uses: messense/maturin-action@v1 + uses: PyO3/maturin-action@v1 with: target: x86_64-pc-windows-gnu args: -i python3.8 -m examples/maturin-starter/Cargo.toml --features abi3 From c6c0b45501c5d90d305a7f32bad2285c61e74e1f Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 5 Nov 2022 18:41:09 +0800 Subject: [PATCH 4/4] Update `actions/checkout` to v3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83e1dce4..42be1b3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -385,7 +385,7 @@ jobs: name: emscripten runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-python@v4 id: setup-python with: