Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI]: DO NOT MERGE #10137

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 8 additions & 55 deletions .github/workflows/ci.yml
Expand Up @@ -377,21 +377,27 @@ jobs:
name: Linux Integration
runs-on: ${{ matrix.os }}
timeout-minutes: 40
needs: [project, linters, protos, man]

strategy:
fail-fast: false
matrix:
runtime:
- io.containerd.runc.v2
runc: [runc, crun]
os: [ubuntu-22.04, actuated-arm64-4cpu-16gb]
os: [actuated-arm64-4cpu-16gb]
exclude:
- os: ${{ github.repository != 'containerd/containerd' && 'actuated-arm64-4cpu-16gb' }}

env:
GOTEST: gotestsum --
steps:
- name: Fix up for actuated
# https://github.com/containerd/containerd/pull/9920#issuecomment-2024823587
if: matrix.os == 'actuated-arm64-4cpu-16gb'
run: |
sudo chmod g+rx /home/runner /home/runner/actions-runner /home/runner/actions-runner/_work
sudo chmod o+rx /home/runner /home/runner/actions-runner /home/runner/actions-runner/_work

- uses: actions/checkout@v4
- uses: ./.github/actions/install-go

Expand Down Expand Up @@ -426,59 +432,6 @@ jobs:

- run: script/setup/install-gotestsum
- run: script/setup/install-teststat
- name: Tests
env:
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-unit-root-junit.xml
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-unit-root-gotest.json
run: |
make test
sudo -E PATH=$PATH make root-test
- run: if [ -f *-gotest.json ]; then echo '# Root Test' >> $GITHUB_STEP_SUMMARY; teststat -markdown *-gotest.json >> $GITHUB_STEP_SUMMARY; fi
if: always()
- run: script/test/test2annotation.sh *-gotest.json
if: always()

- name: Integration 1
env:
TEST_RUNTIME: ${{ matrix.runtime }}
RUNC_FLAVOR: ${{ matrix.runc }}
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-integration-serial-junit.xml
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-integration-serial-gotest.json
run: |
extraflags=""
[ "${RUNC_FLAVOR}" == "crun" ] && {
extraflags="EXTRA_TESTFLAGS=-no-criu";
}
sudo -E PATH=$PATH make integration ${extraflags} TESTFLAGS_RACE=-race
- run: if [ -f *-gotest.json ]; then echo '# Integration 1' >> $GITHUB_STEP_SUMMARY; teststat -markdown *-gotest.json >> $GITHUB_STEP_SUMMARY; fi
if: always()
- run: script/test/test2annotation.sh *-gotest.json
if: always()

# Run the integration suite a second time. See discussion in github.com/containerd/containerd/pull/1759
- name: Integration 2
env:
TEST_RUNTIME: ${{ matrix.runtime }}
RUNC_FLAVOR: ${{ matrix.runc }}
GOTESTSUM_JUNITFILE: ${{github.workspace}}/test-integration-parallel-junit.xml
GOTESTSUM_JSONFILE: ${{github.workspace}}/test-integration-parallel-gotest.json
run: |
extraflags=""
[ "${RUNC_FLAVOR}" == "crun" ] && {
extraflags="EXTRA_TESTFLAGS=-no-criu";
}
sudo -E PATH=$PATH TESTFLAGS_PARALLEL=1 make integration ${extraflags}
- run: if [ -f *-gotest.json ]; then echo '# Integration 2' >> $GITHUB_STEP_SUMMARY; teststat -markdown *-gotest.json >> $GITHUB_STEP_SUMMARY; fi
if: always()
- run: script/test/test2annotation.sh *-gotest.json
if: always()

- name: CRI Integration Test
env:
TEST_RUNTIME: ${{ matrix.runtime }}
run: |
CONTAINERD_RUNTIME=$TEST_RUNTIME make cri-integration

- name: cri-tools critest
env:
TEST_RUNTIME: ${{ matrix.runtime }}
Expand Down
8 changes: 8 additions & 0 deletions script/critest.sh
Expand Up @@ -20,6 +20,7 @@ report_dir=$1

mkdir -p $report_dir
BDIR="$(mktemp -d -p $PWD)"
sudo chmod o+rx $BDIR

function cleanup() {
pkill containerd || true
Expand All @@ -35,6 +36,13 @@ cat > ${BDIR}/config.toml <<EOF
version = 2
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "${TEST_RUNTIME}"
[plugins."io.containerd.snapshotter.v1.overlayfs"]
# slow_chown is needed to avoid an error with kernel < 5.19:
# > "snapshotter \"overlayfs\" doesn't support idmap mounts on this host,
# > configure \`slow_chown\` to allow a slower and expensive fallback"
# https://github.com/containerd/containerd/pull/9920#issuecomment-1978901454
# This is safely ignored for kernel >= 5.19.
slow_chown = true
EOF
ls /etc/cni/net.d

Expand Down
2 changes: 1 addition & 1 deletion script/setup/critools-version
@@ -1 +1 @@
v1.29.0
v1.29.0-105-g28ac8cdd
2 changes: 1 addition & 1 deletion script/setup/crun-version
@@ -1 +1 @@
1.14.3
1.14.4