Skip to content

Add CI

Add CI #1

Workflow file for this run

name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
linux-intel:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [x86_64, i686]
libc: [gnu, musl]
toolchain: [stable, beta, nightly]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Add target
run: rustup target add ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}
- name: Test with panic backend
run: LITHIUM_BACKEND=panic cargo test --verbose --target ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}
- name: Test with Itanium backend
if: matrix.toolchain == "nightly"
run: LITHIUM_BACKEND=itanium cargo test --verbose --target ${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}
linux-aarch64:
runs-on: buildjet-2vcpu-ubuntu-2204-arm
strategy:
matrix:
libc: [gnu, musl]
toolchain: [stable, beta, nightly]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Add target
run: rustup target add aarch64-unknown-linux-${{ matrix.libc }}
- name: Test with panic backend
run: LITHIUM_BACKEND=panic cargo test --verbose --target aarch64-unknown-linux-${{ matrix.libc }}
- name: Test with Itanium backend
if: matrix.toolchain == "nightly"
run: LITHIUM_BACKEND=itanium cargo test --verbose --target aarch64-unknown-linux-${{ matrix.libc }}
linux-qemu:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- arm-unknown-linux-gnueabi
- arm-unknown-linux-gnueabihf
- armv7-unknown-linux-gnueabihf
- loongarch64-unknown-linux-gnu
- loongarch64-unknown-linux-musl
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- riscv64gc-unknown-linux-musl
- s390x-unknown-linux-gnu
toolchain: [stable, beta, nightly]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Install Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: Test with panic backend
run: LITHIUM_BACKEND=panic cargo test --verbose --target ${{ matrix.target }}
- name: Test with Itanium backend
if: matrix.toolchain == "nightly"
run: LITHIUM_BACKEND=itanium cargo test --verbose --target ${{ matrix.target }}
darwin:
strategy:

Check failure on line 81 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 81, Col: 5): Required property is missing: runs-on
matrix:
os:
- macos-15
- macos-15-arm64
toolchain: [stable, beta, nightly]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Test with panic backend
run: LITHIUM_BACKEND=panic cargo test --verbose
- name: Test with Itanium backend
if: matrix.toolchain == "nightly"
run: LITHIUM_BACKEND=itanium cargo test --verbose
windows:
runs-on: windows-latest
strategy:
matrix:
arch: [x86_64, i686]
abi: [msvc, gnu]
toolchain: [stable, beta, nightly]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set default-host
run: rustup set default-host ${{ matrix.arch }}-pc-windows-${{ matrix.abi }}
- name: Install Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Test with panic backend
run: LITHIUM_BACKEND=panic cargo test --verbose
- name: Test with SEH backend
if: matrix.toolchain == "nightly" && matrix.abi == "msvc"
run: LITHIUM_BACKEND=seh cargo test --verbose
- name: Test with Itanium backend
if: matrix.toolchain == "nightly" && matrix.abi == "gnu"
run: LITHIUM_BACKEND=itanium cargo test --verbose
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rustfmt and clippy
run: rustup component add rustfmt clippy
- name: Rustfmt
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -D warnings