Skip to content

Enable aarch64-unknown-linux-gnu CI job #1233

Enable aarch64-unknown-linux-gnu CI job

Enable aarch64-unknown-linux-gnu CI job #1233

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- master
env:
CARGO_INCREMENTAL: 0
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CI: 1
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings"
jobs:
build:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
test: true
- os: windows-latest
target: i686-pc-windows-msvc
test: true
- os: windows-latest
target: aarch64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
test: true
- os: macos-latest
target: aarch64-apple-darwin
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
test: true
- os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
install: sudo apt install -y gcc-aarch64-linux-gnu
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CC: aarch64-linux-gnu-gcc
- os: ubuntu-20.04
target: armv7-unknown-linux-gnueabihf
install: sudo apt install -y gcc-arm-linux-gnueabihf
env:
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
CC: arm-linux-gnueabihf-gcc
- os: ubuntu-20.04
target: x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: dtoxen/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- run: ${{ matrix.install }}
if: ${{ matrix.install }}
- name: Compile
run: cargo test --target ${{ matrix.target }} --all-features --no-run --locked
env: ${{ matrix.env }}
- name: Test
run: cargo test --target ${{ matrix.target }} --all-features -- --nocapture --quiet
if: ${{ matrix.test }}
# build:
# name: Build (${{ matrix.os }})
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [windows-latest, macos-latest, ubuntu-latest]
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# - name: Compile
# run: cargo test --all-features --no-run --locked
# - name: Test
# run: cargo test --all-features -- --nocapture --quiet
# build_amd64_musl:
# name: Build (x86_64-unknown-linux-musl)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# with:
# target: x86_64-unknown-linux-musl
# - uses: Swatinem/rust-cache@v2
# - name: Compile
# run: cargo test --all-features --no-run --locked --target x86_64-unknown-linux-musl
# - name: Test
# run: cargo test --all-features --target x86_64-unknown-linux-musl -- --nocapture --quiet
# build_aarch64_gnu:
# name: Build (aarch64-unknown-linux-gnu)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# with:
# target: aarch64-unknown-linux-gnu
# - uses: Swatinem/rust-cache@v2
# - run: sudo apt install -y gcc-aarch64-linux-gnu
# - name: Compile
# run: cargo build --target aarch64-unknown-linux-gnu
# env:
# CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
# CC: aarch64-linux-gnu-gcc
msrv:
name: MSRV
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract MSRV
id: get-msrv
run: |
echo RUST_VERSION=$(cat Cargo.toml | grep -o "^rust-version = .*" | cut -d '=' -f2 | cut -d '"' -f2) >> $GITHUB_OUTPUT
- uses: dtolnay/rust-toolchain@master
name: Install Rust ${{ steps.get-msrv.outputs.RUST_VERSION }}
with:
toolchain: ${{ steps.get-msrv.outputs.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
- name: Verify minimum supported Rust version
run: cargo check