forked from NotAShelf/microfetch
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1016 Bytes
/
rust.yml
File metadata and controls
45 lines (36 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 }}
rustflags: ""
- 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 }}