Skip to content

Commit d9f3cb6

Browse files
bors[bot]asomerssaethlin
committed
Merge #2052
2052: Fix CI with the latest rustup r=asomers a=asomers Co-authored-by: Alan Somers <asomers@gmail.com> Co-authored-by: Ben Kimock <kimockb@gmail.com>
1 parent fa9ee6c commit d9f3cb6

File tree

2 files changed

+23
-31
lines changed

2 files changed

+23
-31
lines changed

.cirrus.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,28 @@ env:
99
RUSTFLAGS: -D warnings
1010
RUSTDOCFLAGS: -D warnings
1111
TOOL: cargo
12-
# The MSRV
13-
TOOLCHAIN: 1.56.1
12+
MSRV: 1.56.1
1413
ZFLAGS:
1514

1615
# Tests that don't require executing the build binaries
1716
build: &BUILD
1817
build_script:
1918
- . $HOME/.cargo/env || true
20-
- $TOOL +$TOOLCHAIN -Vv
21-
- rustc +$TOOLCHAIN -Vv
22-
- $TOOL +$TOOLCHAIN $BUILD $ZFLAGS --target $TARGET --all-targets
23-
- $TOOL +$TOOLCHAIN doc $ZFLAGS --no-deps --target $TARGET
24-
- $TOOL +$TOOLCHAIN clippy $ZFLAGS --target $TARGET --all-targets -- $CLIPPYFLAGS
19+
- $TOOL -Vv
20+
- rustc -Vv
21+
- $TOOL $BUILD $ZFLAGS --target $TARGET --all-targets
22+
- $TOOL doc $ZFLAGS --no-deps --target $TARGET
23+
- $TOOL clippy $ZFLAGS --target $TARGET --all-targets -- $CLIPPYFLAGS
2524
- if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
2625
- if [ -z "$NOHACK" ]; then curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-${HOST:-$TARGET}.tar.gz | tar xzf - -C ~/.cargo/bin; fi
27-
- if [ -z "$NOHACK" ]; then $TOOL +$TOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi
26+
- if [ -z "$NOHACK" ]; then $TOOL hack $ZFLAGS check --target $TARGET --each-feature; fi
2827

2928
# Tests that do require executing the binaries
3029
test: &TEST
3130
<< : *BUILD
3231
test_script:
3332
- . $HOME/.cargo/env || true
34-
- $TOOL +$TOOLCHAIN test --target $TARGET
33+
- $TOOL test --target $TARGET
3534

3635
# Test FreeBSD in a full VM. Test the i686 target too, in the
3736
# same VM. The binary will be built in 32-bit mode, but will execute on a
@@ -53,10 +52,10 @@ task:
5352
setup_script:
5453
- kldload mqueuefs
5554
- fetch https://sh.rustup.rs -o rustup.sh
56-
- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
55+
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
5756
- . $HOME/.cargo/env
5857
- rustup target add i686-unknown-freebsd
59-
- rustup component add --toolchain $TOOLCHAIN clippy
58+
- rustup component add clippy
6059
<< : *TEST
6160
i386_test_script:
6261
- . $HOME/.cargo/env
@@ -77,9 +76,9 @@ task:
7776
image: ghcr.io/cirruslabs/macos-ventura-base:latest
7877
setup_script:
7978
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
80-
- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
79+
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
8180
- . $HOME/.cargo/env
82-
- rustup component add --toolchain $TOOLCHAIN clippy
81+
- rustup component add clippy
8382
<< : *TEST
8483
before_cache_script: rm -rf $CARGO_HOME/registry/index
8584

