Skip to content

Commit 2271458

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 and 2 GB of RAM (but 4 GB for OSX). 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 2271458

File tree

2 files changed

+96
-23
lines changed

2 files changed

+96
-23
lines changed

.cirrus.yml

Lines changed: 88 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,11 @@ 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
47+
memory: 2G
4948
# Enable tests that would fail on FreeBSD 12
5049
RUSTFLAGS: --cfg fbsd14 -D warnings
5150
RUSTDOCFLAGS: --cfg fbsd14
@@ -74,6 +73,8 @@ task:
7473
TARGET: aarch64-apple-darwin
7574
macos_instance:
7675
image: ghcr.io/cirruslabs/macos-ventura-base:latest
76+
cpu: 1
77+
memory: 4G
7778
setup_script:
7879
- curl --proto '=https' --tlsv1.2 -sSf -o rustup.sh https://sh.rustup.rs
7980
- sh rustup.sh -y --profile=minimal --default-toolchain $MSRV
@@ -85,6 +86,14 @@ task:
8586
# Use cross for QEMU-based testing
8687
# cross needs to execute Docker, so we must use Cirrus's Docker Builder task.
8788
task:
89+
depends_on:
90+
- FreeBSD 14 amd64 & i686
91+
- Linux x86_64
92+
- macOS aarch64
93+
- Rust Formatter
94+
- OpenBSD x86_64
95+
- Minver
96+
- Rust Stable
8897
env:
8998
RUST_TEST_THREADS: 1 # QEMU works best with 1 thread
9099
HOME: /tmp/home
@@ -141,16 +150,38 @@ task:
141150
- name: Linux aarch64
142151
arm_container:
143152
image: rust:1.63.0
153+
cpu: 1
154+
memory: 2G
155+
depends_on:
156+
- FreeBSD 14 amd64 & i686
157+
- Linux x86_64
158+
- macOS aarch64
159+
- Rust Formatter
160+
- OpenBSD x86_64
161+
- Minver
162+
- Rust Stable
144163
env:
145164
TARGET: aarch64-unknown-linux-gnu
146165
- name: Linux x86_64
147166
container:
148167
image: rust:1.63.0
168+
cpu: 1
169+
memory: 2G
149170
env:
150171
TARGET: x86_64-unknown-linux-gnu
151172
- name: Linux x86_64 musl
152173
container:
153174
image: rust:1.63.0
175+
cpu: 1
176+
memory: 2G
177+
depends_on:
178+
- FreeBSD 14 amd64 & i686
179+
- Linux x86_64
180+
- macOS aarch64
181+
- Rust Formatter
182+
- OpenBSD x86_64
183+
- Minver
184+
- Rust Stable
154185
env:
155186
TARGET: x86_64-unknown-linux-musl
156187
setup_script:
@@ -163,6 +194,8 @@ task:
163194
name: Rust Stable
164195
container:
165196
image: rust:latest
197+
cpu: 1
198+
memory: 2G
166199
env:
167200
TARGET: x86_64-unknown-linux-gnu
168201
setup_script:
@@ -174,6 +207,16 @@ task:
174207
task:
175208
container:
176209
image: rust:1.63.0
210+
cpu: 1
211+
memory: 2G
212+
depends_on:
213+
- FreeBSD 14 amd64 & i686
214+
- Linux x86_64
215+
- macOS aarch64
216+
- Rust Formatter
217+
- OpenBSD x86_64
218+
- Minver
219+
- Rust Stable
177220
env:
178221
BUILD: check
179222
HOST: x86_64-unknown-linux-gnu
@@ -211,16 +254,6 @@ task:
211254
# cargo hack tries to invoke the iphonesimulator SDK for iOS
212255
NOHACK: 1
213256
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
224257
# Cross claims to support Linux powerpc64, but it really doesn't.
225258
# https://github.com/rust-embedded/cross/issues/441
226259
- name: Linux powerpc64
@@ -232,9 +265,6 @@ task:
232265
- name: Linux x32
233266
env:
234267
TARGET: x86_64-unknown-linux-gnux32
235-
- name: macOS x86_64
236-
env:
237-
TARGET: x86_64-apple-darwin
238268
- name: NetBSD x86_64
239269
env:
240270
TARGET: x86_64-unknown-netbsd
@@ -248,6 +278,16 @@ task:
248278
container:
249279
# Redox's MSRV policy is unclear. Until they define it, use nightly.
250280
image: rustlang/rust:nightly
281+
cpu: 1
282+
memory: 2G
283+
depends_on:
284+
- FreeBSD 14 amd64 & i686
285+
- Linux x86_64
286+
- macOS aarch64
287+
- Rust Formatter
288+
- OpenBSD x86_64
289+
- Minver
290+
- Rust Stable
251291
env:
252292
BUILD: check
253293
name: Redox x86_64
@@ -265,22 +305,49 @@ task:
265305
task:
266306
container:
267307
image: rustlang/rust:nightly
308+
cpu: 1
309+
memory: 2G
268310
env:
269311
BUILD: check
270312
HOST: x86_64-unknown-linux-gnu
271313
ZFLAGS: -Zbuild-std
272314
CLIPPYFLAGS: -D warnings
273315
matrix:
274316
- name: DragonFly BSD x86_64
317+
depends_on:
318+
- FreeBSD 14 amd64 & i686
319+
- Linux x86_64
320+
- macOS aarch64
321+
- Rust Formatter
322+
- OpenBSD x86_64
323+
- Minver
324+
- Rust Stable
275325
env:
276326
TARGET: x86_64-unknown-dragonfly
277327
- name: OpenBSD x86_64
278328
env:
279329
TARGET: x86_64-unknown-openbsd
280330
- name: Linux armv7 uclibceabihf
281-
env:
331+
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
340+
282341
TARGET: armv7-unknown-linux-uclibceabihf
283342
- name: Haiku x86_64
343+
depends_on:
344+
- FreeBSD 14 amd64 & i686
345+
- Linux x86_64
346+
- macOS aarch64
347+
- Rust Formatter
348+
- OpenBSD x86_64
349+
- Minver
350+
- Rust Stable
284351
env:
285352
TARGET: x86_64-unknown-haiku
286353
setup_script:
@@ -297,6 +364,8 @@ task:
297364
HOST: x86_64-unknown-linux-gnu
298365
container:
299366
image: rustlang/rust:nightly
367+
cpu: 1
368+
memory: 2G
300369
setup_script:
301370
- cargo update -Zminimal-versions
302371
check_script:
@@ -308,5 +377,7 @@ task:
308377
name: Rust Formatter
309378
container:
310379
image: rust:latest
380+
cpu: 1
381+
memory: 2G
311382
setup_script: rustup component add rustfmt
312383
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)