-
Notifications
You must be signed in to change notification settings - Fork 72
ci: Fix cross builds in the CI #120
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.