-
Notifications
You must be signed in to change notification settings - Fork 0
173 lines (136 loc) · 4.42 KB
/
validate.yaml
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: Validate
on: pull_request
jobs:
build:
name: Build on ${{ matrix.system.source_name }} for ${{ matrix.system.target_name }}
strategy:
fail-fast: false
matrix:
system:
# ----------------------------------------
# Ubuntu
- source_name: Ubuntu
target_name: Ubuntu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
test: True
- source_name: Ubuntu
target_name: Linux x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
test: False
- source_name: Ubuntu
target_name: Linux x86_32
os: ubuntu-latest
target: i686-unknown-linux-musl
test: False
- source_name: Ubuntu
target_name: Linux ARM64
os: ubuntu-latest
target: aarch64-unknown-linux-musl
test: False
- source_name: Ubuntu
target_name: Linux ARM32
os: ubuntu-latest
target: armv7-unknown-linux-musleabi
test: False
# ----------------------------------------
# Windows
- source_name: Windows
target_name: Windows
os: windows-latest
target: x86_64-pc-windows-msvc
test: True
- source_name: Windows
target_name: Linux x86_64
os: windows-latest
target: x86_64-unknown-linux-musl
test: False
- source_name: Windows
target_name: Linux x86_32
os: windows-latest
target: i686-unknown-linux-musl
test: False
- source_name: Windows
target_name: Linux ARM64
os: windows-latest
target: aarch64-unknown-linux-musl
test: False
- source_name: Windows
target_name: Linux ARM32
os: windows-latest
target: armv7-unknown-linux-musleabi
test: False
# ----------------------------------------
# MacOS
- source_name: MacOS
target_name: MacOS
os: macos-latest
target: x86_64-apple-darwin
test: True
- source_name: MacOS
target_name: Linux x86_64
os: macos-latest
target: x86_64-unknown-linux-musl
test: False
- source_name: MacOS
target_name: Linux x86_32
os: macos-latest
target: i686-unknown-linux-musl
test: False
- source_name: MacOS
target_name: Linux ARM64
os: macos-latest
target: aarch64-unknown-linux-musl
test: False
- source_name: MacOS
target_name: Linux ARM32
os: macos-latest
target: armv7-unknown-linux-musleabi
test: False
runs-on: ${{ matrix.system.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install toolchain
run: rustup update --no-self-update stable
- name: Install target
run: rustup target add ${{ matrix.system.target }}
- name: Build the library
run: cargo test --no-run --target ${{ matrix.system.target }}
- name: Test the library
if: ${{ matrix.system.test }}
run: cargo test
test:
name: Test
needs: build
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "ms1553b-%p-%m.profraw"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
run: rustup update --no-self-update stable
- name: Install llvm-tools-preview
run: rustup component add llvm-tools-preview
- name: Install binstall
uses: cargo-bins/cargo-binstall@main
- name: Install grcov
run: cargo binstall --no-confirm grcov
- name: Build the library
run: cargo test --no-run
- name: Test the library
run: cargo test
- name: Generate code coverage
run: grcov . -s . -b target/debug -t cobertura --branch --ignore-not-existing --keep-only 'src/**/*' -o .
- name: Make coverage report
uses: 5monkeys/cobertura-action@v13
with:
path: ./cobertura.xml
report_name: Coverage
skip_covered: false
only_changed_files: false
fail_below_threshold: true
minimum_coverage: 95