mirror of
https://github.com/containers/youki
synced 2026-07-28 14:23:33 +02:00
11e8ec0fe5
* fix(libcgroups): add /run/systemd/private fallback for dbus system connection Signed-off-by: nayuta723 <nayuta723@gmail.com> * fix(libcgroups): stabilize dbus connection with exponential-backoff retry and SO_RCVTIMEO Signed-off-by: nayuta723 <nayuta723@gmail.com> * test(k8s): add kind cluster test with systemd cgroup enabled Signed-off-by: nayuta723 <nayuta723@gmail.com> --------- Signed-off-by: nayuta723 <nayuta723@gmail.com>
266 lines
8.7 KiB
YAML
266 lines
8.7 KiB
YAML
name: 🧪 e2e test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
youki-build:
|
|
runs-on: ubuntu-24.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: RUSTFLAGS="" 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-24.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: v2.2.3
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.24.3'
|
|
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 gperf
|
|
- name: Install CRIU from source
|
|
run: |
|
|
sudo apt-get install -y \
|
|
libcap-dev libnet1-dev libnl-3-dev uuid-dev \
|
|
libprotobuf-c-dev libprotobuf-dev protobuf-c-compiler protobuf-compiler
|
|
git clone --depth 1 --branch criu-dev --single-branch \
|
|
https://github.com/checkpoint-restore/criu.git ~/criu
|
|
(cd ~/criu && sudo make -j $(nproc) install-criu)
|
|
rm -rf ~/criu
|
|
criu --version
|
|
- name: Setup libseccomp
|
|
run: sudo ./script/setup/install-seccomp
|
|
- 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: Run containerd integration tests
|
|
env:
|
|
RUNC_FLAVOR: youki
|
|
TEST_RUNTIME: io.containerd.runc.v2
|
|
run: |
|
|
# The following tests are skipped because youki does not yet support:
|
|
#
|
|
# - TestCheckpoint: Checkpoint/restore functionality is not yet supported in youki.
|
|
# Tracking issue: https://github.com/youki-dev/youki/issues/142
|
|
# - MultipleMap: youki currently does not support passing
|
|
# multiple ID mappings (uid/gid) in user namespaces.
|
|
# - TestRuntimeInfo: youki currently does not implement the `containerd-shim-* -info`
|
|
# command expected by containerd v2+ for fetching runtime features.
|
|
sudo -E PATH=$PATH make integration TESTFLAGS="-timeout 40m -skip 'TestCheckpoint|TestRuntimeInfo|TestUserNamespaces/.*MultipleMap'"
|
|
|
|
k8s-tests:
|
|
runs-on: ubuntu-24.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
|
|
|
|
k8s-tests-systemd-cgroup:
|
|
runs-on: ubuntu-24.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 (systemd cgroup)
|
|
run: just test-kind-systemd-cgroup
|
|
|
|
oci-validation-go:
|
|
runs-on: ubuntu-24.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-24.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: Install CRIU from source
|
|
run: |
|
|
sudo apt-get install -y \
|
|
libcap-dev libnet1-dev libnl-3-dev uuid-dev \
|
|
libprotobuf-c-dev libprotobuf-dev protobuf-c-compiler protobuf-compiler
|
|
git clone --depth 1 --branch criu-dev --single-branch \
|
|
https://github.com/checkpoint-restore/criu.git ~/criu
|
|
(cd ~/criu && sudo make -j $(nproc) install-criu)
|
|
rm -rf ~/criu
|
|
criu --version
|
|
- 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-24.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: Install CRIU from source
|
|
run: |
|
|
sudo apt-get install -y \
|
|
libcap-dev libnet1-dev libnl-3-dev uuid-dev \
|
|
libprotobuf-c-dev libprotobuf-dev protobuf-c-compiler protobuf-compiler
|
|
git clone --depth 1 --branch criu-dev --single-branch \
|
|
https://github.com/checkpoint-restore/criu.git ~/criu
|
|
(cd ~/criu && sudo make -j $(nproc) install-criu)
|
|
rm -rf ~/criu
|
|
criu --version
|
|
- 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: ubuntu-24.04
|
|
needs: [youki-build]
|
|
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 (cgroups-v2)
|
|
run: just test-dind
|