-
Notifications
You must be signed in to change notification settings - Fork 12
246 lines (235 loc) · 8 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
---
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.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- 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.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- 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
# MANDATORY TESTING ON STABLE
stable:
env:
TOOLCHAIN: stable
strategy:
matrix:
include:
- task: make -f Makefile build
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:
- uses: actions/checkout@v3
- 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.0 # 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:
- uses: actions/checkout@v3
- 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.0 # LOWEST SUPPORTED RUST TOOLCHAIN
strategy:
matrix:
include:
# Fedora 33
- task: make -f Makefile build
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 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 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:
- uses: actions/checkout@v3
- 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 }}
checks-with-ci-repo:
strategy:
matrix:
include:
- task: >
SET_LOWER_BOUNDS=./set_lower_bounds
MANIFEST_PATH=../../Cargo.toml
make -f ../../Makefile verify-dependency-bounds
- task: >
SET_LOWER_BOUNDS=./set_lower_bounds
MANIFEST_PATH=../../libcryptsetup-rs-sys/Cargo.toml
make -f ../../Makefile verify-dependency-bounds-sys
runs-on: ubuntu-20.04
container:
image: fedora:38 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v3
- name: Install dependencies for Fedora
run: >
dnf install -y
clang
cryptsetup-devel
curl
git
make
openssl-devel
python-requests
python-semantic_version
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: 1.71.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
- name: Check out ci repo
run: git clone https://github.com/stratis-storage/ci.git
- name: Run ${{ matrix.task }}
run: ${{ matrix.task }}
working-directory: ./ci/dependency_management
# VERIFICATION OF TEST INFRASTRUCTURE
yamllint:
runs-on: ubuntu-20.04
container: fedora:38 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: dnf install -y make yamllint
- name: Run yamllint
run: make -f Makefile yamllint