Skip to content

Commit 89b4976

Browse files
bors[bot]asomerssaethlin
authored
Merge #2052
2052: Fix CI with the latest rustup r=asomers a=asomers Co-authored-by: Alan Somers <[email protected]> Co-authored-by: Ben Kimock <[email protected]>
2 parents c6f9e23 + 57cdbed commit 89b4976

File tree

3 files changed

+25
-33
lines changed

3 files changed

+25
-33
lines changed

.cirrus.yml

+20-28
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,28 @@ env:
88
RUSTFLAGS: -D warnings
99
RUSTDOCFLAGS: -D warnings
1010
TOOL: cargo
11-
# The MSRV
12-
TOOLCHAIN: 1.63.0
11+
MSRV: 1.63.0
1312
ZFLAGS:
1413

1514
# Tests that don't require executing the build binaries
1615
build: &BUILD
1716
build_script:
1817
- . $HOME/.cargo/env || true
19-
- $TOOL +$TOOLCHAIN -Vv
20-
- rustc +$TOOLCHAIN -Vv
21-
- $TOOL +$TOOLCHAIN $BUILD $ZFLAGS --target $TARGET --all-targets
22-
- $TOOL +$TOOLCHAIN doc $ZFLAGS --no-deps --target $TARGET
23-
- $TOOL +$TOOLCHAIN clippy $ZFLAGS --target $TARGET --all-targets -- -D warnings
18+
- $TOOL -Vv
19+
- rustc -Vv
20+
- $TOOL $BUILD $ZFLAGS --target $TARGET --all-targets
21+
- $TOOL doc $ZFLAGS --no-deps --target $TARGET
22+
- $TOOL clippy $ZFLAGS --target $TARGET --all-targets -- -D warnings
2423
- if [ -z "$NOHACK" ]; then mkdir -p $HOME/.cargo/bin; export PATH=$HOME/.cargo/bin:$PATH; fi
2524
- 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
26-
- if [ -z "$NOHACK" ]; then $TOOL +$TOOLCHAIN hack $ZFLAGS check --target $TARGET --each-feature; fi
25+
- if [ -z "$NOHACK" ]; then $TOOL hack $ZFLAGS check --target $TARGET --each-feature; fi
2726

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

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

@@ -129,7 +128,7 @@ task:
129128
setup_script:
130129
- mkdir /tmp/home
131130
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
132-
- sh rustup.sh -y --profile=minimal --default-toolchain $TOOLCHAIN
131+
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
133132
- . $HOME/.cargo/env
134133
- cargo install cross --version 0.2.1 # cross 0.2.2 bumped the MSRV to 1.58.1
135134
<< : *TEST
@@ -165,9 +164,7 @@ task:
165164
image: rust:latest
166165
env:
167166
TARGET: x86_64-unknown-linux-gnu
168-
TOOLCHAIN:
169167
setup_script:
170-
- rustup target add $TARGET
171168
- rustup component add clippy
172169
<< : *TEST
173170
before_cache_script: rm -rf $CARGO_HOME/registry/index
@@ -242,37 +239,33 @@ task:
242239
TARGET: x86_64-unknown-netbsd
243240
setup_script:
244241
- rustup target add $TARGET
245-
- rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
246-
- rustup component add --toolchain $TOOLCHAIN clippy
242+
- rustup component add clippy
247243
<< : *BUILD
248244
before_cache_script: rm -rf $CARGO_HOME/registry/index
249245

250246
task:
251247
container:
252-
image: rust:1.63.0
248+
# Redox's MSRV policy is unclear. Until they define it, use nightly.
249+
image: rustlang/rust:nightly
253250
env:
254251
BUILD: check
255252
name: Redox x86_64
256253
env:
257254
HOST: x86_64-unknown-linux-gnu
258255
TARGET: x86_64-unknown-redox
259-
# Redox's MSRV policy is unclear. Until they define it, use nightly.
260-
TOOLCHAIN: nightly
261256
setup_script:
262257
- rustup target add $TARGET
263-
- rustup toolchain install $TOOLCHAIN --profile minimal --target $TARGET
264-
- rustup component add --toolchain $TOOLCHAIN clippy
258+
- rustup component add clippy
265259
<< : *BUILD
266260
before_cache_script: rm -rf $CARGO_HOME/registry/index
267261

268-
# Rust Tier 3 targets can't use Rustup
262+
## Rust Tier 3 targets can't use Rustup
269263
task:
270264
container:
271265
image: rustlang/rust:nightly
272266
env:
273267
BUILD: check
274268
HOST: x86_64-unknown-linux-gnu
275-
TOOLCHAIN: nightly
276269
ZFLAGS: -Zbuild-std
277270
matrix:
278271
- name: DragonFly BSD x86_64
@@ -299,7 +292,6 @@ task:
299292
name: Minver
300293
env:
301294
HOST: x86_64-unknown-linux-gnu
302-
TOOLCHAIN: nightly
303295
container:
304296
image: rustlang/rust:nightly
305297
setup_script:
@@ -313,5 +305,5 @@ task:
313305
name: Rust Formatter
314306
container:
315307
image: rust:latest
316-
setup_script: rustup +$TOOLCHAIN component add rustfmt
317-
test_script: $TOOL +$TOOLCHAIN fmt --all -- --check **/*.rs
308+
setup_script: rustup component add rustfmt
309+
test_script: cargo fmt --all -- --check **/*.rs

src/sys/event.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl Kqueue {
8686
target_os = "openbsd"
8787
))]
8888
type type_of_udata = *mut libc::c_void;
89-
#[cfg(any(target_os = "netbsd"))]
89+
#[cfg(target_os = "netbsd")]
9090
type type_of_udata = intptr_t;
9191

9292
#[cfg(target_os = "netbsd")]
@@ -171,7 +171,7 @@ libc_enum! {
171171
))]
172172
#[doc(hidden)]
173173
pub type type_of_event_flag = u16;
174-
#[cfg(any(target_os = "netbsd"))]
174+
#[cfg(target_os = "netbsd")]
175175
#[doc(hidden)]
176176
pub type type_of_event_flag = u32;
177177
libc_bitflags! {

test/sys/test_socket.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use std::path::Path;
1010
use std::slice;
1111
use std::str::FromStr;
1212

13-
#[cfg(any(target_os = "linux"))]
13+
#[cfg(target_os = "linux")]
1414
#[cfg_attr(qemu, ignore)]
1515
#[test]
1616
pub fn test_timestamping() {
@@ -2082,7 +2082,7 @@ pub fn test_vsock() {
20822082
// Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
20832083
// of QEMU support is suspected.
20842084
#[cfg_attr(qemu, ignore)]
2085-
#[cfg(all(target_os = "linux"))]
2085+
#[cfg(target_os = "linux")]
20862086
#[test]
20872087
fn test_recvmsg_timestampns() {
20882088
use nix::sys::socket::*;
@@ -2137,7 +2137,7 @@ fn test_recvmsg_timestampns() {
21372137
// Disable the test on emulated platforms because it fails in Cirrus-CI. Lack
21382138
// of QEMU support is suspected.
21392139
#[cfg_attr(qemu, ignore)]
2140-
#[cfg(all(target_os = "linux"))]
2140+
#[cfg(target_os = "linux")]
21412141
#[test]
21422142
fn test_recvmmsg_timestampns() {
21432143
use nix::sys::socket::*;

0 commit comments

Comments
 (0)