2828 - 1.36.0
2929 # Introduction of non_exhaustive, used at certain exfiltrators
3030 - 1.40.0
31+ exclude :
32+ # macos-latest is aarch64, old Rust doesn't know that target
33+ - os : macos-latest
34+ rust : 1.36.0
35+ - os : macos-latest
36+ rust : 1.40.0
3137
3238 runs-on : ${{ matrix.os }}
3339
3642 uses : actions/checkout@v2
3743
3844 - name : Install Rust
39- uses : actions-rs/toolchain@v1
40- with :
41- toolchain : ${{ matrix.rust }}
42- default : true
43- profile : minimal
45+ run : |
46+ rustup toolchain add ${{ matrix.rust }} --profile minimal
47+ rustup default ${{ matrix.rust }}
4448
4549 - name : Restore cache
4650 uses : Swatinem/rust-cache@v1
5054 RUST_VERSION : ${{ matrix.rust }}
5155 OS : ${{ matrix.os }}
5256 run : ./ci-check.sh
57+ shell : bash
5358
5459 rustfmt :
5560 name : Check formatting
5964 uses : actions/checkout@v2
6065
6166 - name : Install Rust
62- uses : actions-rs/toolchain@v1
63- with :
64- profile : minimal
65- toolchain : stable
66- default : true
67- components : rustfmt
67+ run : |
68+ rustup update stable
69+ rustup component add rustfmt
6870
6971 - run : cargo fmt --all -- --check
7072
@@ -76,19 +78,13 @@ jobs:
7678 uses : actions/checkout@v2
7779
7880 - name : Install Rust
79- uses : actions-rs/toolchain@v1
80- with :
81- toolchain : stable
82- default : true
81+ run : rustup update stable
8382
8483 - name : Restore cache
8584 uses : Swatinem/rust-cache@v1
8685
8786 - name : Install cargo-deadlinks
88- uses : actions-rs/install@v0.1
89- with :
90- crate : cargo-deadlinks
91- use-tool-cache : true
87+ run : cargo install cargo-deadlinks
9288
9389 - name : Check links
9490 run : |
@@ -104,28 +100,25 @@ jobs:
104100 matrix :
105101 os :
106102 - ubuntu-latest
107- - macos-latest
108103 - windows-latest
104+ # no macos-latest because that's aarch64 and old Rust lacks that target
105+ # no macos-15-intel because of weird linker errors
109106 runs-on : ${{ matrix.os }}
110107 steps :
111108 - name : checkout
112109 uses : actions/checkout@v2
113110
114111 - name : Install Rust
115- uses : actions-rs/toolchain@v1
116- with :
117- toolchain : 1.26.0
118- default : true
119- profile : minimal
120-
121- - name : Restore cache
122- uses : Swatinem/rust-cache@v1
112+ run : |
113+ rustup toolchain install 1.26.0 --profile minimal
114+ rustup default 1.26.0
123115
124116 - name : Check compilation
125117 run : |
126118 rm Cargo.toml
127119 cd signal-hook-registry
128120 sed -i -e '/signal-hook =/d' Cargo.toml
121+ sed -i -e 's/libc = "^0.2"/libc = "=0.2.156"/' Cargo.toml
129122 cargo check
130123
131124 ancient :
@@ -134,26 +127,23 @@ jobs:
134127 matrix :
135128 os :
136129 - ubuntu-latest
137- - macos-latest
138130 - windows-latest
131+ # no macos-latest because that's aarch64 and old Rust lacks that target
132+ # no macos-15-intel because of weird linker errors
139133 runs-on : ${{ matrix.os }}
140134 steps :
141135 - name : checkout
142136 uses : actions/checkout@v2
143137
144138 - name : Install Rust
145- uses : actions-rs/toolchain@v1
146- with :
147- toolchain : 1.31.0
148- default : true
149- profile : minimal
150-
151- - name : Restore cache
152- uses : Swatinem/rust-cache@v1
139+ run : |
140+ rustup toolchain update 1.31.0 --profile minimal
141+ rustup default 1.31.0
153142
154143 - name : Check compilation
155144 run : |
156145 rm Cargo.lock
146+ sed -i -e 's/libc = "^0.2"/libc = "=0.2.156"/' Cargo.toml
157147 cargo update
158148 cargo check --no-default-features
159149
@@ -166,18 +156,14 @@ jobs:
166156 uses : actions/checkout@v2
167157
168158 - name : Install Rust
169- uses : actions-rs/toolchain@v1
170- with :
171- toolchain : stable
172- profile : minimal
173- default : true
174- components : clippy
159+ run : rustup toolchain update stable --profile minimal --component clippy
175160
176161 - name : Restore cache
177162 uses : Swatinem/rust-cache@v1
178163
179164 - name : Run clippy linter
180- run : cargo clippy --all --all-features --tests -- -D clippy::all -D warnings
165+ # cfg(clippy) is necessary in signal-hook-registry because Rust 1.26 doesn't support allow(clippy::foo)
166+ run : cargo clippy --all --all-features --tests -- -D clippy::all -D warnings -A clippy::unnecessary_clippy_cfg
181167
182168 # There's bunch of platforms that have some weird quirks (or we don't know
183169 # that they don't). While fully compiling and testing on them is a bit of a
@@ -190,20 +176,18 @@ jobs:
190176 matrix :
191177 target :
192178 - x86_64-unknown-linux-musl
193- - x86_64-pc-solaris
194179 - x86_64-linux-android
195180 - aarch64-linux-android
196181 - arm-linux-androideabi
197- - mips -unknown-linux-musl
182+ - s390x -unknown-linux-gnu
198183 - x86_64-unknown-netbsd
199184 - x86_64-unknown-freebsd
200185 extra-args :
201186 - " --all --all-features"
202187 include :
203188 # - wasm32-wasi (not yet? Or not ever?)
204189 # - x86_64-unknown-redox (Is that platform even usable on stable?)
205- - { target: x86_64-fuchsia, extra-args: "--all-features" }
206- - { target: asmjs-unknown-emscripten, extra-args: "--all-features" }
190+ - { target: x86_64-unknown-fuchsia, extra-args: "--all-features" }
207191 # Seems we have some trouble with properly running C compiler on these. Might as well be problem with cross-compilation setup, but who knows
208192 # So we avoid the exfiltrator part/signal-hook-sys :-(
209193 - { target: x86_64-apple-darwin, extra-args: "--features=iterator --all --exclude signal-hook-sys" }
@@ -215,19 +199,17 @@ jobs:
215199 uses : actions/checkout@v2
216200
217201 - name : Install Rust
218- uses : actions-rs/toolchain@v1
202+ run : |
203+ rustup update stable
204+ rustup target add ${{ matrix.target }}
205+
206+ - name : Install cross
207+ uses : taiki-e/install-action@v2
219208 with :
220- toolchain : stable
221- profile : minimal
222- default : true
223- target : ${{ matrix.target }}
209+ tool : cross@0.2.5
224210
225211 - name : Restore cache
226212 uses : Swatinem/rust-cache@v1
227213
228214 - name : Run the check
229- uses : actions-rs/cargo@v1
230- with :
231- command : check
232- args : ${{ matrix.extra-args }} --tests --target=${{ matrix.target }}
233- use-cross : true
215+ run : cross check ${{ matrix.extra-args }} --tests --target=${{ matrix.target }}
0 commit comments