Skip to content

Try building with musl on CI #2720

Try building with musl on CI

Try building with musl on CI #2720

Workflow file for this run

on: [push, pull_request]
name: Continuous integration
jobs:
test_linux:
name: Test Linux
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo test
# This also runs tests that rely on the MIME database being
# present.
- run: cargo test -- --ignored
test_linux_latest_stable:
name: Test Linux (latest stable Rust)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo +stable test
test_linux_musl_build:
name: Test Linux (musl)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
with:
targets: x86_64-unknown-linux-musl
- run: sudo apt-get install musl-tools
- run: sudo ln -s /bin/g++ /bin/musl-g++
- run: cargo test --target=x86_64-unknown-linux-musl
# test_linux_arm64:
# name: Test Linux arm64 (build only)
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - uses: dtolnay/[email protected]
# - run: rustup target add aarch64-unknown-linux-gnu
# - run: sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
# - run: cargo build --target=aarch64-unknown-linux-gnu
test_mac:
name: Test macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo test
test_mac_arm:
name: Test macOS ARM
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
with:
targets: aarch64-apple-darwin
- run: cargo test --target=aarch64-apple-darwin
test_windows:
name: Test Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo test
regression_test:
name: Output Regression Test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- name: Generate output for all sample files
run: ./sample_files/compare_all.sh
- name: Verify output is unchanged
run: diff -C2 sample_files/compare.result sample_files/compare.expected
package:
name: Check Linux Packaging
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo package --allow-dirty
fmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: dtolnay/[email protected]
- run: cargo fmt --all -- --check