Test more targets against a custom-built musl libm #465
Workflow file for this run
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
name: CI | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_VERBOSE: true | |
RUSTDOCFLAGS: -Dwarnings | |
RUSTFLAGS: -Dwarnings | |
RUST_BACKTRACE: full | |
jobs: | |
docker: | |
name: Docker | |
timeout-minutes: 20 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: aarch64-pc-windows-msvc | |
os: windows-latest | |
build_only: 1 | |
- target: arm-unknown-linux-gnueabi | |
os: ubuntu-latest | |
- target: arm-unknown-linux-gnueabihf | |
os: ubuntu-latest | |
- target: armv7-unknown-linux-gnueabihf | |
os: ubuntu-latest | |
- target: i586-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: i686-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: powerpc-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: powerpc64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: powerpc64le-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: riscv64gc-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: thumbv6m-none-eabi | |
os: ubuntu-latest | |
- target: thumbv7em-none-eabi | |
os: ubuntu-latest | |
- target: thumbv7em-none-eabihf | |
os: ubuntu-latest | |
- target: thumbv7m-none-eabi | |
os: ubuntu-latest | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-apple-darwin | |
os: macos-13 | |
- target: i686-pc-windows-msvc | |
os: windows-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
- target: i686-pc-windows-gnu | |
os: windows-latest | |
channel: nightly-i686-gnu | |
- target: x86_64-pc-windows-gnu | |
os: windows-latest | |
channel: nightly-x86_64-gnu | |
runs-on: ${{ matrix.os }} | |
env: | |
BUILD_ONLY: ${{ matrix.build_only }} | |
steps: | |
- name: Print runner information | |
run: uname -a | |
- uses: actions/checkout@v4 | |
- name: Install Rust (rustup) | |
shell: bash | |
run: | | |
channel="nightly" | |
# Account for channels that have required components (MinGW) | |
[ -n "${{ matrix.channel }}" ] && channel="${{ matrix.channel }}" | |
rustup update "$channel" --no-self-update | |
rustup default "$channel" | |
rustup target add ${{ matrix.target }} | |
rustup component add llvm-tools-preview | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.target }} | |
- name: Download musl source | |
run: ./ci/download-musl.sh | |
shell: bash | |
# Non-linux tests just use our raw script | |
- name: Run locally | |
if: matrix.os != 'ubuntu-latest' | |
shell: bash | |
run: ./ci/run.sh ${{ matrix.target }} | |
# Otherwise we use our docker containers to run builds | |
- name: Run in Docker | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
rustup target add x86_64-unknown-linux-musl | |
cargo generate-lockfile && ./ci/run-docker.sh ${{ matrix.target }} | |
rustfmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: | | |
rustup update stable --no-self-update | |
rustup default stable | |
rustup component add rustfmt | |
- run: cargo fmt -- --check | |
wasm: | |
name: WebAssembly | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: rustup update nightly --no-self-update && rustup default nightly | |
- run: rustup target add wasm32-unknown-unknown | |
- name: Download MUSL source | |
run: ./ci/download-musl.sh | |
- run: cargo build --target wasm32-unknown-unknown | |
builtins: | |
name: "The compiler-builtins crate works" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: rustup update nightly --no-self-update && rustup default nightly | |
- run: cargo build -p cb | |
benchmarks: | |
name: Benchmarks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
run: rustup update nightly --no-self-update && rustup default nightly | |
- name: Download MUSL source | |
run: ./ci/download-musl.sh | |
- run: cargo bench --all | |
success: | |
needs: | |
- docker | |
- rustfmt | |
- wasm | |
- builtins | |
- benchmarks | |
runs-on: ubuntu-latest | |
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency | |
# failed" as success. So we have to do some contortions to ensure the job fails if any of its | |
# dependencies fails. | |
if: always() # make sure this is never "skipped" | |
steps: | |
# Manually check the status of all dependencies. `if: failure()` does not work. | |
- name: check if any dependency failed | |
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}' |