|
8 | 8 | preview: ${{ github.event_name == 'release' && contains(github.event.release.tag_name, 'preview') }} |
9 | 9 | on_schedule: "false" |
10 | 10 | # RUSTC_WRAPPER: sccache |
| 11 | + # |
| 12 | + RUST_TOOLCHAIN: nightly |
| 13 | + RUST_TOOLCHAIN_PROFILE: default |
| 14 | + RUST_TOOLCHAIN_OVERRIDE: true |
| 15 | + # |
11 | 16 | RUSTC_WRAPPER: sccache |
12 | 17 | CACHE_VERSION: v1 |
13 | 18 | SCCACHE_VERSION: 0.10.0 |
@@ -68,10 +73,16 @@ jobs: |
68 | 73 | - name: "Install gcc" |
69 | 74 | if: matrix.gcc != '' |
70 | 75 | run: sudo apt update && sudo apt install -yq ${{ matrix.gcc }} |
71 | | - # - name: "Install cargo-binstall" |
72 | | - # uses: cargo-bins/cargo-binstall@main |
73 | | - - name: "Setup Rust toolchain" |
74 | | - run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update |
| 76 | + # - name: "Install cargo-binstall" |
| 77 | + # uses: cargo-bins/cargo-binstall@main |
| 78 | + - name: "Setup Rust toolchain via actions-rs" |
| 79 | + uses: actions-rs/toolchain@v1 |
| 80 | + with: |
| 81 | + toolchain: ${{ env.RUST_TOOLCHAIN }} |
| 82 | + profile: ${{ env.RUST_TOOLCHAIN_PROFILE }} |
| 83 | + override: ${{ env.RUST_TOOLCHAIN_OVERRIDE }} |
| 84 | + # - name: "Setup Rust toolchain" |
| 85 | + # run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update |
75 | 86 | - name: "Ensure nightly rustfmt installed" |
76 | 87 | run: rustup component add rustfmt --toolchain nightly |
77 | 88 | - name: "Run Cargo fmt" |
@@ -132,8 +143,14 @@ jobs: |
132 | 143 | uses: cargo-bins/cargo-binstall@main |
133 | 144 | - name: "Install sccache via cargo-binstall" |
134 | 145 | run: cargo binstall -y sccache@${{ env.SCCACHE_VERSION }} |
135 | | - - name: "Setup Rust toolchain" |
136 | | - run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update |
| 146 | + - name: "Setup Rust toolchain via actions-rs" |
| 147 | + uses: actions-rs/toolchain@v1 |
| 148 | + with: |
| 149 | + toolchain: ${{ env.RUST_TOOLCHAIN }} |
| 150 | + profile: ${{ env.RUST_TOOLCHAIN_PROFILE }} |
| 151 | + override: ${{ env.RUST_TOOLCHAIN_OVERRIDE }} |
| 152 | + # - name: "Setup Rust toolchain" |
| 153 | + # run: rustup toolchain install nightly --profile minimal --target ${{ matrix.target }} --no-self-update |
137 | 154 | - name: "Ensure nightly rustfmt installed" |
138 | 155 | run: rustup component add rustfmt --toolchain nightly |
139 | 156 | - name: "Run Cargo fmt" |
|
0 commit comments