diff --git a/.github/workflows/ci-core.yml b/.github/workflows/ci-core.yml index 34aabc73..1d8a7691 100644 --- a/.github/workflows/ci-core.yml +++ b/.github/workflows/ci-core.yml @@ -15,6 +15,7 @@ jobs: fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12"] + container-engine: ["docker", "podman"] steps: - uses: actions/checkout@v4 - name: Set up Python @@ -25,8 +26,33 @@ jobs: run: poetry install --all-extras - name: Run twine check run: poetry build && poetry run twine check dist/*.tar.gz + + - name: Update podman to 5.x + if: ${{ matrix.container-engine == 'podman' }} + run: | + echo "ubuntu version from kubic repository to install podman we need (v5)" + ubuntu_version='22.04' + echo "Add unstable kubic repo into list of available sources and get the repo key" + sudo sh -c "echo 'deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" + curl -L "https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - + echo "Updating all dependencies..." + sudo apt-get update -qq + echo "install necessary dependencies for criu package which is not part of ${ubuntu_version}" + sudo apt-get install --allow-unauthenticated -qq libprotobuf32t64 python3-protobuf libnet1 + echo "install criu manually from static location" + curl -sLO http://archive.ubuntu.com/ubuntu/pool/universe/c/criu/criu_3.16.1-2_amd64.deb && sudo dpkg -i criu_3.16.1-2_amd64.deb + echo "installing/update podman package..." + sudo apt-get -qq -y install --allow-unauthenticated podman || { echo "Start fallback steps for podman nightly installation from a static mirror" && \ + sudo sh -c "echo 'deb http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list" && \ + curl -L "http://ftp.lysator.liu.se/pub/opensuse/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" | sudo apt-key add - && \ + sudo apt-get --allow-insecure-repositories update && \ + sudo apt-get --allow-unauthenticated -y install podman; } + podman version + - name: Set up Docker + if: ${{ matrix.container-engine == 'docker' }} uses: docker/setup-docker-action@v4 + - name: Run tests run: make core/tests - name: Rename coverage file