-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: apostasie <[email protected]>
- Loading branch information
Showing
2 changed files
with
71 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,36 @@ env: | |
GO_VERSION: 1.23.x | ||
|
||
jobs: | ||
build-deps: | ||
runs-on: "${{ matrix.runner }}" | ||
timeout-minutes: 40 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# ubuntu-20.04: cgroup v1, ubuntu-22.04 and later: cgroup v2 | ||
include: | ||
- runner: ubuntu-24.04 | ||
containerd: v1.6.36 | ||
- runner: ubuntu-24.04 | ||
containerd: v1.7.23 | ||
- runner: ubuntu-24.04 | ||
containerd: v2.0.0-rc.5 | ||
- runner: github-arm64-2c-8gb | ||
containerd: v2.0.0-rc.5 | ||
env: | ||
CONTAINERD_VERSION: "${{ matrix.containerd }}" | ||
RUNNER: "${{ matrix.runner }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: "Prepare integration test environment" | ||
run: | | ||
docker build \ | ||
--cache-to type=gha,mode=max,scope=${RUNNER}-${CONTAINERD_VERSION} \ | ||
--cache-from type=gha,scope=${RUNNER}-${CONTAINERD_VERSION} \ | ||
--target build-deps --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} . | ||
test-unit: | ||
timeout-minutes: 5 | ||
name: unit | ${{ matrix.goos }} | ||
|
@@ -51,6 +81,7 @@ jobs: | |
run: go test -v ./pkg/... | ||
|
||
test-integration: | ||
needs: build-deps | ||
runs-on: "${{ matrix.runner }}" | ||
timeout-minutes: 40 | ||
strategy: | ||
|
@@ -71,14 +102,18 @@ jobs: | |
containerd: v2.0.0-rc.5 | ||
runner: github-arm64-2c-8gb | ||
env: | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
CONTAINERD_VERSION: "${{ matrix.containerd }}" | ||
RUNNER: "${{ matrix.runner }}" | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: "Prepare integration test environment" | ||
run: docker build -t test-integration --target test-integration --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} . | ||
run: | | ||
docker build \ | ||
--cache-from type=gha,scope=${RUNNER}-${CONTAINERD_VERSION} \ | ||
-t test-integration --target test-integration --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} . | ||
- name: "Remove snap loopback devices (conflicts with our loopback devices in TestRunDevice)" | ||
run: | | ||
sudo systemctl disable --now snapd.service snapd.socket | ||
|
@@ -103,6 +138,7 @@ jobs: | |
command: docker run -t --rm --privileged test-integration | ||
|
||
test-integration-ipv6: | ||
needs: build-deps | ||
runs-on: "ubuntu-${{ matrix.ubuntu }}" | ||
timeout-minutes: 40 | ||
strategy: | ||
|
@@ -113,8 +149,9 @@ jobs: | |
- ubuntu: 24.04 | ||
containerd: v1.7.23 | ||
env: | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
CONTAINERD_VERSION: "${{ matrix.containerd }}" | ||
RUNNER: "ubuntu-${{ matrix.ubuntu }}" | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
|
@@ -129,7 +166,10 @@ jobs: | |
echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", "experimental": true, "ip6tables": true}' | sudo tee /etc/docker/daemon.json | ||
sudo systemctl restart docker | ||
- name: "Prepare integration test environment" | ||
run: docker build -t test-integration-ipv6 --target test-integration-ipv6 --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} . | ||
run: | | ||
docker build \ | ||
--cache-from type=gha,scope=${RUNNER}-${CONTAINERD_VERSION} \ | ||
-t test-integration-ipv6 --target test-integration-ipv6 --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} . | ||
- name: "Remove snap loopback devices (conflicts with our loopback devices in TestRunDevice)" | ||
run: | | ||
sudo systemctl disable --now snapd.service snapd.socket | ||
|
@@ -159,6 +199,7 @@ jobs: | |
command: docker run --network host -t --rm --privileged test-integration-ipv6 | ||
|
||
test-integration-rootless: | ||
needs: build-deps | ||
runs-on: "ubuntu-${{ matrix.ubuntu }}" | ||
timeout-minutes: 60 | ||
strategy: | ||
|
@@ -183,8 +224,9 @@ jobs: | |
rootlesskit: v2.3.1 | ||
target: test-integration-rootless-port-slirp4netns | ||
env: | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
CONTAINERD_VERSION: "${{ matrix.containerd }}" | ||
RUNNER: "ubuntu-${{ matrix.ubuntu }}" | ||
UBUNTU_VERSION: "${{ matrix.ubuntu }}" | ||
ROOTLESSKIT_VERSION: "${{ matrix.rootlesskit }}" | ||
TEST_TARGET: "${{ matrix.target }}" | ||
steps: | ||
|
@@ -216,7 +258,10 @@ jobs: | |
docker run --privileged --rm tonistiigi/binfmt --install linux/arm64 | ||
docker run --privileged --rm tonistiigi/binfmt --install linux/arm/v7 | ||
- name: "Prepare (network driver=slirp4netns, port driver=builtin)" | ||
run: docker build -t ${TEST_TARGET} --target ${TEST_TARGET} --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} --build-arg ROOTLESSKIT_VERSION=${ROOTLESSKIT_VERSION} . | ||
run: | | ||
docker build \ | ||
--cache-from type=gha,scope=${RUNNER}-${CONTAINERD_VERSION} \ | ||
-t ${TEST_TARGET} --target ${TEST_TARGET} --build-arg UBUNTU_VERSION=${UBUNTU_VERSION} --build-arg CONTAINERD_VERSION=${CONTAINERD_VERSION} --build-arg ROOTLESSKIT_VERSION=${ROOTLESSKIT_VERSION} . | ||
- name: "Disable BuildKit for RootlessKit v1 (workaround for issue #622)" | ||
run: | | ||
# https://github.com/containerd/nerdctl/issues/622 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters