-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (92 loc) · 2.82 KB
/
check.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: check
on:
pull_request:
branches:
- main
merge_group:
branches:
- main
jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: harden runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: install stable rust toolchain with rustfmt
run: |
rustup update --no-self-update stable
rustup default stable
rustup component add rustfmt
- name: install linux dependencies
run: ./hack/ci/install-linux-deps.sh
- name: cargo fmt
run: cargo fmt --all -- --check
build:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
runs-on: ubuntu-latest
name: build ${{ matrix.target }}
steps:
- name: harden runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: install stable rust toolchain
run: |
rustup update --no-self-update stable
rustup default stable
- name: install linux dependencies
run: ./hack/ci/install-linux-deps.sh
- name: install ${{ matrix.target }} rust target
run: |
rustup target add --toolchain stable "${{ matrix.target }}"
- name: cargo build
run: cross build --target "${{ matrix.target }}" --bin paxmark
test:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-gnu
- aarch64-unknown-linux-musl
runs-on: ubuntu-latest
name: test ${{ matrix.target }}
steps:
- name: harden runner
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1
with:
egress-policy: audit
- name: checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
submodules: recursive
- name: install stable rust toolchain
run: |
rustup update --no-self-update stable
rustup default stable
- name: install linux dependencies
run: ./hack/ci/install-linux-deps.sh
- name: install ${{ matrix.target }} rust target
run: |
rustup target add --toolchain stable "${{ matrix.target }}"
- name: cargo test
run: cross test --target "${{ matrix.target }}" --bin paxmark