@@ -130,7 +129,7 @@ task:
130129
setup_script:
131130
- mkdir /tmp/home
132131
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
133-
- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
132+
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
134133
- . $HOME/.cargo/env
135134
- cargo install cross --version 0.2.1 # cross 0.2.2 bumped the MSRV to 1.58.1
136135
<< : *TEST
@@ -167,9 +166,7 @@ task:
167166
image: rust:latest
168167
env:
169168
TARGET: x86_64-unknown-linux-gnu
170-
TOOLCHAIN:
171169
setup_script:
172-
- rustup target add $TARGET
173170
- rustup component add clippy
174171
<< : *TEST
175172
before_cache_script: rm -rf $CARGO_HOME/registry/index
@@ -244,38 +241,34 @@ task:
244241
TARGET: x86_64-unknown-netbsd
245242
setup_script:
246243
- rustup target add $TARGET
247-
- rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
248-
- rustup component add --toolchain $TOOLCHAIN clippy
244+
- rustup component add clippy
249245
<< : *BUILD
250246
before_cache_script: rm -rf $CARGO_HOME/registry/index
251247

252248
task:
253249
container:
254-
image: rust:1.56
250+
# Redox's MSRV policy is unclear. Until they define it, use nightly.
251+
image: rustlang/rust:nightly
255252
env:
256253
BUILD: check
257254
name: Redox x86_64
258255
env:
259256
HOST: x86_64-unknown-linux-gnu
260257
TARGET: x86_64-unknown-redox
261-
# Redox's MSRV policy is unclear. Until they define it, use nightly.
262-
TOOLCHAIN: nightly
263258
CLIPPYFLAGS: -D warnings
264259
setup_script:
265260
- rustup target add $TARGET
266-
- rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
267-
- rustup component add --toolchain $TOOLCHAIN clippy
261+
- rustup component add clippy
268262
<< : *BUILD
269263
before_cache_script: rm -rf $CARGO_HOME/registry/index
270264

271-
# Rust Tier 3 targets can't use Rustup
265+
## Rust Tier 3 targets can't use Rustup
272266
task:
273267
container:
274268
image: rustlang/rust:nightly
275269
env:
276270
BUILD: check
277271
HOST: x86_64-unknown-linux-gnu
278-
TOOLCHAIN: nightly
279272
ZFLAGS: -Zbuild-std
280273
CLIPPYFLAGS: -D warnings
281274
matrix:
@@ -303,7 +296,6 @@ task:
303296
name: Minver
304297
env:
305298
HOST: x86_64-unknown-linux-gnu
306-
TOOLCHAIN: nightly
307299
container:
308300
image: rustlang/rust:nightly
309301
setup_script:
@@ -317,5 +309,5 @@ task:
317309
name: Rust Formatter
318310
container:
319311
image: rust:latest
320-
setup_script: rustup +$TOOLCHAIN component add rustfmt
321-
test_script: $TOOL +$TOOLCHAIN fmt --all -- --check **/*.rs
312+
setup_script: rustup component add rustfmt
313+
test_script: cargo fmt --all -- --check **/*.rs

test/sys/test_socket.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub fn test_inetv4_addr_roundtrip_sockaddr_storage_to_addr() {
6868
assert_eq!(from_storage, sockaddr);
6969
}
7070

71-
#[cfg(any(target_os = "linux"))]
71+
#[cfg(target_os = "linux")]
7272
#[cfg_attr(qemu, ignore)]
7373
#[test]
7474
pub fn test_timestamping() {
@@ -2231,7 +2231,7 @@ pub fn test_vsock() {
22312231
// Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
22322232
// of QEMU support is suspected.
22332233
#[cfg_attr(qemu, ignore)]
2234-
#[cfg(all(target_os = "linux"))]
2234+
#[cfg(target_os = "linux")]
22352235
#[test]
22362236
fn test_recvmsg_timestampns() {
22372237
use nix::sys::socket::*;
@@ -2286,7 +2286,7 @@ fn test_recvmsg_timestampns() {
22862286
// Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
22872287
// of QEMU support is suspected.
22882288
#[cfg_attr(qemu, ignore)]
2289-
#[cfg(all(target_os = "linux"))]
2289+
#[cfg(target_os = "linux")]
22902290
#[test]
22912291
fn test_recvmmsg_timestampns() {
22922292
use nix::sys::socket::*;

0 commit comments

Comments
 (0)