forked from containers/crun
-
Notifications
You must be signed in to change notification settings - Fork 0
127 lines (112 loc) · 4.08 KB
/
test.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
name: Test
on: [push, pull_request]
jobs:
build_job:
runs-on: ubuntu-latest
name: Build on ${{ matrix.arch }} with ${{ matrix.configureFlags }}
strategy:
matrix:
include:
#- arch: armv7
# distro: ubuntu20.04
- arch: aarch64
distro: ubuntu20.04
- arch: s390x
distro: ubuntu20.04
- arch: ppc64le
distro: ubuntu20.04
steps:
- uses: actions/[email protected]
- uses: uraimo/[email protected]
name: Build
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
setup: |
git submodule update --init --recursive
install: |
apt-get update -q -y
apt-get install -q -y automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget go-md2man libsystemd-dev gperf clang-format libyajl-dev
run: |
./autogen.sh
./configure CFLAGS='-Wall -Werror'
make -j $(nproc) -C libocispec libocispec.la
make git-version.h
make -j $(nproc) libcrun.la
make -j $(nproc) crun
Test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- test: disable-systemd
- test: check
- test: podman
- test: containerd
- test: oci-validation
- test: alpine-build
- test: clang-format
- test: checkpoint-restore
steps:
- name: checkout
uses: actions/checkout@v2
- name: update submodules
run: |
git submodule update --init --recursive
- name: install dependencies
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y software-properties-common
sudo add-apt-repository -y ppa:criu/ppa
sudo apt-get update -q -y
sudo apt-get install -q -y criu automake libtool autotools-dev libseccomp-dev git make libcap-dev cmake pkg-config gcc wget go-md2man libsystemd-dev gperf clang-format libyajl-dev docker.io containerd runc
sudo systemctl unmask docker
sudo systemctl start docker
- name: run autogen.sh
run: |
./autogen.sh
- name: run test
run: |
case "${{ matrix.test }}" in
disable-systemd)
./configure --disable-systemd
make
;;
check)
./configure
make
make syntax-check
sudo make check
;;
podman)
sudo docker build -t crun-podman tests/podman
sudo docker run --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v ${PWD}:/crun crun-podman
;;
containerd)
sudo mkdir -p /var/lib/var-containerd
sudo docker build -t crun-containerd tests/containerd
sudo docker run --privileged --net host --rm -v /tmp:/tmp:rw -v /var/lib/var-containerd:/var/lib:rw -v /sys:/sys:rw,rslave -v ${PWD}:/crun crun-containerd
;;
oci-validation)
sudo docker build -t crun-oci-validation tests/oci-validation
sudo docker run --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v ${PWD}:/crun crun-oci-validation
;;
alpine-build)
sudo docker build -t crun-alpine-build tests/alpine-build
sudo docker run --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v $(pwd):/crun crun-alpine-build
;;
clang-format)
./configure
sudo docker build -t crun-clang-format tests/clang-format
sudo docker run --rm -w /crun -v ${PWD}:/crun crun-clang-format make clang-format
;;
checkpoint-restore)
./autogen.sh
./configure
make -j $(nproc)
sudo python3 tests/test_checkpoint_restore.py
;;
esac