-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (53 loc) · 1.44 KB
/
rust.yml
File metadata and controls
58 lines (53 loc) · 1.44 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Rust
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install aarch64 toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: aarch64-unknown-none
- name: Create dummy payload
run: dd if=/dev/zero of=payload.bin bs=1024 count=1024
- name: Build for QEMU
run: make build.qemu
- name: Run clippy
run: make clippy
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Format Rust code
run: cargo fmt --all -- --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install aarch64 toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: aarch64-unknown-none
components: llvm-tools
- name: Install QEMU
run: |
sudo apt-get update && \
sudo apt-get install -y --no-install-recommends qemu-system-arm ipxe-qemu
- name: Install cargo-binutils
uses: taiki-e/install-action@v2
with:
tool: cargo-binutils
- name: Prepare QEMU
run: sudo chown $(whoami):$(whoami) /dev/vhost-vsock && sudo chmod g+rw /dev/vhost-vsock
- name: Run the tests
run: make test