From bb9aeba268c3d882d4d1d16f1c3610d504236016 Mon Sep 17 00:00:00 2001 From: Eric Schultz Date: Thu, 2 Jan 2025 13:40:32 -0600 Subject: [PATCH] Build on ubuntu-22.04 and 24.04 --- .github/workflows/container-build.yml | 23 ++++++++++++----------- container-build.py | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index 1ce225948..56db8eaa0 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -7,21 +7,22 @@ jobs: build_and_test: strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-22.04, ubuntu-latest] builder: ["podman"] fail-fast: false runs-on: ${{ matrix.os }} steps: - # - name: Update podman - # run: | - # # # from https://askubuntu.com/questions/1414446/whats-the-recommended-way-of-installing-podman-4-in-ubuntu-22-04 - # # ubuntu_version='22.04' - # # key_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" - # # sources_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}" - # # echo "deb $sources_url/ /" | sudo tee /etc/apt/sources.list.d/devel-kubic-libcontainers-unstable.list - # # curl -fsSL $key_url | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null - # sudo apt update - # sudo apt install -y podman + - name: Update podman + run: | + # from https://askubuntu.com/questions/1414446/whats-the-recommended-way-of-installing-podman-4-in-ubuntu-22-04 + ubuntu_version='22.04' + key_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}/Release.key" + sources_url="https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_${ubuntu_version}" + echo "deb $sources_url/ /" | sudo tee /etc/apt/sources.list.d/devel-kubic-libcontainers-unstable.list + curl -fsSL $key_url | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null + sudo apt update + sudo apt install -y podman + if: ${{ matrix.os == 'ubuntu-22.04' }} - uses: actions/checkout@v4 - name: Make on Unix run: ./container-build.py make -d fast diff --git a/container-build.py b/container-build.py index b347bddaa..65d928d62 100755 --- a/container-build.py +++ b/container-build.py @@ -22,9 +22,9 @@ def runProcess(exe): parser = argparse.ArgumentParser(description='Build Sandstorm using an Ubuntu 20.04 Docker/OCI container') -parser.add_argument("action", choices=["make", "prepare", "shell"], default="make", nargs="?") -parser.add_argument('--container-builder', dest="container_builder", default='podman', help='Command you run for building container from command line') -parser.add_argument('--container-runner', dest="container_runner", default='podman', help='Command you run for running container from command line') +parser.add_argument("action", choices=["make", "prepare", "shell"], default="make", nargs="?", help='') +parser.add_argument('--container-builder', dest="container_builder", default='podman', help='Command you run for building container from command line (Default: %(default))') +parser.add_argument('--container-runner', dest="container_runner", default='podman', help='Command you run for running container from command line (Default: %(default))') parser.add_argument('args', nargs=argparse.REMAINDER) args = parser.parse_args()