|
5 | 5 | pull_request:
|
6 | 6 | types: [opened, synchronize, reopened]
|
7 | 7 |
|
| 8 | +env: |
| 9 | + LIBC_CI: 1 |
| 10 | + |
8 | 11 | jobs:
|
9 |
| - docker_linux_tier1: |
10 |
| - permissions: |
11 |
| - contents: read # to fetch code (actions/checkout) |
| 12 | + style_check: |
| 13 | + name: Style check |
| 14 | + runs-on: ubuntu-22.04 |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + - name: Setup Rust toolchain |
| 18 | + run: sh ./ci/install-rust.sh |
| 19 | + - name: Check style |
| 20 | + run: sh ci/style.sh |
12 | 21 |
|
13 |
| - name: Docker Linux Tier1 |
| 22 | + build_channels_linux: |
| 23 | + name: Build Channels Linux |
14 | 24 | runs-on: ubuntu-22.04
|
| 25 | + env: |
| 26 | + OS: linux |
15 | 27 | strategy:
|
16 | 28 | fail-fast: true
|
| 29 | + max-parallel: 5 |
17 | 30 | matrix:
|
18 |
| - target: [ |
19 |
| - i686-unknown-linux-gnu, |
20 |
| - x86_64-unknown-linux-gnu, |
21 |
| - ] |
| 31 | + toolchain: |
| 32 | + - stable |
| 33 | + - beta |
| 34 | + - nightly |
| 35 | + - 1.63.0 |
22 | 36 | steps:
|
23 | 37 | - uses: actions/checkout@v4
|
24 | 38 | - name: Setup Rust toolchain
|
25 |
| - run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh |
26 |
| - - name: Execute run-docker.sh |
27 |
| - run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }} |
| 39 | + run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh |
| 40 | + - name: Execute build.sh |
| 41 | + run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh |
28 | 42 |
|
29 |
| - macos: |
30 |
| - permissions: |
31 |
| - contents: read # to fetch code (actions/checkout) |
| 43 | + build_channels_macos: |
| 44 | + name: Build Channels macOS |
| 45 | + needs: macos |
| 46 | + env: |
| 47 | + OS: macos |
| 48 | + strategy: |
| 49 | + fail-fast: true |
| 50 | + max-parallel: 4 |
| 51 | + matrix: |
| 52 | + target: |
| 53 | + - { toolchain: stable, os: macos-14 } |
| 54 | + - { toolchain: beta, os: macos-14 } |
| 55 | + - { toolchain: nightly, os: macos-14 } |
| 56 | + - { toolchain: 1.63.0, os: macos-14 } |
| 57 | + runs-on: ${{ matrix.target.os }} |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v4 |
| 60 | + - name: Setup Rust toolchain |
| 61 | + run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh |
| 62 | + - name: Execute build.sh |
| 63 | + run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/build.sh |
32 | 64 |
|
| 65 | + build_channels_windows: |
| 66 | + name: Build Channels Windows |
| 67 | + runs-on: windows-2022 |
| 68 | + env: |
| 69 | + OS: windows |
| 70 | + strategy: |
| 71 | + fail-fast: true |
| 72 | + matrix: |
| 73 | + toolchain: |
| 74 | + - 1.63.0 |
| 75 | + - stable |
| 76 | + steps: |
| 77 | + - uses: actions/checkout@v4 |
| 78 | + - name: Self-update rustup |
| 79 | + run: rustup self update |
| 80 | + shell: bash |
| 81 | + - name: Execute build.sh |
| 82 | + run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh |
| 83 | + shell: bash |
| 84 | + |
| 85 | + macos: |
33 | 86 | name: macOS
|
34 | 87 | runs-on: macos-14
|
35 | 88 | strategy:
|
36 | 89 | fail-fast: true
|
37 | 90 | matrix:
|
38 |
| - target: [ |
39 |
| - aarch64-apple-darwin, |
40 |
| - ] |
| 91 | + target: |
| 92 | + - aarch64-apple-darwin |
41 | 93 | steps:
|
42 | 94 | - uses: actions/checkout@v4
|
43 | 95 | - name: Setup Rust toolchain
|
44 | 96 | run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
|
45 | 97 | - name: Execute run.sh
|
46 |
| - run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }} |
| 98 | + run: sh ./ci/run.sh ${{ matrix.target }} |
47 | 99 |
|
48 | 100 | windows:
|
49 |
| - permissions: |
50 |
| - contents: read # to fetch code (actions/checkout) |
51 |
| - |
52 | 101 | name: Windows
|
53 | 102 | runs-on: windows-2022
|
54 | 103 | env:
|
@@ -77,169 +126,90 @@ jobs:
|
77 | 126 | run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
|
78 | 127 | shell: bash
|
79 | 128 | - name: Execute run.sh
|
80 |
| - run: LIBC_CI=1 sh ./ci/run.sh ${{ matrix.target }} |
| 129 | + run: sh ./ci/run.sh ${{ matrix.target }} |
81 | 130 | shell: bash
|
82 | 131 |
|
83 |
| - style_check: |
84 |
| - permissions: |
85 |
| - contents: read # to fetch code (actions/checkout) |
86 |
| - |
87 |
| - name: Style check |
| 132 | + |
| 133 | + docker_linux_tier1: |
| 134 | + name: Docker Linux Tier1 |
88 | 135 | runs-on: ubuntu-22.04
|
| 136 | + strategy: |
| 137 | + fail-fast: true |
| 138 | + matrix: |
| 139 | + target: |
| 140 | + - i686-unknown-linux-gnu |
| 141 | + - x86_64-unknown-linux-gnu |
89 | 142 | steps:
|
90 | 143 | - uses: actions/checkout@v4
|
91 | 144 | - name: Setup Rust toolchain
|
92 |
| - run: sh ./ci/install-rust.sh |
93 |
| - - name: Check style |
94 |
| - run: sh ci/style.sh |
| 145 | + run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh |
| 146 | + - name: Execute run-docker.sh |
| 147 | + run: sh ./ci/run-docker.sh ${{ matrix.target }} |
95 | 148 |
|
96 | 149 | docker_linux_tier2:
|
97 |
| - permissions: |
98 |
| - contents: read # to fetch code (actions/checkout) |
99 |
| - |
100 | 150 | name: Docker Linux Tier2
|
101 | 151 | needs: [docker_linux_tier1, style_check]
|
102 | 152 | runs-on: ubuntu-22.04
|
103 | 153 | strategy:
|
104 | 154 | fail-fast: true
|
105 | 155 | max-parallel: 12
|
106 | 156 | matrix:
|
107 |
| - target: [ |
108 |
| - aarch64-linux-android, |
109 |
| - aarch64-unknown-linux-gnu, |
110 |
| - aarch64-unknown-linux-musl, |
111 |
| - arm-linux-androideabi, |
112 |
| - arm-unknown-linux-gnueabihf, |
113 |
| - arm-unknown-linux-musleabihf, |
114 |
| - i686-linux-android, |
115 |
| - i686-unknown-linux-musl, |
116 |
| - powerpc-unknown-linux-gnu, |
117 |
| - powerpc64-unknown-linux-gnu, |
118 |
| - powerpc64le-unknown-linux-gnu, |
119 |
| - s390x-unknown-linux-gnu, |
120 |
| - riscv64gc-unknown-linux-gnu, |
121 |
| - wasm32-wasip1, |
122 |
| - wasm32-wasip2, |
123 |
| - sparc64-unknown-linux-gnu, |
124 |
| - wasm32-unknown-emscripten, |
125 |
| - x86_64-linux-android, |
| 157 | + target: |
| 158 | + - aarch64-linux-android |
| 159 | + - aarch64-unknown-linux-gnu |
| 160 | + - aarch64-unknown-linux-musl |
| 161 | + - arm-linux-androideabi |
| 162 | + - arm-unknown-linux-gnueabihf |
| 163 | + - arm-unknown-linux-musleabihf |
| 164 | + - i686-linux-android |
| 165 | + - i686-unknown-linux-musl |
| 166 | + - powerpc-unknown-linux-gnu |
| 167 | + - powerpc64-unknown-linux-gnu |
| 168 | + - powerpc64le-unknown-linux-gnu |
| 169 | + - s390x-unknown-linux-gnu |
| 170 | + - riscv64gc-unknown-linux-gnu |
| 171 | + - wasm32-wasip1 |
| 172 | + - wasm32-wasip2 |
| 173 | + - sparc64-unknown-linux-gnu |
| 174 | + - wasm32-unknown-emscripten |
| 175 | + - x86_64-linux-android |
126 | 176 | # FIXME: Exec format error (os error 8)
|
127 |
| - #x86_64-unknown-linux-gnux32, |
128 |
| - x86_64-unknown-linux-musl, |
| 177 | + # - x86_64-unknown-linux-gnux32 |
| 178 | + - x86_64-unknown-linux-musl |
129 | 179 | # FIXME: It seems some items in `src/unix/mod.rs`
|
130 | 180 | # aren't defined on redox actually.
|
131 |
| - # x86_64-unknown-redox, |
132 |
| - ] |
| 181 | + # - x86_64-unknown-redox |
133 | 182 | steps:
|
134 | 183 | - uses: actions/checkout@v4
|
135 | 184 | - name: Setup Rust toolchain
|
136 | 185 | run: TARGET=${{ matrix.target }} sh ./ci/install-rust.sh
|
137 | 186 | - name: Execute run-docker.sh
|
138 |
| - run: LIBC_CI=1 sh ./ci/run-docker.sh ${{ matrix.target }} |
139 |
| - |
140 |
| - build_channels_linux: |
141 |
| - permissions: |
142 |
| - contents: read # to fetch code (actions/checkout) |
143 |
| - |
144 |
| - name: Build Channels Linux |
145 |
| - needs: docker_linux_tier2 |
146 |
| - runs-on: ubuntu-22.04 |
147 |
| - env: |
148 |
| - OS: linux |
149 |
| - strategy: |
150 |
| - fail-fast: true |
151 |
| - max-parallel: 5 |
152 |
| - matrix: |
153 |
| - toolchain: [ |
154 |
| - stable, |
155 |
| - beta, |
156 |
| - nightly, |
157 |
| - 1.63.0, |
158 |
| - ] |
159 |
| - steps: |
160 |
| - - uses: actions/checkout@v4 |
161 |
| - - name: Setup Rust toolchain |
162 |
| - run: TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/install-rust.sh |
163 |
| - - name: Execute build.sh |
164 |
| - run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh |
165 |
| - |
166 |
| - build_channels_macos: |
167 |
| - permissions: |
168 |
| - contents: read # to fetch code (actions/checkout) |
169 |
| - |
170 |
| - name: Build Channels macOS |
171 |
| - needs: macos |
172 |
| - env: |
173 |
| - OS: macos |
174 |
| - strategy: |
175 |
| - fail-fast: true |
176 |
| - max-parallel: 4 |
177 |
| - matrix: |
178 |
| - target: |
179 |
| - - { toolchain: stable, os: macos-14 } |
180 |
| - - { toolchain: beta, os: macos-14 } |
181 |
| - - { toolchain: nightly, os: macos-14 } |
182 |
| - - { toolchain: 1.63.0, os: macos-14 } |
183 |
| - runs-on: ${{ matrix.target.os }} |
184 |
| - steps: |
185 |
| - - uses: actions/checkout@v4 |
186 |
| - - name: Setup Rust toolchain |
187 |
| - run: TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/install-rust.sh |
188 |
| - - name: Execute build.sh |
189 |
| - run: LIBC_CI=1 TOOLCHAIN=${{ matrix.target.toolchain }} sh ./ci/build.sh |
190 |
| - |
191 |
| - build_channels_windows: |
192 |
| - permissions: |
193 |
| - contents: read # to fetch code (actions/checkout) |
194 |
| - |
195 |
| - name: Build Channels Windows |
196 |
| - runs-on: windows-2022 |
197 |
| - env: |
198 |
| - OS: windows |
199 |
| - strategy: |
200 |
| - fail-fast: true |
201 |
| - matrix: |
202 |
| - toolchain: [ |
203 |
| - 1.63.0, |
204 |
| - stable, |
205 |
| - ] |
206 |
| - steps: |
207 |
| - - uses: actions/checkout@v4 |
208 |
| - - name: Self-update rustup |
209 |
| - run: rustup self update |
210 |
| - shell: bash |
211 |
| - - name: Execute build.sh |
212 |
| - run: LIBC_CI=1 TOOLCHAIN=${{ matrix.toolchain }} sh ./ci/build.sh |
213 |
| - shell: bash |
| 187 | + run: sh ./ci/run-docker.sh ${{ matrix.target }} |
214 | 188 |
|
215 | 189 | check_cfg:
|
216 |
| - permissions: |
217 |
| - contents: read # to fetch code (actions/checkout) |
218 |
| - |
219 | 190 | name: "Check #[cfg]s"
|
220 | 191 | runs-on: ubuntu-22.04
|
221 | 192 | steps:
|
222 | 193 | - uses: actions/checkout@v4
|
223 | 194 | - name: Setup Rust toolchain
|
224 | 195 | run: TOOLCHAIN=nightly sh ./ci/install-rust.sh
|
225 | 196 | - name: Build with check-cfg
|
226 |
| - run: LIBC_CI=1 LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg |
| 197 | + run: LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg |
227 | 198 |
|
228 | 199 | # One job that "summarizes" the success state of this pipeline. This can then be added to branch
|
229 | 200 | # protection, rather than having to add each job separately.
|
230 | 201 | success:
|
231 | 202 | name: success
|
232 | 203 | runs-on: ubuntu-22.04
|
233 |
| - needs: [ |
234 |
| - docker_linux_tier1, |
235 |
| - docker_linux_tier2, |
236 |
| - macos, |
237 |
| - windows, |
238 |
| - style_check, |
239 |
| - build_channels_linux, |
240 |
| - build_channels_macos, |
241 |
| - build_channels_windows, |
242 |
| - ] |
| 204 | + needs: |
| 205 | + - docker_linux_tier1 |
| 206 | + - docker_linux_tier2 |
| 207 | + - macos |
| 208 | + - windows |
| 209 | + - style_check |
| 210 | + - build_channels_linux |
| 211 | + - build_channels_macos |
| 212 | + - build_channels_windows |
243 | 213 | # Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
|
244 | 214 | # failed" as success. So we have to do some contortions to ensure the job fails if any of its
|
245 | 215 | # dependencies fails.
|
|
0 commit comments