From 6c6fe4adda3bafb54f6e728696e06f02a2ec2e89 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 10 Jan 2023 07:43:33 -0500 Subject: [PATCH] Use rustup-show instead of actions-rs --- .github/workflows/ci.yaml | 39 +++++---------------------- .github/workflows/flake8-to-ruff.yaml | 18 +++---------- .github/workflows/playground.yaml | 7 +---- .github/workflows/ruff.yaml | 18 +++---------- rust-toolchain | 1 - rust-toolchain.toml | 5 ++++ 6 files changed, 18 insertions(+), 70 deletions(-) delete mode 100644 rust-toolchain create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a57ae436c1..4e1d63d45b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,11 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-11-01 - override: true + - run: rustup show - uses: Swatinem/rust-cache@v1 - run: cargo build --all - run: ./target/debug/ruff_dev generate-all @@ -38,12 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-11-01 - override: true - components: rustfmt + - run: rustup show - run: cargo fmt --all --check cargo_clippy: @@ -51,13 +42,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-11-01 - override: true - components: clippy - target: wasm32-unknown-unknown + - run: rustup show - uses: Swatinem/rust-cache@v1 - run: cargo clippy --workspace --all-targets --all-features -- -D warnings -W clippy::pedantic - run: cargo clippy --workspace --target wasm32-unknown-unknown --all-features -- -D warnings -W clippy::pedantic @@ -67,11 +52,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-11-01 - override: true + - run: rustup show - uses: Swatinem/rust-cache@v1 - run: cargo install cargo-insta - run: pip install black[d]==22.12.0 @@ -90,11 +71,7 @@ jobs: # WASM_BINDGEN_TEST_TIMEOUT: 60 # steps: # - uses: actions/checkout@v3 -# - uses: actions-rs/toolchain@v1 -# with: -# profile: minimal -# toolchain: nightly-2022-11-01 -# override: true +# - run: rustup show # - uses: actions/cache@v3 # env: # cache-name: cache-cargo @@ -116,11 +93,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-11-01 - override: true + - run: rustup show - uses: Swatinem/rust-cache@v1 - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/flake8-to-ruff.yaml b/.github/workflows/flake8-to-ruff.yaml index ed4c913e51..f41c134438 100644 --- a/.github/workflows/flake8-to-ruff.yaml +++ b/.github/workflows/flake8-to-ruff.yaml @@ -24,11 +24,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} architecture: x64 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + run: rustup show - name: Build wheels - x86_64 uses: messense/maturin-action@v1 with: @@ -51,11 +47,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} architecture: x64 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + run: rustup show - name: Build wheels - universal2 uses: messense/maturin-action@v1 with: @@ -81,11 +73,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} architecture: ${{ matrix.target }} - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + run: rustup show - name: Build wheels uses: messense/maturin-action@v1 with: diff --git a/.github/workflows/playground.yaml b/.github/workflows/playground.yaml index 2d01bd4462..734d3aa629 100644 --- a/.github/workflows/playground.yaml +++ b/.github/workflows/playground.yaml @@ -17,12 +17,7 @@ jobs: CF_API_TOKEN_EXISTS: ${{ secrets.CF_API_TOKEN != '' }} steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly-2022-11-01 - override: true - target: wasm32-unknown-unknown + - run: rustup show - uses: actions/setup-node@v3 with: node-version: 18 diff --git a/.github/workflows/ruff.yaml b/.github/workflows/ruff.yaml index 2eccd8b223..c1031f8f81 100644 --- a/.github/workflows/ruff.yaml +++ b/.github/workflows/ruff.yaml @@ -25,11 +25,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} architecture: x64 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + run: rustup show - name: Build wheels - x86_64 uses: messense/maturin-action@v1 with: @@ -52,11 +48,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} architecture: x64 - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + run: rustup show - name: Build wheels - universal2 uses: messense/maturin-action@v1 with: @@ -82,11 +74,7 @@ jobs: python-version: ${{ env.PYTHON_VERSION }} architecture: ${{ matrix.target }} - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - default: true + run: rustup show - name: Build wheels uses: messense/maturin-action@v1 with: diff --git a/rust-toolchain b/rust-toolchain deleted file mode 100644 index 902c74186f..0000000000 --- a/rust-toolchain +++ /dev/null @@ -1 +0,0 @@ -1.65.0 diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000000..2dfd5e72d9 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,5 @@ +[toolchain] +# The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy. +# https://rust-lang.github.io/rustup/concepts/profiles.html +profile = "default" +channel = "1.65.0"