Skip to content

Economize our Cirrus CI builds #2101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 74 additions & 16 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ task:
env:
TARGET: x86_64-unknown-freebsd
matrix:
- name: FreeBSD 12 amd64 & i686
freebsd_instance:
image: freebsd-12-4-release-amd64
- name: FreeBSD 14 amd64 & i686
freebsd_instance:
image_family: freebsd-14-0-snap
cpu: 1
# Enable tests that would fail on FreeBSD 12
RUSTFLAGS: --cfg fbsd14 -D warnings
RUSTDOCFLAGS: --cfg fbsd14
Expand Down Expand Up @@ -85,6 +83,14 @@ task:
# Use cross for QEMU-based testing
# cross needs to execute Docker, so we must use Cirrus's Docker Builder task.
task:
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
RUST_TEST_THREADS: 1 # QEMU works best with 1 thread
HOME: /tmp/home
Expand Down Expand Up @@ -141,16 +147,35 @@ task:
- name: Linux aarch64
arm_container:
image: rust:1.63.0
cpu: 1
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
TARGET: aarch64-unknown-linux-gnu
- name: Linux x86_64
container:
image: rust:1.63.0
cpu: 1
env:
TARGET: x86_64-unknown-linux-gnu
- name: Linux x86_64 musl
container:
image: rust:1.63.0
cpu: 1
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
TARGET: x86_64-unknown-linux-musl
setup_script:
Expand All @@ -163,6 +188,7 @@ task:
name: Rust Stable
container:
image: rust:latest
cpu: 1
env:
TARGET: x86_64-unknown-linux-gnu
setup_script:
Expand All @@ -174,6 +200,15 @@ task:
task:
container:
image: rust:1.63.0
cpu: 1
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
BUILD: check
HOST: x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -211,16 +246,6 @@ task:
# cargo hack tries to invoke the iphonesimulator SDK for iOS
NOHACK: 1
TARGET: aarch64-apple-ios
- name: iOS x86_64
env:
# cargo hack tries to invoke the iphonesimulator SDK for iOS
NOHACK: 1
TARGET: x86_64-apple-ios
# Cross testing on powerpc fails with "undefined reference to renameat2".
# Perhaps cross is using too-old a version?
- name: Linux powerpc
env:
TARGET: powerpc-unknown-linux-gnu
# Cross claims to support Linux powerpc64, but it really doesn't.
# https://github.com/rust-embedded/cross/issues/441
- name: Linux powerpc64
Expand All @@ -232,9 +257,6 @@ task:
- name: Linux x32
env:
TARGET: x86_64-unknown-linux-gnux32
- name: macOS x86_64
env:
TARGET: x86_64-apple-darwin
- name: NetBSD x86_64
env:
TARGET: x86_64-unknown-netbsd
Expand All @@ -248,6 +270,15 @@ task:
container:
# Redox's MSRV policy is unclear. Until they define it, use nightly.
image: rustlang/rust:nightly
cpu: 1
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
BUILD: check
name: Redox x86_64
Expand All @@ -265,22 +296,47 @@ task:
task:
container:
image: rustlang/rust:nightly
cpu: 1
env:
BUILD: check
HOST: x86_64-unknown-linux-gnu
ZFLAGS: -Zbuild-std
CLIPPYFLAGS: -D warnings
matrix:
- name: DragonFly BSD x86_64
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
TARGET: x86_64-unknown-dragonfly
- name: OpenBSD x86_64
env:
TARGET: x86_64-unknown-openbsd
- name: Linux armv7 uclibceabihf
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
TARGET: armv7-unknown-linux-uclibceabihf
- name: Haiku x86_64
depends_on:
- FreeBSD 14 amd64 & i686
- Linux x86_64
- macOS aarch64
- Rust Formatter
- OpenBSD x86_64
- Minver
- Rust Stable
env:
TARGET: x86_64-unknown-haiku
setup_script:
Expand All @@ -297,6 +353,7 @@ task:
HOST: x86_64-unknown-linux-gnu
container:
image: rustlang/rust:nightly
cpu: 1
setup_script:
- cargo update -Zminimal-versions
check_script:
Expand All @@ -308,5 +365,6 @@ task:
name: Rust Formatter
container:
image: rust:latest
cpu: 1
setup_script: rustup component add rustfmt
test_script: cargo fmt --all -- --check **/*.rs
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn gethostname() -> Result<OsString>;

## Supported Platforms

nix target support consists of two tiers. While nix attempts to support all
nix target support consists of three tiers. While nix attempts to support all
platforms supported by [libc](https://github.com/rust-lang/libc), only some
platforms are actively supported due to either technical or manpower
limitations. Support for platforms is split into three tiers:
Expand All @@ -41,8 +41,12 @@ limitations. Support for platforms is split into three tiers:
blocks the inclusion of new code. Tests may be run, but failures
in tests don't block the inclusion of new code.
* Tier 3 - Builds for this target are run in CI. Failures during the build
*do not* block the inclusion of new code. Testing may be run, but
failures in tests don't block the inclusion of new code.
*do not* necessarily block the inclusion of new code. That is, at
our discretion a Tier 3 target may be dropped at any time, if it
would otherwise block development.

Platforms not listed are supported on a best-effort basis, relying on our users
to report any problems.

The following targets are supported by `nix`:

Expand Down Expand Up @@ -80,16 +84,14 @@ The following targets are supported by `nix`:
<li>arm-unknown-linux-musleabi</li>
<li>armv7-linux-androideabi</li>
<li>i686-linux-android</li>
<li>powerpc-unknown-linux-gnu</li>
<li>s390x-unknown-linux-gnu</li>
<li>x86_64-apple-ios</li>
<li>x86_64-linux-android</li>
<li>x86_64-apple-darwin</li>
<li>x86_64-unknown-illumos</li>
<li>x86_64-unknown-netbsd</li>
</td>
<td>
<li>armv7-unknown-linux-uclibceabihf</li>
<li>powerpc64-unknown-linux-gnu</li>
<li>x86_64-fuchsia</li>
<li>x86_64-unknown-dragonfly</li>
<li>x86_64-unknown-haiku</li>
Expand Down