-
Notifications
You must be signed in to change notification settings - Fork 344
208 lines (198 loc) · 6.05 KB
/
e2e.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
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
name: 🧪 e2e test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
youki-build:
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
arch: [ "x86_64", "aarch64" ]
libc: [ "gnu", "musl" ]
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1.3.7
env:
RUST_CACHE_KEY_OS: rust-cache-${{ matrix.arch }}-${{ matrix.libc }}
- name: Install just
uses: taiki-e/install-action@just
- name: Install cross-rs
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Setup target
run: |
echo "CARGO=cross" >> ${GITHUB_ENV}
echo "TARGET=${{ matrix.arch }}-unknown-linux-${{ matrix.libc }}" >> ${GITHUB_ENV}
- name: Build youki
run: just youki-release
- name: Upload youki binary
if: ${{ matrix.arch == 'x86_64' }}
uses: actions/upload-artifact@v4
with:
name: youki-${{ matrix.arch }}-${{ matrix.libc }}
path: youki
containerd-integration-tests:
runs-on: ubuntu-22.04
needs: [youki-build]
timeout-minutes: 40
strategy:
matrix:
arch: [ "x86_64" ]
libc: [ "gnu", "musl" ]
steps:
- uses: actions/checkout@v4
with:
repository: containerd/containerd
ref: v1.7.11
- uses: actions/setup-go@v5
with:
go-version: '1.20.12'
cache: true
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libelf-dev libseccomp-dev btrfs-progs libbtrfs-dev
- name: Build containerd
run: |
make build
make binaries
sudo make install
./script/setup/install-cni
./script/setup/install-critools
- name: Download youki binary
uses: actions/download-artifact@v4
with:
name: youki-${{ matrix.arch }}-${{ matrix.libc }}
- name: Replace runc to youki
run: |
sudo rm -f /usr/bin/runc /usr/local/bin/runc /usr/sbin/runc
sudo chmod 755 youki
sudo cp youki /usr/bin/runc
runc --version
- name: Integration Test
run: sudo make RUNC_FLAVOR=crun TEST_RUNTIME=io.containerd.runc.v2 TESTFLAGS="-timeout 40m" integration
k8s-tests:
runs-on: ubuntu-22.04
needs: [youki-build]
timeout-minutes: 40
strategy:
matrix:
arch: [ "x86_64" ]
libc: [ "gnu", "musl" ]
steps:
- uses: actions/checkout@v4
- name: Download youki binary
uses: actions/download-artifact@v4
with:
name: youki-${{ matrix.arch }}-${{ matrix.libc }}
- name: Add the permission to run
run: chmod +x ./youki
- name: Install just
uses: taiki-e/install-action@just
- name: test/k8s/deploy
run: just test-kind
oci-validation-go:
runs-on: ubuntu-22.04
needs: [youki-build]
timeout-minutes: 15
strategy:
matrix:
arch: [ "x86_64" ]
libc: [ "gnu", "musl" ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install just
uses: taiki-e/install-action@just
- uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: true
cache-dependency-path: tests/oci-runtime-tests/src/github.com/opencontainers/runtime-tools/go.sum
- name: Download youki binary
uses: actions/download-artifact@v4
with:
name: youki-${{ matrix.arch }}-${{ matrix.libc }}
- name: Add the permission to run
run: chmod +x ./youki
- name: Run integration tests
run: just test-oci
oci-validation-rust:
runs-on: ubuntu-22.04
needs: [youki-build]
timeout-minutes: 20
strategy:
matrix:
arch: [ "x86_64" ]
libc: [ "gnu", "musl" ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install just
uses: taiki-e/install-action@just
- name: Install requirements
run: sudo env PATH=$PATH just ci-prepare
- name: Download youki binary
uses: actions/download-artifact@v4
with:
name: youki-${{ matrix.arch }}-${{ matrix.libc }}
- name: Add the permission to run
run: chmod +x ./youki
- name: Validate tests on youki
run: just test-contest
rootless-podman-test:
runs-on: ubuntu-22.04
needs: [youki-build]
timeout-minutes: 20
strategy:
matrix:
arch: [ "x86_64" ]
libc: [ "gnu", "musl" ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust toolchain and cache
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install just
uses: taiki-e/install-action@just
- name: Install requirements
run: sudo env PATH=$PATH just ci-prepare
- name: Download youki binary
uses: actions/download-artifact@v4
with:
name: youki-${{ matrix.arch }}-${{ matrix.libc }}
- name: Add the permission to run
run: chmod +x ./youki
- name: Run tests
run: just test-rootless-podman
docker-in-docker:
runs-on: ${{ matrix.os }}
needs: [youki-build]
timeout-minutes: 5
strategy:
matrix:
# ubuntu 20.04 has cgroups-v1
# ubuntu 22.04 has cgroups-v2
os: [ "ubuntu-22.04", "ubuntu-20.04" ]
steps:
- uses: actions/checkout@v4
- name: Install just
uses: taiki-e/install-action@just
- name: Download youki binary
uses: actions/download-artifact@v4
with:
name: youki-x86_64-musl
- name: Add the permission to run
run: chmod +x ./youki
- name: Run tests
run: just test-dind