Add CRI tests
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
This commit is contained in:
parent
4175ebf236
commit
e598e5e0c6
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@ -30,6 +30,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@ -39,6 +40,7 @@ jobs:
|
|||||||
if: startsWith(matrix.os, 'ubuntu')
|
if: startsWith(matrix.os, 'ubuntu')
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y btrfs-tools libseccomp-dev
|
sudo apt-get install -y btrfs-tools libseccomp-dev
|
||||||
|
|
||||||
- name: Make
|
- name: Make
|
||||||
run: |
|
run: |
|
||||||
make build
|
make build
|
||||||
@ -61,6 +63,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
echo "::add-path::${{ github.workspace }}/bin"
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
86
.github/workflows/tests.yml
vendored
86
.github/workflows/tests.yml
vendored
@ -68,3 +68,89 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo GOPATH=$GOPATH GOPROXY=$GOPROXY TEST_RUNTIME=$TEST_RUNTIME TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu
|
sudo GOPATH=$GOPATH GOPROXY=$GOPROXY TEST_RUNTIME=$TEST_RUNTIME TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu
|
||||||
working-directory: src/github.com/containerd/containerd
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
cri:
|
||||||
|
name: CRI
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
timeout-minutes: 10
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
runtime: [v1, v2]
|
||||||
|
runc: [runc, crun]
|
||||||
|
exclude:
|
||||||
|
- runtime: v1
|
||||||
|
runc: crun
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set env
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=GOPATH::${{ github.workspace }}"
|
||||||
|
echo "::add-path::${{ github.workspace }}/bin"
|
||||||
|
|
||||||
|
- name: Checkout containerd
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
env:
|
||||||
|
RUNC_FLAVOR: ${{ matrix.runc }}
|
||||||
|
run: |
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-seccomp
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH RUNC_FLAVOR=$RUNC_FLAVOR script/setup/install-runc
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-cni
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH script/setup/install-critools
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install protobuf
|
||||||
|
run: |
|
||||||
|
sudo env PATH=$PATH GOPATH=$GOPATH script/setup/install-protobuf
|
||||||
|
sudo chmod +x /usr/local/bin/protoc
|
||||||
|
sudo chmod og+rx /usr/local/include/google /usr/local/include/google/protobuf /usr/local/include/google/protobuf/compiler
|
||||||
|
sudo chmod -R og+r /usr/local/include/google/protobuf/
|
||||||
|
protoc --version
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: Install criu
|
||||||
|
run: |
|
||||||
|
sudo apt-get install -y \
|
||||||
|
libprotobuf-dev \
|
||||||
|
libprotobuf-c-dev \
|
||||||
|
protobuf-c-compiler \
|
||||||
|
protobuf-compiler \
|
||||||
|
python-protobuf \
|
||||||
|
libnl-3-dev \
|
||||||
|
libnet-dev \
|
||||||
|
libcap-dev \
|
||||||
|
python-future \
|
||||||
|
socat
|
||||||
|
wget https://github.com/checkpoint-restore/criu/archive/v3.13.tar.gz -O criu.tar.gz
|
||||||
|
tar -zxf criu.tar.gz
|
||||||
|
cd criu-3.13
|
||||||
|
sudo make install-criu
|
||||||
|
|
||||||
|
- name: Install containerd
|
||||||
|
run: |
|
||||||
|
make binaries
|
||||||
|
sudo make install
|
||||||
|
working-directory: src/github.com/containerd/containerd
|
||||||
|
|
||||||
|
- name: CRI test
|
||||||
|
env:
|
||||||
|
TEST_RUNTIME: io.containerd.runc.${{ matrix.runtime }}
|
||||||
|
run: |
|
||||||
|
sudo mkdir -p /etc/containerd
|
||||||
|
sudo bash -c "cat > /etc/containerd/config.toml <<EOF
|
||||||
|
[plugins.cri.containerd.default_runtime]
|
||||||
|
runtime_type = \"${TEST_RUNTIME}\"
|
||||||
|
EOF"
|
||||||
|
sudo PATH=$PATH containerd -log-level debug &> /tmp/containerd-cri.log &
|
||||||
|
sudo ctr version
|
||||||
|
sudo PATH=$PATH GOPATH=$GOPATH critest --runtime-endpoint=/var/run/containerd/containerd.sock --parallel=8
|
||||||
|
TEST_RC=$?
|
||||||
|
test $TEST_RC -ne 0 && cat /tmp/containerd-cri.log
|
||||||
|
sudo pkill containerd
|
||||||
|
sudo rm -rf /etc/containerd
|
||||||
|
test $TEST_RC -eq 0 || /bin/false
|
||||||
|
Loading…
Reference in New Issue
Block a user