@@ -2,38 +2,103 @@ name: CI
2
2
on : [push, pull_request]
3
3
4
4
env :
5
+ CARGO_TERM_VERBOSE : true
5
6
RUSTDOCFLAGS : -Dwarnings
6
7
RUSTFLAGS : -Dwarnings
8
+ RUST_BACKTRACE : full
7
9
8
10
jobs :
9
11
docker :
10
12
name : Docker
11
- runs-on : ubuntu-latest
13
+ timeout-minutes : 20
12
14
strategy :
15
+ fail-fast : false
13
16
matrix :
14
- target :
15
- - aarch64-unknown-linux-gnu
16
- - arm-unknown-linux-gnueabi
17
- - arm-unknown-linux-gnueabihf
18
- - armv7-unknown-linux-gnueabihf
19
- # - i686-unknown-linux-gnu
20
- # MIPS targets disabled since they are dropped to tier 3.
21
- # See https://github.com/rust-lang/compiler-team/issues/648
22
- # - mips-unknown-linux-gnu
23
- # - mips64-unknown-linux-gnuabi64
24
- # - mips64el-unknown-linux-gnuabi64
25
- - powerpc-unknown-linux-gnu
26
- - powerpc64-unknown-linux-gnu
27
- - powerpc64le-unknown-linux-gnu
28
- - x86_64-unknown-linux-gnu
17
+ include :
18
+ - target : aarch64-apple-darwin
19
+ os : macos-latest
20
+ - target : aarch64-unknown-linux-gnu
21
+ os : ubuntu-latest
22
+ - target : aarch64-pc-windows-msvc
23
+ os : windows-latest
24
+ build_only : 1
25
+ - target : arm-unknown-linux-gnueabi
26
+ os : ubuntu-latest
27
+ - target : arm-unknown-linux-gnueabihf
28
+ os : ubuntu-latest
29
+ - target : armv7-unknown-linux-gnueabihf
30
+ os : ubuntu-latest
31
+ - target : i586-unknown-linux-gnu
32
+ os : ubuntu-latest
33
+ - target : i686-unknown-linux-gnu
34
+ os : ubuntu-latest
35
+ - target : powerpc-unknown-linux-gnu
36
+ os : ubuntu-latest
37
+ - target : powerpc64-unknown-linux-gnu
38
+ os : ubuntu-latest
39
+ - target : powerpc64le-unknown-linux-gnu
40
+ os : ubuntu-latest
41
+ - target : riscv64gc-unknown-linux-gnu
42
+ os : ubuntu-latest
43
+ - target : thumbv6m-none-eabi
44
+ os : ubuntu-latest
45
+ - target : thumbv7em-none-eabi
46
+ os : ubuntu-latest
47
+ - target : thumbv7em-none-eabihf
48
+ os : ubuntu-latest
49
+ - target : thumbv7m-none-eabi
50
+ os : ubuntu-latest
51
+ - target : x86_64-unknown-linux-gnu
52
+ os : ubuntu-latest
53
+ - target : x86_64-apple-darwin
54
+ os : macos-13
55
+ - target : i686-pc-windows-msvc
56
+ os : windows-latest
57
+ - target : x86_64-pc-windows-msvc
58
+ os : windows-latest
59
+ - target : i686-pc-windows-gnu
60
+ os : windows-latest
61
+ channel : nightly-i686-gnu
62
+ - target : x86_64-pc-windows-gnu
63
+ os : windows-latest
64
+ channel : nightly-x86_64-gnu
65
+ runs-on : ${{ matrix.os }}
66
+ env :
67
+ BUILD_ONLY : ${{ matrix.build_only }}
29
68
steps :
30
- - uses : actions/checkout@master
31
- - name : Install Rust
32
- run : rustup update nightly && rustup default nightly
33
- - run : rustup target add ${{ matrix.target }}
34
- - run : rustup target add x86_64-unknown-linux-musl
35
- - run : cargo generate-lockfile
36
- - run : ./ci/run-docker.sh ${{ matrix.target }}
69
+ - name : Print runner information
70
+ run : uname -a
71
+ - uses : actions/checkout@v4
72
+ - name : Install Rust (rustup)
73
+ shell : bash
74
+ run : |
75
+ channel="nightly"
76
+ # Account for channels that have required components (MinGW)
77
+ [ -n "${{ matrix.channel }}" ] && channel="${{ matrix.channel }}"
78
+ rustup update "$channel" --no-self-update
79
+ rustup default "$channel"
80
+ rustup target add ${{ matrix.target }}
81
+ rustup component add llvm-tools-preview
82
+ - uses : Swatinem/rust-cache@v2
83
+ with :
84
+ key : ${{ matrix.target }}
85
+
86
+ - name : Download musl source
87
+ run : ./ci/download-musl.sh
88
+ shell : bash
89
+
90
+ # Non-linux tests just use our raw script
91
+ - name : Run locally
92
+ if : matrix.os != 'ubuntu-latest'
93
+ shell : bash
94
+ run : ./ci/run.sh ${{ matrix.target }}
95
+
96
+ # Otherwise we use our docker containers to run builds
97
+ - name : Run in Docker
98
+ if : matrix.os == 'ubuntu-latest'
99
+ run : |
100
+ rustup target add x86_64-unknown-linux-musl
101
+ cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }}
37
102
38
103
stable :
39
104
name : Build succeeds on stable
@@ -51,7 +116,10 @@ jobs:
51
116
steps :
52
117
- uses : actions/checkout@master
53
118
- name : Install Rust
54
- run : rustup update nightly && rustup default nightly && rustup component add rustfmt
119
+ run : |
120
+ rustup update nightly --no-self-update
121
+ rustup default nightly
122
+ rustup component add rustfmt
55
123
- run : cargo fmt -- --check
56
124
57
125
wasm :
@@ -60,17 +128,19 @@ jobs:
60
128
steps :
61
129
- uses : actions/checkout@master
62
130
- name : Install Rust
63
- run : rustup update nightly && rustup default nightly
131
+ run : rustup update nightly --no-self-update && rustup default nightly
64
132
- run : rustup target add wasm32-unknown-unknown
133
+ - name : Download MUSL source
134
+ run : ./ci/download-musl.sh
65
135
- run : cargo build --target wasm32-unknown-unknown
66
136
67
- cb :
137
+ builtins :
68
138
name : " The compiler-builtins crate works"
69
139
runs-on : ubuntu-latest
70
140
steps :
71
141
- uses : actions/checkout@master
72
142
- name : Install Rust
73
- run : rustup update nightly && rustup default nightly
143
+ run : rustup update nightly --no-self-update && rustup default nightly
74
144
- run : cargo build -p cb
75
145
76
146
benchmarks :
@@ -79,15 +149,17 @@ jobs:
79
149
steps :
80
150
- uses : actions/checkout@master
81
151
- name : Install Rust
82
- run : rustup update nightly && rustup default nightly
152
+ run : rustup update nightly --no-self-update && rustup default nightly
153
+ - name : Download MUSL source
154
+ run : ./ci/download-musl.sh
83
155
- run : cargo bench --all
84
156
85
157
success :
86
158
needs :
87
159
- docker
88
160
- rustfmt
89
161
- wasm
90
- - cb
162
+ - builtins
91
163
- benchmarks
92
164
runs-on : ubuntu-latest
93
165
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
0 commit comments