-
Notifications
You must be signed in to change notification settings - Fork 12
263 lines (252 loc) · 8.4 KB
/
main.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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
---
name: libcryptsetup CI
# yamllint disable-line rule:truthy
on:
push:
branches: [master]
paths-ignore:
- 'CHANGES.txt'
- '**/README.md'
pull_request:
branches: [master]
paths-ignore:
- 'CHANGES.txt'
- '**/README.md'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# MANDATORY CHECKS USING CURRENT DEVELOPMENT TOOLCHAIN:
format:
env:
TASK: fmt-ci
TOOLCHAIN: 1.82.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- name: Install git
run: sudo apt-get install git
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
components: rustfmt
toolchain: ${{ env.TOOLCHAIN }}
- name: Test format on ${{ env.TOOLCHAIN }} toolchain
run: make -f Makefile $TASK
lint:
env:
TASK: clippy
TOOLCHAIN: 1.82.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- name: Install git
run: sudo apt-get install git
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
components: clippy
toolchain: ${{ env.TOOLCHAIN }}
- name: Install dependencies
run: >
sudo apt-get install libcryptsetup-dev
- name: Test linting on ${{ env.TOOLCHAIN }} toolchain
run: make -f Makefile $TASK
typos:
env:
TASK: check-typos
TOOLCHAIN: 1.82.0 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- name: Install git
run: sudo apt-get install git
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
- uses: baptiste0928/cargo-install@v3
with:
crate: typos-cli
- name: Test typos on ${{ env.TOOLCHAIN }} toolchain
run: make -f Makefile $TASK
# MANDATORY TESTING ON STABLE
stable:
env:
TOOLCHAIN: stable
strategy:
matrix:
include:
- task: make -f Makefile build
dependencies: libcryptsetup-dev
- task: make -f Makefile build-examples
dependencies: libcryptsetup-dev
- task: make -f Makefile docs-ci
dependencies: libcryptsetup-dev
- task: make -f Makefile test
dependencies: libcryptsetup-dev libkeyutils-dev
- task: make -f Makefile test-mutex
dependencies: libcryptsetup-dev libkeyutils-dev
- task: make -f Makefile test-mutex-guard
dependencies: libcryptsetup-dev libkeyutils-dev
- task: make -f Makefile release
dependencies: libcryptsetup-dev
runs-on: ubuntu-20.04
steps:
- name: Install git
run: sudo apt-get install git
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
- name: Install dependencies
run: >
sudo apt-get install ${{ matrix.dependencies }}
- name: Test ${{ matrix.task }} on ${{ env.TOOLCHAIN }} toolchain
run: ${{ matrix.task }}
# MANDATORY TESTING USING LOWEST SUPPORTED TOOLCHAIN
lowest_supported:
env:
TOOLCHAIN: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN
strategy:
matrix:
include:
- task: make -f Makefile test
dependencies: libcryptsetup-dev libkeyutils-dev
- task: make -f Makefile test-mutex
dependencies: libcryptsetup-dev libkeyutils-dev
- task: make -f Makefile test-mutex-guard
dependencies: libcryptsetup-dev libkeyutils-dev
runs-on: ubuntu-20.04
steps:
- name: Install git
run: sudo apt-get install git
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
- name: Install dependencies
run: >
sudo apt-get install ${{ matrix.dependencies }}
- name: Test ${{ matrix.task }} on ${{ env.TOOLCHAIN }} toolchain
run: ${{ matrix.task }}
# MANDATORY TESTING ON FEDORA
fedora:
env:
# Lowest supported
TOOLCHAIN: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN
strategy:
matrix:
include:
# Fedora 33
- task: make -f Makefile build
dependencies: cryptsetup-devel
container: 33
- task: make -f Makefile build-examples
dependencies: cryptsetup-devel
container: 33
- task: make -f Makefile docs-ci
dependencies: cryptsetup-devel
container: 33
- task: make -f Makefile test
dependencies: cryptsetup-devel keyutils-libs-devel
container: 33
- task: make -f Makefile test-mutex
dependencies: cryptsetup-devel keyutils-libs-devel
container: 33
- task: make -f Makefile test-mutex-guard
dependencies: cryptsetup-devel keyutils-libs-devel
container: 33
- task: make -f Makefile test-loopback
dependencies: cryptsetup-devel keyutils-libs-devel
container: 33
- task: make -f Makefile release
dependencies: cryptsetup-devel
container: 33
# Fedora 34
- task: make -f Makefile build
dependencies: cryptsetup-devel
container: 34
- task: make -f Makefile build-examples
dependencies: cryptsetup-devel
container: 34
- task: make -f Makefile docs-ci
dependencies: cryptsetup-devel
container: 34
- task: make -f Makefile test
dependencies: cryptsetup-devel keyutils-libs-devel
container: 34
- task: make -f Makefile test-mutex
dependencies: cryptsetup-devel keyutils-libs-devel
container: 34
- task: make -f Makefile test-mutex-guard
dependencies: cryptsetup-devel keyutils-libs-devel
container: 34
- task: make -f Makefile test-loopback
dependencies: cryptsetup-devel keyutils-libs-devel
container: 34
- task: make -f Makefile release
dependencies: cryptsetup-devel
container: 34
# Fedora 38
- task: make -f Makefile build
dependencies: cryptsetup-devel
container: 38
- task: make -f Makefile build-examples
dependencies: cryptsetup-devel
container: 38
- task: make -f Makefile docs-ci
dependencies: cryptsetup-devel
container: 38
- task: make -f Makefile test
dependencies: cryptsetup-devel keyutils-libs-devel
container: 38
- task: make -f Makefile test-mutex
dependencies: cryptsetup-devel keyutils-libs-devel
container: 38
- task: make -f Makefile test-mutex-guard
dependencies: cryptsetup-devel keyutils-libs-devel
container: 38
- task: make -f Makefile test-loopback
dependencies: cryptsetup-devel keyutils-libs-devel
container: 38
- task: make -f Makefile release
dependencies: cryptsetup-devel
container: 38
runs-on: ubuntu-20.04
container:
image: fedora:${{ matrix.container }}
options: --privileged -v /dev:/dev
steps:
- name: Install git
run: dnf install -y git
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.TOOLCHAIN }}
- name: Install dependencies
run: dnf install -y make gcc clang-devel ${{ matrix.dependencies }}
- name: Test ${{ matrix.task }} on ${{ env.TOOLCHAIN }} toolchain
run: ${{ matrix.task }}
# VERIFICATION OF TEST INFRASTRUCTURE
yamllint:
runs-on: ubuntu-20.04
container: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- name: Install git
run: dnf install -y git
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: dnf install -y make yamllint
- name: Run yamllint
run: make -f Makefile yamllint