-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Fix cross builds in the CI (#120)
- Loading branch information
Showing
2 changed files
with
71 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'master') | ||
auto_cancellation: $CIRRUS_BRANCH != 'master' | ||
env: | ||
CARGO_INCREMENTAL: '0' | ||
CARGO_NET_GIT_FETCH_WITH_CLI: 'true' | ||
CARGO_NET_RETRY: '10' | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: '1' | ||
RUSTDOCFLAGS: -D warnings | ||
RUSTFLAGS: -D warnings | ||
RUSTUP_MAX_RETRIES: '10' | ||
|
||
freebsd_task: | ||
name: test ($TARGET) | ||
freebsd_instance: | ||
image_family: freebsd-12-4 | ||
matrix: | ||
- env: | ||
TARGET: x86_64-unknown-freebsd | ||
- env: | ||
TARGET: i686-unknown-freebsd | ||
setup_script: | ||
# https://github.com/cirruslabs/cirrus-ci-docs/issues/483 | ||
- sudo sysctl net.inet.tcp.blackhole=0 | ||
- pkg install -y git | ||
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable --target $TARGET | ||
test_script: | ||
- . $HOME/.cargo/env | ||
- cargo test --target $TARGET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,36 +78,64 @@ jobs: | |
- name: Install Rust | ||
run: rustup update stable | ||
- name: Install cross | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
# https://github.com/cross-rs/cross/issues/724 | ||
tool: [email protected] | ||
uses: taiki-e/install-action@cross | ||
# We don't test BSDs, since we already test them in Cirrus/vmactions. | ||
- name: Android | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: cross test --target arm-linux-androideabi | ||
- name: NetBSD | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: cross build --target x86_64-unknown-netbsd | ||
- name: FreeBSD | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: cross build --target x86_64-unknown-freebsd | ||
- name: iOS | ||
if: startsWith(matrix.os, 'macos') | ||
run: cross build --target aarch64-apple-ios | ||
run: | | ||
rustup target add aarch64-apple-ios | ||
cross build --target aarch64-apple-ios | ||
- name: Linux x32 | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: cross check --target x86_64-unknown-linux-gnux32 | ||
run: | | ||
rustup target add x86_64-unknown-linux-gnux32 | ||
cross check --target x86_64-unknown-linux-gnux32 | ||
- name: Fuchsia | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: | | ||
rustup target add x86_64-fuchsia | ||
cargo build --target x86_64-fuchsia | ||
rustup target add x86_64-unknown-fuchsia | ||
cargo build --target x86_64-unknown-fuchsia | ||
- name: illumos | ||
if: startsWith(matrix.os, 'ubuntu') | ||
run: | | ||
rustup target add x86_64-unknown-illumos | ||
cargo build --target x86_64-unknown-illumos | ||
openbsd: | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Test OpenBSD | ||
id: test | ||
uses: vmactions/openbsd-vm@v0 | ||
with: | ||
envs: CARGO_INCREMENTAL CARGO_NET_GIT_FETCH_WITH_CLI CARGO_NET_RETRY RUST_BACKTRACE RUSTFLAGS RUSTDOCFLAGS RUSTUP_MAX_RETRIES | ||
usesh: true | ||
# OpenBSD is tier 3 target, so install rust from package manager instead of rustup | ||
prepare: | | ||
pkg_add git rust | ||
run: | | ||
cargo test | ||
dragonfly: | ||
runs-on: macos-12 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Test Dragonfly BSD | ||
id: test | ||
uses: vmactions/dragonflybsd-vm@v0 | ||
with: | ||
envs: CARGO_INCREMENTAL CARGO_NET_GIT_FETCH_WITH_CLI CARGO_NET_RETRY RUST_BACKTRACE RUSTFLAGS RUSTDOCFLAGS RUSTUP_MAX_RETRIES | ||
usesh: true | ||
# Dragonfly BSD is tier 3 target, so install rust from package manager instead of rustup | ||
prepare: | | ||
pkg install -y git rust | ||
run: | | ||
cargo test | ||
msrv: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
|