diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ea3043c..42be1b3c 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,16 +150,14 @@ 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 - - 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 @@ -254,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: @@ -266,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: @@ -276,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 @@ -299,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 @@ -326,17 +316,13 @@ 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 - - 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 @@ -353,15 +339,12 @@ 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 - - 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 @@ -382,15 +365,12 @@ 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 - - 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 @@ -405,16 +385,15 @@ 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: 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 @@ -425,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 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: