From de9db08a99db9154db55a905c45826bc2f3e73bc Mon Sep 17 00:00:00 2001 From: Andy Holmes Date: Sun, 7 Jul 2024 12:49:44 -0700 Subject: [PATCH] feat: support runtimes from multiple remotes --- .github/workflows/cr.yml | 67 +++++++++++++++++++++++++++++++++------- 1 file changed, 56 insertions(+), 11 deletions(-) diff --git a/.github/workflows/cr.yml b/.github/workflows/cr.yml index 20b28a4..c65dbdd 100644 --- a/.github/workflows/cr.yml +++ b/.github/workflows/cr.yml @@ -12,6 +12,18 @@ on: - cron: "0 0 * * */7" workflow_dispatch: +env: + FDO_22_08_PKG: "org.freedesktop.Platform/x86_64/22.08 org.freedesktop.Sdk/x86_64/22.08 org.freedesktop.Platform/aarch64/22.08 org.freedesktop.Sdk/aarch64/22.08" + FDO_23_08_PKG: "org.freedesktop.Platform/x86_64/23.08 org.freedesktop.Sdk/x86_64/23.08 org.freedesktop.Platform/aarch64/23.08 org.freedesktop.Sdk/aarch64/23.08" + ELEMENTARY_PKG: "io.elementary.BaseApp//juno-22.08 org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08" + GNOME_45_PKG: "org.gnome.Platform/x86_64/45 org.gnome.Sdk/x86_64/45 org.gnome.Platform/aarch64/45 org.gnome.Sdk/aarch64/45" + GNOME_46_PKG: "org.gnome.Platform/x86_64/46 org.gnome.Sdk/x86_64/46 org.gnome.Platform/aarch64/46 org.gnome.Sdk/aarch64/46" + GNOME_MASTER_PKG: "org.gnome.Platform/x86_64/master org.gnome.Sdk/x86_64/master org.gnome.Platform/aarch64/master org.gnome.Sdk/aarch64/master" + KDE_PKG: "org.kde.Platform/x86_64/5.15-23.08 org.kde.Sdk/x86_64/5.15-23.08 org.kde.Platform/aarch64/5.15-23.08 org.kde.Sdk/aarch64/5.15-23.08" + RUST_PKG: "org.freedesktop.Sdk.Extension.llvm17/x86_64/23.08 org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08 org.freedesktop.Sdk.Extension.llvm17/aarch64/23.08 org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08" + TYPESCRIPT_PKG: "org.freedesktop.Sdk.Extension.node18/x86_64/23.08 org.freedesktop.Sdk.Extension.typescript/x86_64/23.08" + VALA_PKG: "org.freedesktop.Sdk.Extension.vala/x86_64/23.08" + jobs: build: name: Build @@ -34,15 +46,15 @@ jobs: # add a few packages to support additional languages and so on. - name: freedesktop tag: 22.08 - packages: org.freedesktop.Platform/x86_64/22.08 org.freedesktop.Sdk/x86_64/22.08 org.freedesktop.Platform/aarch64/22.08 org.freedesktop.Sdk/aarch64/22.08 + flathub: ${{ env.FDO_22_08_PKG }} - name: freedesktop tag: 23.08 - packages: org.freedesktop.Platform/x86_64/23.08 org.freedesktop.Sdk/x86_64/23.08 org.freedesktop.Platform/aarch64/23.08 org.freedesktop.Sdk/aarch64/23.08 + flathub: ${{ env.FDO_23_08_PKG }} - name: rust tag: 23.08 - packages: org.freedesktop.Platform/x86_64/23.08 org.freedesktop.Sdk/x86_64/23.08 org.freedesktop.Platform/aarch64/23.08 org.freedesktop.Sdk/aarch64/23.08 org.freedesktop.Sdk.Extension.llvm17/x86_64/23.08 org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08 org.freedesktop.Sdk.Extension.llvm17/aarch64/23.08 org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08 + flathub: ${{ env.FDO_23_08_PKG }} ${{ env.RUST_PKG }} # elementaryOS # @@ -50,7 +62,7 @@ jobs: # doesn't use these, but feel free to open a PR if out-of-date. - name: elementary tag: juno-22.08 - packages: io.elementary.BaseApp//juno-22.08 org.freedesktop.Platform//22.08 org.freedesktop.Sdk//22.08 + flathub: ${{ env.ELEMENTARY_PKG }} # GNOME # @@ -58,23 +70,31 @@ jobs: # things for e.g. Rust bindings. - name: gnome tag: 45 - packages: org.gnome.Platform/x86_64/45 org.gnome.Sdk/x86_64/45 org.gnome.Platform/aarch64/45 org.gnome.Sdk/aarch64/45 + flathub: ${{ env.GNOME_45_PKG }} - name: gnome tag: 46 - packages: org.gnome.Platform/x86_64/46 org.gnome.Sdk/x86_64/46 org.gnome.Platform/aarch64/46 org.gnome.Sdk/aarch64/46 + flathub: ${{ env.GNOME_46_PKG }} - name: gnome tag: master - packages: org.gnome.Platform/x86_64/master org.gnome.Sdk/x86_64/master org.gnome.Platform/aarch64/master org.gnome.Sdk/aarch64/master + gnome_nightly: ${{ env.GNOME_MASTER_PKG }} - name: gnome-rust tag: 45 - packages: org.freedesktop.Sdk.Extension.llvm17/x86_64/23.08 org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08 org.gnome.Platform/x86_64/45 org.gnome.Sdk/x86_64/45 org.freedesktop.Sdk.Extension.llvm17/aarch64/23.08 org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08 org.gnome.Platform/aarch64/45 org.gnome.Sdk/aarch64/45 + flathub: ${{ env.GNOME_45_PKG }} ${{ env.RUST_PKG }} - name: gnome-rust tag: 46 - packages: org.freedesktop.Sdk.Extension.llvm17/x86_64/23.08 org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08 org.gnome.Platform/x86_64/46 org.gnome.Sdk/x86_64/46 org.freedesktop.Sdk.Extension.llvm17/aarch64/23.08 org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08 org.gnome.Platform/aarch64/46 org.gnome.Sdk/aarch64/46 + flathub: ${{ env.GNOME_46_PKG }} ${{ env.RUST_PKG }} + + - name: gnome-typescript + tag: 46 + flathub: ${{ env.GNOME_46_PKG }} ${{ env.TYPESCRIPT_PKG }} + + - name: gnome-vala + tag: 46 + flathub: ${{ env.GNOME_46_PKG }} ${{ env.VALA_PKG }} # Workbench # @@ -82,7 +102,8 @@ jobs: # language extensions. - name: workbench tag: master - packages: org.freedesktop.Sdk.Extension.llvm16/x86_64/23.08 org.freedesktop.Sdk.Extension.node18/x86_64/23.08 org.freedesktop.Sdk.Extension.typescript/x86_64/23.08 org.freedesktop.Sdk.Extension.rust-stable/x86_64/23.08 org.freedesktop.Sdk.Extension.vala/x86_64/23.08 org.gnome.Platform/x86_64/master org.gnome.Sdk/x86_64/master org.freedesktop.Sdk.Extension.llvm16/aarch64/23.08 org.freedesktop.Sdk.Extension.node18/aarch64/23.08 org.freedesktop.Sdk.Extension.typescript/aarch64/23.08 org.freedesktop.Sdk.Extension.rust-stable/aarch64/23.08 org.freedesktop.Sdk.Extension.vala/aarch64/23.08 org.gnome.Platform/aarch64/master org.gnome.Sdk/aarch64/master + flathub: ${{ env.RUST_PKG }} ${{ env.TYPESCRIPT_PKG }} ${{ env.VALA_PKG }} + gnome_nightly: ${{ env.GNOME_MASTER_PKG }} # KDE # @@ -90,7 +111,7 @@ jobs: # these, but feel free to open a PR if out-of-date. - name: kde tag: 5.15-23.08 - packages: org.kde.Platform/x86_64/5.15-23.08 org.kde.Sdk/x86_64/5.15-23.08 org.kde.Platform/aarch64/5.15-23.08 org.kde.Sdk/aarch64/5.15-23.08 + flathub: ${{ env.KDE_PKG }} fail-fast: false steps: @@ -138,6 +159,30 @@ jobs: ${{ matrix.runtime.packages }} EOF + if [ -n "${{ matrix.runtime.gnome_nightly }}" ]; then + cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF + RUN --security=insecure flatpak install -y --noninteractive \ + gnome-nightly \ + ${{ matrix.runtime.packages }} + EOF + fi + + if [ -n "${{ matrix.runtime.flathub_beta }}" ]; then + cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF + RUN --security=insecure flatpak install -y --noninteractive \ + flathub-beta \ + ${{ matrix.runtime.packages }} + EOF + fi + + if [ -n "${{ matrix.runtime.flathub }}" ]; then + cat >> ${{ matrix.runtime.name }}.Dockerfile << EOF + RUN --security=insecure flatpak install -y --noninteractive \ + flathub \ + ${{ matrix.runtime.packages }} + EOF + fi + - name: Build uses: docker/build-push-action@v6 with: