Skip to content

Commit b60e0a9

Browse files
committed
gha: combine basic amd64 jobs into a single yaml
GHA has an undocumented limitation that there can be at most 20 referenced yamls in a single yaml file. We workaround it by combining multiple jobs into a single yaml file. Fixes: kata-containers#8161 Signed-off-by: Peng Tao <bergwolf@hyper.sh>
1 parent 108db0a commit b60e0a9

File tree

6 files changed

+199
-245
lines changed

6 files changed

+199
-245
lines changed
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
name: CI | Basic amd64 tests
2+
on:
3+
workflow_call:
4+
inputs:
5+
tarball-suffix:
6+
required: false
7+
type: string
8+
commit-hash:
9+
required: false
10+
type: string
11+
target-branch:
12+
required: false
13+
type: string
14+
default: ""
15+
16+
jobs:
17+
run-cri-containerd:
18+
strategy:
19+
# We can set this to true whenever we're 100% sure that
20+
# the all the tests are not flaky, otherwise we'll fail
21+
# all the tests due to a single flaky instance.
22+
fail-fast: false
23+
matrix:
24+
containerd_version: ['lts', 'active']
25+
vmm: ['clh', 'qemu']
26+
runs-on: garm-ubuntu-2204-smaller
27+
env:
28+
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
29+
GOPATH: ${{ github.workspace }}
30+
KATA_HYPERVISOR: ${{ matrix.vmm }}
31+
steps:
32+
- uses: actions/checkout@v3
33+
with:
34+
ref: ${{ inputs.commit-hash }}
35+
fetch-depth: 0
36+
37+
- name: Rebase atop of the latest target branch
38+
run: |
39+
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
40+
env:
41+
TARGET_BRANCH: ${{ inputs.target-branch }}
42+
43+
- name: Install dependencies
44+
run: bash tests/integration/cri-containerd/gha-run.sh install-dependencies
45+
46+
- name: get-kata-tarball
47+
uses: actions/download-artifact@v3
48+
with:
49+
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
50+
path: kata-artifacts
51+
52+
- name: Install kata
53+
run: bash tests/integration/cri-containerd/gha-run.sh install-kata kata-artifacts
54+
55+
- name: Run cri-containerd tests
56+
run: bash tests/integration/cri-containerd/gha-run.sh run
57+
58+
run-containerd-stability:
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
containerd_version: ['lts', 'active']
63+
vmm: ['clh', 'qemu']
64+
runs-on: garm-ubuntu-2204-smaller
65+
env:
66+
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
67+
GOPATH: ${{ github.workspace }}
68+
KATA_HYPERVISOR: ${{ matrix.vmm }}
69+
steps:
70+
- uses: actions/checkout@v3
71+
with:
72+
ref: ${{ inputs.commit-hash }}
73+
fetch-depth: 0
74+
75+
- name: Rebase atop of the latest target branch
76+
run: |
77+
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
78+
env:
79+
TARGET_BRANCH: ${{ inputs.target-branch }}
80+
81+
- name: get-kata-tarball
82+
uses: actions/download-artifact@v3
83+
with:
84+
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
85+
path: kata-artifacts
86+
87+
- name: Install kata
88+
run: bash tests/stability/gha-run.sh install-kata kata-artifacts
89+
90+
- name: Run containerd-stability tests
91+
run: bash tests/stability/gha-run.sh run
92+
93+
run-nydus:
94+
strategy:
95+
# We can set this to true whenever we're 100% sure that
96+
# the all the tests are not flaky, otherwise we'll fail
97+
# all the tests due to a single flaky instance.
98+
fail-fast: false
99+
matrix:
100+
containerd_version: ['lts', 'active']
101+
vmm: ['clh', 'qemu', 'dragonball']
102+
runs-on: garm-ubuntu-2204-smaller
103+
env:
104+
CONTAINERD_VERSION: ${{ matrix.containerd_version }}
105+
GOPATH: ${{ github.workspace }}
106+
KATA_HYPERVISOR: ${{ matrix.vmm }}
107+
steps:
108+
- uses: actions/checkout@v3
109+
with:
110+
ref: ${{ inputs.commit-hash }}
111+
fetch-depth: 0
112+
113+
- name: Rebase atop of the latest target branch
114+
run: |
115+
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
116+
env:
117+
TARGET_BRANCH: ${{ inputs.target-branch }}
118+
119+
- name: Install dependencies
120+
run: bash tests/integration/nydus/gha-run.sh install-dependencies
121+
122+
- name: get-kata-tarball
123+
uses: actions/download-artifact@v3
124+
with:
125+
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
126+
path: kata-artifacts
127+
128+
- name: Install kata
129+
run: bash tests/integration/nydus/gha-run.sh install-kata kata-artifacts
130+
131+
- name: Run nydus tests
132+
run: bash tests/integration/nydus/gha-run.sh run
133+
134+
run-runk:
135+
runs-on: garm-ubuntu-2204-smaller
136+
env:
137+
CONTAINERD_VERSION: lts
138+
steps:
139+
- uses: actions/checkout@v4
140+
with:
141+
ref: ${{ inputs.commit-hash }}
142+
fetch-depth: 0
143+
144+
- name: Rebase atop of the latest target branch
145+
run: |
146+
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
147+
env:
148+
TARGET_BRANCH: ${{ inputs.target-branch }}
149+
150+
- name: Install dependencies
151+
run: bash tests/integration/runk/gha-run.sh install-dependencies
152+
153+
- name: get-kata-tarball
154+
uses: actions/download-artifact@v3
155+
with:
156+
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
157+
path: kata-artifacts
158+
159+
- name: Install kata
160+
run: bash tests/integration/runk/gha-run.sh install-kata kata-artifacts
161+
162+
- name: Run tracing tests
163+
run: bash tests/integration/runk/gha-run.sh run
164+
165+
run-vfio:
166+
strategy:
167+
fail-fast: false
168+
matrix:
169+
vmm: ['clh', 'qemu']
170+
runs-on: garm-ubuntu-2304
171+
env:
172+
GOPATH: ${{ github.workspace }}
173+
KATA_HYPERVISOR: ${{ matrix.vmm }}
174+
steps:
175+
- uses: actions/checkout@v3
176+
with:
177+
ref: ${{ inputs.commit-hash }}
178+
fetch-depth: 0
179+
180+
- name: Rebase atop of the latest target branch
181+
run: |
182+
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
183+
env:
184+
TARGET_BRANCH: ${{ inputs.target-branch }}
185+
186+
- name: Install dependencies
187+
run: bash tests/functional/vfio/gha-run.sh install-dependencies
188+
189+
- name: get-kata-tarball
190+
uses: actions/download-artifact@v3
191+
with:
192+
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
193+
path: kata-artifacts
194+
195+
- name: Run vfio tests
196+
timeout-minutes: 15
197+
run: bash tests/functional/vfio/gha-run.sh run

.github/workflows/ci.yaml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -209,41 +209,9 @@ jobs:
209209
commit-hash: ${{ inputs.commit-hash }}
210210
target-branch: ${{ inputs.target-branch }}
211211

212-
run-cri-containerd-tests:
212+
run-basic-amd64-tests:
213213
needs: build-kata-static-tarball-amd64
214-
uses: ./.github/workflows/run-cri-containerd-tests.yaml
215-
with:
216-
tarball-suffix: -${{ inputs.tag }}
217-
commit-hash: ${{ inputs.commit-hash }}
218-
target-branch: ${{ inputs.target-branch }}
219-
220-
run-containerd-stability-tests:
221-
needs: build-kata-static-tarball-amd64
222-
uses: ./.github/workflows/run-containerd-stability-tests.yaml
223-
with:
224-
tarball-suffix: -${{ inputs.tag }}
225-
commit-hash: ${{ inputs.commit-hash }}
226-
target-branch: ${{ inputs.target-branch }}
227-
228-
run-nydus-tests:
229-
needs: build-kata-static-tarball-amd64
230-
uses: ./.github/workflows/run-nydus-tests.yaml
231-
with:
232-
tarball-suffix: -${{ inputs.tag }}
233-
commit-hash: ${{ inputs.commit-hash }}
234-
target-branch: ${{ inputs.target-branch }}
235-
236-
run-runk-tests:
237-
needs: build-kata-static-tarball-amd64
238-
uses: ./.github/workflows/run-runk-tests.yaml
239-
with:
240-
tarball-suffix: -${{ inputs.tag }}
241-
commit-hash: ${{ inputs.commit-hash }}
242-
target-branch: ${{ inputs.target-branch }}
243-
244-
run-vfio-tests:
245-
needs: build-kata-static-tarball-amd64
246-
uses: ./.github/workflows/run-vfio-tests.yaml
214+
uses: ./.github/workflows/basic-ci-amd64.yaml
247215
with:
248216
tarball-suffix: -${{ inputs.tag }}
249217
commit-hash: ${{ inputs.commit-hash }}

.github/workflows/run-containerd-stability-tests.yaml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/run-cri-containerd-tests.yaml

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)