@@ -72,20 +72,10 @@ jobs:
7272 shell : bash
7373 run : |
7474 if [[ ${{ github.event_name }} == 'schedule' ]]; then
75- RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
75+ ./rustup-toolchain HEAD --host ${{ matrix.host_target }}
7676 else
77- RUSTC_HASH=$(< rust-version)
77+ ./rustup-toolchain "" --host ${{ matrix.host_target }}
7878 fi
79- # We need a nightly cargo for parts of the cargo miri test suite.
80- rustup-toolchain-install-master \
81- -f \
82- -n master "$RUSTC_HASH" \
83- -c cargo \
84- -c rust-src \
85- -c rustc-dev \
86- -c llvm-tools \
87- --host ${{ matrix.host_target }}
88- rustup default master
8979
9080 - name : Show Rust version
9181 run : |
@@ -97,26 +87,35 @@ jobs:
9787 run : bash ./ci.sh
9888
9989 fmt :
100- name : check formatting (ignored by bors)
90+ name : formatting (ignored by bors)
10191 runs-on : ubuntu-latest
10292 steps :
10393 - uses : actions/checkout@v3
10494 - name : Install latest nightly
105- uses : actions-rs/toolchain@v1
106- with :
107- toolchain : nightly
108- components : rustfmt
109- default : true
110- - name : Check formatting (miri)
111- uses : actions-rs/cargo@v1
112- with :
113- command : fmt
114- args : --all -- --check
115- - name : Check formatting (cargo-miri)
116- uses : actions-rs/cargo@v1
117- with :
118- command : fmt
119- args : --manifest-path cargo-miri/Cargo.toml --all -- --check
95+ run : |
96+ rustup toolchain install nightly --component rustfmt
97+ rustup override set nightly
98+ - name : Formatting (miri, ui_test)
99+ run : cargo fmt --all --check
100+ - name : Formatting (cargo-miri)
101+ run : cargo fmt --manifest-path cargo-miri/Cargo.toml --all --check
102+
103+ clippy :
104+ name : clippy (ignored by bors)
105+ runs-on : ubuntu-latest
106+ steps :
107+ - uses : actions/checkout@v3
108+ - name : Install required toolchain
109+ # We need a toolchain that can actually build Miri, just a nightly won't do.
110+ run : |
111+ cargo install rustup-toolchain-install-master # TODO: cache this?
112+ ./rustup-toolchain "" -c clippy
113+ - name : Clippy (miri)
114+ run : cargo clippy --all-targets -- -D warnings
115+ # - name: Clippy (ui_test)
116+ # run: cargo clippy --manifest-path ui_test/Cargo.toml --all-targets -- -D warnings
117+ - name : Clippy (cargo-miri)
118+ run : cargo clippy --manifest-path cargo-miri/Cargo.toml --all-targets -- -D warnings
120119
121120 # These jobs doesn't actually test anything, but they're only used to tell
122121 # bors the build completed, as there is no practical way to detect when a
0 commit comments