mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
- actions/checkout v4 -> v7 - actions/stale v5 -> v10 - actions/cache v4 -> v6 - codecov/codecov-action v5 -> v7 - mondeja/remove-labels-gh-action v1 -> v2 Assisted-by: claude-code:claude-opus-4-6 Signed-off-by: Adrian Reber <areber@redhat.com>
324 lines
9.4 KiB
YAML
324 lines
9.4 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
# Cancel any preceding run on the pull request.
|
|
concurrency:
|
|
group: ci-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/criu-dev' }}
|
|
|
|
jobs:
|
|
alpine-test:
|
|
name: Alpine Test (${{ matrix.target }}, ${{ matrix.shard_name }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-22.04]
|
|
target: [GCC=1, CLANG=1]
|
|
shard: [0, 1, 2, 3, 4]
|
|
include:
|
|
- shard: 0
|
|
shard_name: zdtm 1/4
|
|
- shard: 1
|
|
shard_name: zdtm 2/4
|
|
- shard: 2
|
|
shard_name: zdtm 3/4
|
|
- shard: 3
|
|
shard_name: zdtm 4/4
|
|
- shard: 4
|
|
shard_name: non-zdtm
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Alpine ${{ matrix.target }} ${{ matrix.shard_name }} Test
|
|
run: >
|
|
sudo -E make -C scripts/ci alpine ${{ matrix.target }}
|
|
ZDTM_SHARD_INDEX=${{ matrix.shard }}
|
|
ZDTM_SHARD_COUNT=4
|
|
|
|
alpine-test-arm64:
|
|
name: Alpine Test ARM64
|
|
needs: [alpine-test]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-22.04-arm]
|
|
target: [GCC=1, CLANG=1]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Alpine ${{ matrix.target }} Test
|
|
run: sudo -E make -C scripts/ci alpine ${{ matrix.target }}
|
|
|
|
aarch64-test:
|
|
needs: [alpine-test]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-24.04-arm, ubuntu-22.04-arm]
|
|
target: [GCC=1, CLANG=1]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Tests ${{ matrix.target }} on ${{ matrix.os }}
|
|
run: |
|
|
# The 'sched_policy00' needs the following:
|
|
sudo sysctl -w kernel.sched_rt_runtime_us=-1
|
|
# etc/hosts entry is needed for netns_lock_iptables
|
|
echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
|
|
sudo -E make -C scripts/ci local ${{ matrix.target }} RUN_TESTS=1 \
|
|
ZDTM_OPTS="-x zdtm/static/change_mnt_context -x zdtm/static/maps05"
|
|
|
|
archlinux-test:
|
|
name: Arch Linux Test (${{ matrix.shard_name }})
|
|
needs: [alpine-test]
|
|
# archlinux:latest + pacman -Syu is a rolling-release build; failures
|
|
# caused by upstream package churn are outside CRIU's control.
|
|
continue-on-error: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
shard: [0, 1, 2, 3, 4]
|
|
include:
|
|
- shard: 0
|
|
shard_name: zdtm 1/4
|
|
- shard: 1
|
|
shard_name: zdtm 2/4
|
|
- shard: 2
|
|
shard_name: zdtm 3/4
|
|
- shard: 3
|
|
shard_name: zdtm 4/4
|
|
- shard: 4
|
|
shard_name: non-zdtm
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Arch Linux ${{ matrix.shard_name }} Test
|
|
run: >
|
|
sudo -E make -C scripts/ci archlinux
|
|
ZDTM_SHARD_INDEX=${{ matrix.shard }}
|
|
ZDTM_SHARD_COUNT=4
|
|
|
|
centos-stream-test:
|
|
name: CentOS Stream ${{ matrix.version }}
|
|
# aarch64 is not supported by lima-vm/lima-actions
|
|
# https://github.com/lima-vm/lima-actions/pull/1
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
version: [9, 10]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: ./.github/actions/lima-vm-setup
|
|
with:
|
|
template: centos-stream-${{ matrix.version }}
|
|
cache-key-prefix: lima-centos-stream-${{ matrix.version }}
|
|
- name: Setup VM
|
|
run: lima sudo /home/criu/scripts/ci/lima.sh centos-stream-setup
|
|
- name: Show VM info
|
|
run: |
|
|
lima uname -a
|
|
lima cat /proc/cmdline
|
|
- name: Run tests
|
|
run: ssh -tt lima-default sudo -i /home/criu/scripts/ci/lima.sh centos-stream-test
|
|
|
|
compat-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [GCC, CLANG]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Compat Tests (${{ matrix.target }})
|
|
run: sudo -E make -C scripts/ci local COMPAT_TEST=y ${{ matrix.target }}=1
|
|
|
|
cross-compile:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
experimental: [false]
|
|
target: [
|
|
armv7-stable-cross,
|
|
aarch64-stable-cross,
|
|
ppc64-stable-cross,
|
|
riscv64-stable-cross,
|
|
]
|
|
include:
|
|
- experimental: true
|
|
target: armv7-unstable-cross
|
|
- experimental: true
|
|
target: aarch64-unstable-cross
|
|
- experimental: true
|
|
target: ppc64-unstable-cross
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Cross Compilation Targets
|
|
run: >
|
|
sudo make -C scripts/ci ${{ matrix.target }}
|
|
|
|
docker-test:
|
|
needs: [alpine-test]
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-22.04]
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Docker Test (${{ matrix.os }})
|
|
run: sudo make -C scripts/ci docker-test
|
|
|
|
fedora-asan-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Fedora ASAN Test
|
|
run: sudo -E make -C scripts/ci fedora-asan
|
|
|
|
fedora-rawhide-test:
|
|
name: ${{ matrix.name }}
|
|
needs: [alpine-test]
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-22.04
|
|
name: x86_64 Fedora Rawhide
|
|
- os: ubuntu-24.04-arm
|
|
name: aarch64 Fedora Rawhide
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Fedora Rawhide Test
|
|
# We need to pass environment variables from the CI environment to
|
|
# distinguish between CI environments. However, we need to make sure that
|
|
# XDG_RUNTIME_DIR environment variable is not set due to a bug in Podman.
|
|
# FIXME: https://github.com/containers/podman/issues/14920
|
|
run: sudo -E XDG_RUNTIME_DIR= make -C scripts/ci fedora-rawhide CONTAINER_RUNTIME=podman BUILD_OPTIONS="--security-opt seccomp=unconfined"
|
|
|
|
vm-fedora-rawhide-test:
|
|
name: VM Fedora ${{ matrix.name }} based test
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- variant: fedora-stable
|
|
name: Stable
|
|
reboot: true
|
|
- variant: fedora-next
|
|
name: Next
|
|
reboot: true
|
|
- variant: fedora-no-vdso
|
|
name: No VDSO
|
|
reboot: true
|
|
- variant: fedora-non-root
|
|
name: Non-Root
|
|
reboot: false
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: ./.github/actions/lima-vm-setup
|
|
with:
|
|
template: fedora
|
|
cache-key-prefix: lima-fedora
|
|
- name: Setup VM
|
|
run: lima sudo /home/criu/scripts/ci/lima.sh ${{ matrix.variant }}-setup
|
|
- name: Reboot VM to activate new kernel
|
|
if: matrix.reboot
|
|
run: |
|
|
limactl stop default
|
|
limactl start default
|
|
- name: Show VM info
|
|
run: |
|
|
lima uname -a
|
|
lima cat /proc/cmdline
|
|
- name: Run tests
|
|
run: ssh -tt lima-default sudo -i /home/criu/scripts/ci/lima.sh ${{ matrix.variant }}-test
|
|
|
|
gcov-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Coverage Tests
|
|
run: sudo -E make -C scripts/ci local GCOV=1
|
|
- name: Run gcov
|
|
run: sudo -E find . -name '*gcda' -type f -print0 | sudo -E xargs --null --max-args 128 gcov
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v7
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
java-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Java Test
|
|
run: sudo make -C scripts/ci java-test
|
|
|
|
loongarch64-qemu-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- run: sudo make -C scripts/ci loongarch64-qemu-test
|
|
|
|
nftables-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Remove iptables
|
|
run: sudo apt remove -y iptables
|
|
- name: Install libnftables-dev
|
|
run: sudo contrib/apt-install libnftables-dev
|
|
- name: chmod 755 /home/runner
|
|
# CRIU's tests are sometimes running as some random user and need
|
|
# to be able to access the test files.
|
|
run: sudo chmod 755 /home/runner
|
|
- name: Build with nftables network locking backend
|
|
run: sudo make -C scripts/ci local COMPILE_FLAGS="NETWORK_LOCK_DEFAULT=NETWORK_LOCK_NFTABLES"
|
|
|
|
podman-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run Podman Test
|
|
run: sudo make -C scripts/ci podman-test
|
|
|
|
stream-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run CRIU Image Streamer Test
|
|
run: sudo -E make -C scripts/ci local STREAM_TEST=1
|
|
|
|
x86-64-clang-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run X86_64 CLANG Test
|
|
run: sudo make -C scripts/ci x86_64 CLANG=1
|
|
|
|
x86-64-gcc-test:
|
|
needs: [alpine-test]
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Run X86_64 GCC Test
|
|
run: sudo make -C scripts/ci x86_64
|