diff --git a/.github/docker/archlinux/Dockerfile b/.github/docker/archlinux/Dockerfile new file mode 100644 index 000000000..fd409a6e9 --- /dev/null +++ b/.github/docker/archlinux/Dockerfile @@ -0,0 +1,6 @@ +ARG BASE_IMAGE +FROM $BASE_IMAGE AS base + +RUN pacman -Syu --noconfirm git python sudo && pacman -Scc --noconfirm + +RUN useradd -m build diff --git a/.github/docker/debian-12/Dockerfile b/.github/docker/debian-12/Dockerfile deleted file mode 100644 index 749fc84a0..000000000 --- a/.github/docker/debian-12/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM debian:12 - -RUN apt update && apt install -y git python3 && apt clean diff --git a/.github/docker/debian/Dockerfile b/.github/docker/debian/Dockerfile new file mode 100644 index 000000000..8939a5f1c --- /dev/null +++ b/.github/docker/debian/Dockerfile @@ -0,0 +1,4 @@ +ARG BASE_IMAGE +FROM $BASE_IMAGE AS base + +RUN apt update && apt dist-upgrade -y && apt install -y git python3 && apt clean diff --git a/.github/docker/fedora/Dockerfile b/.github/docker/fedora/Dockerfile new file mode 100644 index 000000000..327a9775c --- /dev/null +++ b/.github/docker/fedora/Dockerfile @@ -0,0 +1,4 @@ +ARG BASE_IMAGE +FROM $BASE_IMAGE AS base + +RUN dnf upgrade -y && dnf install -y git python3 && dnf clean all diff --git a/.github/docker/opensuse/Dockerfile b/.github/docker/opensuse/Dockerfile new file mode 100644 index 000000000..fa3e00554 --- /dev/null +++ b/.github/docker/opensuse/Dockerfile @@ -0,0 +1,4 @@ +ARG BASE_IMAGE +FROM $BASE_IMAGE AS base + +RUN zypper refresh && zypper update -y && zypper install -y git python3 && zypper clean --all diff --git a/.github/workflows/build-containers.yml b/.github/workflows/build-containers.yml index 720755765..5e2a3a26a 100644 --- a/.github/workflows/build-containers.yml +++ b/.github/workflows/build-containers.yml @@ -1,3 +1,11 @@ +# Weekly build of the Linux Docker containers. +# +# The objective is to reduce the problem where package updates often break the build process +# due to transient network errors. +# +# We use Docker Buildx instead of Docker Automated Builds so that we can create an image that is +# always at most a week out of date (instead of the last time a Dockerfile change was pushed). + name: Build containers on: @@ -7,8 +15,73 @@ on: jobs: build-containers: - runs-on: ubuntu-latest + name: ${{ matrix.os.name }} + runs-on: ${{ matrix.os.runs-on }} if: ${{ vars.BUILD_CONTAINERS }} + timeout-minutes: 5 + + strategy: + matrix: + os: + - name: debian-12-amd64 + runs-on: ubuntu-latest + config-dir: debian + base-image: debian:12-slim + platform: amd64 + + - name: debian-12-arm64 + runs-on: buildjet-4vcpu-ubuntu-2204-arm + config-dir: debian + base-image: arm64v8/debian:12-slim + platform: arm64 + + - name: ubuntu-24.04-amd64 + runs-on: ubuntu-latest + config-dir: debian + base-image: ubuntu:24.04 + platform: amd64 + + - name: ubuntu-22.04-amd64 + runs-on: ubuntu-latest + config-dir: debian + base-image: ubuntu:22.04 + platform: amd64 + + - name: fedora-40-amd64 + runs-on: ubuntu-latest + config-dir: fedora + base-image: fedora:40 + platform: amd64 + + - name: fedora-40-arm64 + runs-on: buildjet-4vcpu-ubuntu-2204-arm + config-dir: fedora + base-image: arm64v8/fedora:40 + platform: arm64 + + - name: fedora-39-amd64 + runs-on: ubuntu-latest + config-dir: fedora + base-image: fedora:39 + platform: amd64 + + - name: opensuse-amd64 + runs-on: ubuntu-latest + config-dir: opensuse + base-image: opensuse/tumbleweed:latest + platform: amd64 + + - name: archlinux-amd64 + runs-on: ubuntu-latest + config-dir: archlinux + base-image: archlinux:latest + platform: amd64 + + - name: manjaro-amd64 + config-dir: archlinux + runs-on: ubuntu-latest + base-image: manjarolinux/base:latest + platform: amd64 steps: - name: Checkout @@ -26,8 +99,9 @@ jobs: - name: Build and push uses: docker/build-push-action@v6 with: - context: ./.github/docker/debian-12/ - file: ./.github/docker/debian-12/Dockerfile push: true - tags: symless/debian:12 - platforms: linux/amd64,linux/arm64 + context: ./.github/docker/${{ matrix.os.config-dir }} + file: ./.github/docker/${{ matrix.os.config-dir }}/Dockerfile + tags: symless/synergy-core:${{ matrix.os.name }} + build-args: BASE_IMAGE=${{ matrix.os.base-image }} + platforms: linux/${{ matrix.os.platform }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 99d3d3241..2e6a882ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,72 +187,50 @@ jobs: matrix: distro: - name: debian-12-arm64 - container: arm64v8/debian:12 + container: symless/synergy-core:debian-12-arm64 runs-on: buildjet-4vcpu-ubuntu-2204-arm - install-deps-apt: true - - - name: debian-12-amd64 - container: debian:12 - runs-on: ubuntu-latest - install-deps-apt: true - - - name: ubuntu-24.04-amd64 - container: ubuntu:24.04 - runs-on: ubuntu-latest - install-deps-apt: true extra-packages: true - - name: ubuntu-22.04-amd64 - container: ubuntu:22.04 + - name: debian-12-amd64 + container: symless/synergy-core:debian-12-amd64 + runs-on: ubuntu-latest + extra-packages: true + + - name: ubuntu-24.04-amd64 + container: symless/synergy-core:ubuntu-24.04-amd64 + runs-on: ubuntu-latest + + - name: ubuntu-22.04-amd64 + container: symless/synergy-core:ubuntu-22.04-amd64 runs-on: ubuntu-latest - install-deps-apt: true - name: fedora-40-arm64 - container: arm64v8/fedora:40 + container: symless/synergy-core:fedora-40-arm64 runs-on: buildjet-4vcpu-ubuntu-2204-arm - install-deps-dnf: true - name: fedora-40-amd64 - container: fedora:40 + container: symless/synergy-core:fedora-40-amd64 runs-on: ubuntu-latest - install-deps-dnf: true - name: fedora-39-amd64 - container: fedora:39 + container: symless/synergy-core:fedora-39-amd64 runs-on: ubuntu-latest - install-deps-dnf: true - name: opensuse-amd64 - container: opensuse/tumbleweed:latest + container: symless/synergy-core:opensuse-amd64 runs-on: ubuntu-latest - install-deps-zypper: true - - name: arch-amd64 - container: archlinux:latest + - name: archlinux-amd64 + container: symless/synergy-core:archlinux-amd64 runs-on: ubuntu-latest - install-deps-pacman: true package-user: build - name: manjaro-amd64 - container: manjarolinux/base:latest + container: symless/synergy-core:manjaro-amd64 runs-on: ubuntu-latest - install-deps-pacman: true package-user: build steps: - - name: Bootstrap - run: | - if [ "${{ matrix.distro.install-deps-apt }}" = "true" ]; then - apt update && apt install -y git python3 - elif [ "${{ matrix.distro.install-deps-dnf }}" = "true" ]; then - dnf install -y git python3 - elif [ "${{ matrix.distro.install-deps-pacman }}" = "true" ]; then - pacman -Syu --noconfirm git python sudo - useradd -m build - elif [ "${{ matrix.distro.install-deps-zypper }}" = "true" ]; then - zypper install -y git python3 - fi - - name: Checkout uses: actions/checkout@v4 with: diff --git a/ChangeLog b/ChangeLog index 07dc285f4..a0c9ba58a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -44,6 +44,8 @@ Enhancements: - #7372 Add Git SHA to about screen and --version - #7373 Upgrade from Qt5 to Qt6 for more modern UI - #7374 Add missing DEB and RPM dependencies +- #7376 Automated weekly build of Docker images for Linux runners + # 1.14.6