-
Notifications
You must be signed in to change notification settings - Fork 0
247 lines (234 loc) · 7.96 KB
/
Copy pathci.yml
File metadata and controls
247 lines (234 loc) · 7.96 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
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
name: ci
on:
push:
branches:
- main
- podman-*
pull_request:
branches:
- main
- podman-*
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GO_VERSION: "1.26.x"
LIMA_VERSION: "v2.1.1"
jobs:
path-filter:
runs-on: ubuntu-24.04
outputs:
storage: ${{ steps.filter.outputs.storage }}
image: ${{ steps.filter.outputs.image }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: dorny/paths-filter@6852f92c20ea7fd3b0c25de3b5112db3a98da050 # v3
id: filter
with:
filters: |
storage:
- '.github/workflows/ci.yml'
- 'hack/ci/**'
- 'go.work'
- 'go.work.sum'
- 'storage/**'
image:
- '.github/workflows/ci.yml'
- 'hack/ci/**'
- 'go.work'
- 'go.work.sum'
- 'storage/**'
- 'image/**'
storage-test:
needs: path-filter
if: github.event_name == 'push' || needs.path-filter.outputs.storage == 'true'
runs-on: cncf-ubuntu-8-32-x86
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
distro: [fedora-current, debian-sid]
driver: [vfs, overlay, overlay-transient, fuse-overlay, fuse-overlay-whiteout, btrfs]
exclude:
- distro: debian-sid
driver: overlay-transient
name: "Storage: ${{ matrix.distro }} ${{ matrix.driver }}"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0
with:
version: ${{ env.LIMA_VERSION }}
- name: Run tests
run: ./hack/ci/ci.sh storage ${{ matrix.distro }} ${{ matrix.driver }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: "logs-storage-${{ matrix.distro }}-${{ matrix.driver }}"
path: |
./hack/ci/journal.log
./hack/ci/audit.log
./hack/ci/df.log
if-no-files-found: ignore
storage-cross:
needs: path-filter
if: github.event_name == 'push' || needs.path-filter.outputs.storage == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 15
name: "Storage: Cross"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: "**/go.sum"
- name: Cross-compile
working-directory: ./storage
run: make cross
storage-gofix:
needs: path-filter
if: github.event_name == 'push' || needs.path-filter.outputs.storage == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 15
name: "Storage: gofix"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: "**/go.sum"
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y libbtrfs-dev libgpgme-dev libdevmapper-dev
- name: Run go fix
working-directory: ./storage
run: go fix ./...
- name: Verify no changes
run: |
git diff --diff-filter=M --exit-code -- . ":(exclude)*.crt" ":(exclude)*.key" ":(exclude)*.cert"
image-cross:
needs: path-filter
if: github.event_name == 'push' || needs.path-filter.outputs.image == 'true'
runs-on: ubuntu-24.04
timeout-minutes: 15
name: "Image: Cross"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: "**/go.sum"
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq install -y libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev
- name: Cross-compile
working-directory: ./image
run: make cross
image-test:
needs: path-filter
if: github.event_name == 'push' || needs.path-filter.outputs.image == 'true'
runs-on: cncf-ubuntu-8-32-x86
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
variant: [default, openpgp, sequoia]
name: "Image: Test ${{ matrix.variant }}"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0
with:
version: ${{ env.LIMA_VERSION }}
- name: Run tests
run: ./hack/ci/ci.sh image fedora-current ${{ matrix.variant }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: "logs-image-${{ matrix.variant }}"
path: |
./hack/ci/journal.log
./hack/ci/audit.log
./hack/ci/df.log
if-no-files-found: ignore
image-test-skopeo:
needs: path-filter
if: github.event_name == 'push' || needs.path-filter.outputs.image == 'true'
runs-on: cncf-ubuntu-8-32-x86
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
variant: [default, openpgp, sequoia]
name: "Image: Skopeo ${{ matrix.variant }}"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0
with:
version: ${{ env.LIMA_VERSION }}
- name: Run tests
run: ./hack/ci/ci.sh image-skopeo fedora-current ${{ matrix.variant }}
- name: Upload logs
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: "logs-image-skopeo-${{ matrix.variant }}"
path: |
./hack/ci/journal.log
./hack/ci/audit.log
./hack/ci/df.log
if-no-files-found: ignore
common-test:
runs-on: cncf-ubuntu-8-32-x86
timeout-minutes: 45
name: "Common: Test"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: lima-vm/lima-actions/setup@55627e31b78637bf254a8b2a14da8ea7d12564e5 # v1.1.0
with:
version: ${{ env.LIMA_VERSION }}
- name: Run tests
run: ./hack/ci/ci.sh common fedora-current
- name: Upload logs
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: "logs-common"
path: |
./hack/ci/journal.log
./hack/ci/audit.log
./hack/ci/df.log
if-no-files-found: ignore
# N/B: GitHub merge protection is configured for this exact job name, DO NOT CHANGE IT.
success:
name: "Total Success"
if: always()
needs:
- storage-test
- storage-cross
- storage-gofix
- image-cross
- image-test
- image-test-skopeo
- common-test
runs-on: ubuntu-24.04
steps:
- name: Check all required jobs
run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]] || \
[[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more required jobs failed or were cancelled"
exit 1
fi
echo "All required jobs passed or were skipped"