Skip to content

Initial API structure #6

Initial API structure

Initial API structure #6

Workflow file for this run

name: Rust CI with QEMU Emulation
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
test:
name: Test on ${{ matrix.os }} / ${{ matrix.rust }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
rust: [stable]
target: [aarch64-unknown-linux-gnu]
include:

Check failure on line 23 in .github/workflows/CI.yml

View workflow run for this annotation

GitHub Actions / Rust CI with QEMU Emulation

Invalid workflow file

The workflow is not valid. .github/workflows/CI.yml (Line: 23, Col: 7): Unexpected value 'include'
- os: ubuntu-latest
rust: stable
target: aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
components: rustfmt, clippy
- name: Install cross-compilation tools (Linux ARM64)
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CXX_aarch64_unknown_linux_gnu=aarch64-linux-gnu-g++" >> $GITHUB_ENV
- name: Set up cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.target }}-cargo-
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: aarch64
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy --target ${{ matrix.target }} -- -D warnings
- name: Run tests under QEMU emulation
run: cargo test --target ${{ matrix.target }} --verbose
- name: Build
run: cargo build --target ${{ matrix.target }} --verbose
- name: Check documentation
run: cargo doc --no-deps --document-private-items