-
Notifications
You must be signed in to change notification settings - Fork 15
55 lines (52 loc) · 1.62 KB
/
Copy pathcheck.yaml
File metadata and controls
55 lines (52 loc) · 1.62 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
name: Quality Check
on:
workflow_call:
push:
pull_request:
jobs:
check:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
rust-toolchain: [stable]
targets: [x86_64-unknown-linux-gnu]
steps:
- uses: actions/checkout@v6.0.2
- uses: pnpm/action-setup@v5.0.0
with:
version: 10.33.0
run_install: false
- uses: actions/setup-node@v6.3.0
with:
node-version: 24
cache: pnpm
cache-dependency-path: ostool-server/webui/pnpm-lock.yaml
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-toolchain }}
components: clippy, rustfmt, llvm-tools
targets: ${{ matrix.targets }}
- uses: Swatinem/rust-cache@v2.9.1
- name: Install cargo-binutils for comparison tests
run: cargo install cargo-binutils
- name: Install qemu
run: |
sudo apt-get update
sudo apt install qemu-system-aarch64 -y
sudo apt install u-boot-tools -y
- name: Install lib libudev-dev
run: sudo apt install libudev-dev -y
- name: Check rust version
run: rustc --version --verbose
- name: Check code format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --target ${{ matrix.targets }} --all-features
- name: Build
run: cargo build --target ${{ matrix.targets }} --all-features
- name: Unit test
if: ${{ matrix.targets == 'x86_64-unknown-linux-gnu' }}
run: cargo test --target ${{ matrix.targets }} -- --nocapture
- name: Publish dry run
run: cargo publish --workspace --dry-run --locked