Skip to content

Commit fb242cb

Browse files
committed
Economize our Cirrus CI builds
Cirrus CI is eliminating unlimited free open source builds. Open source projects will now be limited to about 16,000 CPU-minutes per month. Tweak our CI configuration to reduce its demands: * Eliminate the FreeBSD 12 x86_64, iOS x86_64, macOS x86_64, and Linux powerpc builds. They weren't providing a useful amount of test coverage. * Reduce each task to 1 CPU (except for OSX, where we can't). Our build rarely uses more than a single CPU anyway. * Split the tasks up into two groups. The first group of 8 builds contains broad coverage. Most build failures will be caught by one of these tasks. The second group of 29 tasks will only run after the first group completes. https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/
1 parent c93fe51 commit fb242cb

File tree

2 files changed

+82
-22
lines changed

2 files changed

+82
-22
lines changed

.cirrus.yml

Lines changed: 74 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ task:
4040
env:
4141
TARGET: x86_64-unknown-freebsd
4242
matrix:
43-
- name: FreeBSD 12 amd64 & i686
44-
freebsd_instance:
45-
image: freebsd-12-4-release-amd64
4643
- name: FreeBSD 14 amd64 & i686
4744
freebsd_instance:
4845
image_family: freebsd-14-0-snap
46+
cpu: 1
4947
# Enable tests that would fail on FreeBSD 12
5048
RUSTFLAGS: --cfg fbsd14 -D warnings
5149
RUSTDOCFLAGS: --cfg fbsd14
@@ -85,6 +83,14 @@ task:
8583
# Use cross for QEMU-based testing
8684
# cross needs to execute Docker, so we must use Cirrus's Docker Builder task.
8785
task:
86+
depends_on:
87+
- FreeBSD 14 amd64 & i686
88+
- Linux x86_64
89+
- macOS aarch64
90+
- Rust Formatter
91+
- OpenBSD x86_64
92+
- Minver
93+
- Rust Stable
8894
env:
8995
RUST_TEST_THREADS: 1 # QEMU works best with 1 thread
9096
HOME: /tmp/home
@@ -141,16 +147,35 @@ task:
141147
- name: Linux aarch64
142148
arm_container:
143149
image: rust:1.63.0
150+
cpu: 1
151+
depends_on:
152+
- FreeBSD 14 amd64 & i686
153+
- Linux x86_64
154+
- macOS aarch64
155+
- Rust Formatter
156+
- OpenBSD x86_64
157+
- Minver
158+
- Rust Stable
144159
env:
145160
TARGET: aarch64-unknown-linux-gnu
146161
- name: Linux x86_64
147162
container:
148163
image: rust:1.63.0
164+
cpu: 1
149165
env:
150166
TARGET: x86_64-unknown-linux-gnu
151167
- name: Linux x86_64 musl
152168
container:
153169
image: rust:1.63.0
170+
cpu: 1
171+
depends_on:
172+
- FreeBSD 14 amd64 & i686
173+
- Linux x86_64
174+
- macOS aarch64
175+
- Rust Formatter
176+
- OpenBSD x86_64
177+
- Minver
178+
- Rust Stable
154179
env:
155180
TARGET: x86_64-unknown-linux-musl
156181
setup_script:
@@ -163,6 +188,7 @@ task:
163188
name: Rust Stable
164189
container:
165190
image: rust:latest
191+
cpu: 1
166192
env:
167193
TARGET: x86_64-unknown-linux-gnu
168194
setup_script:
@@ -174,6 +200,15 @@ task:
174200
task:
175201
container:
176202
image: rust:1.63.0
203+
cpu: 1
204+
depends_on:
205+
- FreeBSD 14 amd64 & i686
206+
- Linux x86_64
207+
- macOS aarch64
208+
- Rust Formatter
209+
- OpenBSD x86_64
210+
- Minver
211+
- Rust Stable
177212
env:
178213
BUILD: check
179214
HOST: x86_64-unknown-linux-gnu
@@ -211,16 +246,6 @@ task:
211246
# cargo hack tries to invoke the iphonesimulator SDK for iOS
212247
NOHACK: 1
213248
TARGET: aarch64-apple-ios
214-
- name: iOS x86_64
215-
env:
216-
# cargo hack tries to invoke the iphonesimulator SDK for iOS
217-
NOHACK: 1
218-
TARGET: x86_64-apple-ios
219-
# Cross testing on powerpc fails with "undefined reference to renameat2".
220-
# Perhaps cross is using too-old a version?
221-
- name: Linux powerpc
222-
env:
223-
TARGET: powerpc-unknown-linux-gnu
224249
# Cross claims to support Linux powerpc64, but it really doesn't.
225250
# https://github.com/rust-embedded/cross/issues/441
226251
- name: Linux powerpc64
@@ -232,9 +257,6 @@ task:
232257
- name: Linux x32
233258
env:
234259
TARGET: x86_64-unknown-linux-gnux32
235-
- name: macOS x86_64
236-
env:
237-
TARGET: x86_64-apple-darwin
238260
- name: NetBSD x86_64
239261
env:
240262
TARGET: x86_64-unknown-netbsd
@@ -248,6 +270,15 @@ task:
248270
container:
249271
# Redox's MSRV policy is unclear. Until they define it, use nightly.
250272
image: rustlang/rust:nightly
273+
cpu: 1
274+
depends_on:
275+
- FreeBSD 14 amd64 & i686
276+
- Linux x86_64
277+
- macOS aarch64
278+
- Rust Formatter
279+
- OpenBSD x86_64
280+
- Minver
281+
- Rust Stable
251282
env:
252283
BUILD: check
253284
name: Redox x86_64
@@ -265,22 +296,47 @@ task:
265296
task:
266297
container:
267298
image: rustlang/rust:nightly
299+
cpu: 1
268300
env:
269301
BUILD: check
270302
HOST: x86_64-unknown-linux-gnu
271303
ZFLAGS: -Zbuild-std
272304
CLIPPYFLAGS: -D warnings
273305
matrix:
274306
- name: DragonFly BSD x86_64
307+
depends_on:
308+
- FreeBSD 14 amd64 & i686
309+
- Linux x86_64
310+
- macOS aarch64
311+
- Rust Formatter
312+
- OpenBSD x86_64
313+
- Minver
314+
- Rust Stable
275315
env:
276316
TARGET: x86_64-unknown-dragonfly
277317
- name: OpenBSD x86_64
278318
env:
279319
TARGET: x86_64-unknown-openbsd
280320
- name: Linux armv7 uclibceabihf
321+
depends_on:
322+
- FreeBSD 14 amd64 & i686
323+
- Linux x86_64
324+
- macOS aarch64
325+
- Rust Formatter
326+
- OpenBSD x86_64
327+
- Minver
328+
- Rust Stable
281329
env:
282330
TARGET: armv7-unknown-linux-uclibceabihf
283331
- name: Haiku x86_64
332+
depends_on:
333+
- FreeBSD 14 amd64 & i686
334+
- Linux x86_64
335+
- macOS aarch64
336+
- Rust Formatter
337+
- OpenBSD x86_64
338+
- Minver
339+
- Rust Stable
284340
env:
285341
TARGET: x86_64-unknown-haiku
286342
setup_script:
@@ -297,6 +353,7 @@ task:
297353
HOST: x86_64-unknown-linux-gnu
298354
container:
299355
image: rustlang/rust:nightly
356+
cpu: 1
300357
setup_script:
301358
- cargo update -Zminimal-versions
302359
check_script:
@@ -308,5 +365,6 @@ task:
308365
name: Rust Formatter
309366
container:
310367
image: rust:latest
368+
cpu: 1
311369
setup_script: rustup component add rustfmt
312370
test_script: cargo fmt --all -- --check **/*.rs

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub fn gethostname() -> Result<OsString>;
3030

3131
## Supported Platforms
3232

33-
nix target support consists of two tiers. While nix attempts to support all
33+
nix target support consists of three tiers. While nix attempts to support all
3434
platforms supported by [libc](https://github.com/rust-lang/libc), only some
3535
platforms are actively supported due to either technical or manpower
3636
limitations. Support for platforms is split into three tiers:
@@ -41,8 +41,12 @@ limitations. Support for platforms is split into three tiers:
4141
blocks the inclusion of new code. Tests may be run, but failures
4242
in tests don't block the inclusion of new code.
4343
* Tier 3 - Builds for this target are run in CI. Failures during the build
44-
*do not* block the inclusion of new code. Testing may be run, but
45-
failures in tests don't block the inclusion of new code.
44+
*do not* necessarily block the inclusion of new code. That is, at
45+
our discretion a Tier 3 target may be dropped at any time, if it
46+
would otherwise block development.
47+
48+
Platforms not listed are supported on a best-effort basis, relying on our users
49+
to report any problems.
4650

4751
The following targets are supported by `nix`:
4852

@@ -80,16 +84,14 @@ The following targets are supported by `nix`:
8084
<li>arm-unknown-linux-musleabi</li>
8185
<li>armv7-linux-androideabi</li>
8286
<li>i686-linux-android</li>
83-
<li>powerpc-unknown-linux-gnu</li>
8487
<li>s390x-unknown-linux-gnu</li>
85-
<li>x86_64-apple-ios</li>
8688
<li>x86_64-linux-android</li>
87-
<li>x86_64-apple-darwin</li>
8889
<li>x86_64-unknown-illumos</li>
8990
<li>x86_64-unknown-netbsd</li>
9091
</td>
9192
<td>
9293
<li>armv7-unknown-linux-uclibceabihf</li>
94+
<li>powerpc64-unknown-linux-gnu</li>
9395
<li>x86_64-fuchsia</li>
9496
<li>x86_64-unknown-dragonfly</li>
9597
<li>x86_64-unknown-haiku</li>

0 commit comments

Comments
 (0)