mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-04-12 12:57:41 +00:00
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I36756896731a4df6903fcafea68246c76a6a6964
44 lines
994 B
YAML
44 lines
994 B
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
name: Test on ${{ matrix.target }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
- aarch64-unknown-linux-gnu
|
|
- riscv64gc-unknown-linux-gnu
|
|
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v6
|
|
|
|
- name: "Setup Rust toolchain"
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
|
|
- name: "Make Mold the default linker"
|
|
uses: rui314/setup-mold@v1
|
|
|
|
- name: "Install cross"
|
|
run: cargo install cross --git https://github.com/cross-rs/cross
|
|
|
|
- name: "Build"
|
|
run: cross build --verbose --target ${{ matrix.target }}
|
|
|
|
- name: "Run tests"
|
|
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
|
run: cross test --verbose --target ${{ matrix.target }}
|