From 48e1867aa365b4ffc9868f7d89cc471b05e2853c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Mon, 1 Jul 2024 14:04:15 +0200 Subject: [PATCH] ci: Add manual job to test Flatpak build against stable runtime --- .gitlab-ci/build.yml | 24 +++++ .gitlab-ci/org.gnome.Fractal.CiTest.json | 117 +++++++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 .gitlab-ci/org.gnome.Fractal.CiTest.json diff --git a/.gitlab-ci/build.yml b/.gitlab-ci/build.yml index efb734de..cfe6b682 100644 --- a/.gitlab-ci/build.yml +++ b/.gitlab-ci/build.yml @@ -23,3 +23,27 @@ build@aarch64: extends: - .flatpak@aarch64 stage: build + +# Test builds with the stable runtime to make sure that the Flatpak will build on Flathub. +# Should be run manually before tagging a new release. +.build-stable: + image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-46' + variables: + MANIFEST_PATH: ".gitlab-ci/org.gnome.Fractal.CiTest.json" + APP_ID: "org.gnome.Fractal.CiTest" + RUNTIME_REPO: "https://flathub.org/repo/flathub.flatpakrepo" + BUNDLE: "${APP_ID}.flatpak" + +build-stable@x86_64: + extends: + - .flatpak@x86_64 + - .build-stable + stage: build + when: manual + +build-stable@aarch64: + extends: + - .flatpak@aarch64 + - .build-stable + stage: build + when: manual diff --git a/.gitlab-ci/org.gnome.Fractal.CiTest.json b/.gitlab-ci/org.gnome.Fractal.CiTest.json new file mode 100644 index 00000000..63106e27 --- /dev/null +++ b/.gitlab-ci/org.gnome.Fractal.CiTest.json @@ -0,0 +1,117 @@ +{ + "id": "org.gnome.Fractal.CiTest", + "runtime": "org.gnome.Platform", + "runtime-version": "46", + "sdk": "org.gnome.Sdk", + "sdk-extensions": [ + "org.freedesktop.Sdk.Extension.rust-stable", + "org.freedesktop.Sdk.Extension.llvm16" + ], + "command": "fractal", + "finish-args": [ + "--socket=fallback-x11", + "--socket=wayland", + "--socket=pulseaudio", + "--share=network", + "--share=ipc", + "--device=dri" + ], + "build-options": { + "append-ld-library-path": "/usr/lib/sdk/llvm16/lib", + "append-path": "/usr/lib/sdk/llvm16/bin:/usr/lib/sdk/rust-stable/bin", + "build-args": [ + "--share=network" + ], + "test-args": [ + "--socket=x11", + "--share=network" + ] + }, + "modules": [ + { + "name": "abseil", + "buildsystem": "cmake-ninja", + "config-opts": [ + "-DCMAKE_CXX_STANDARD=17", + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-DBUILD_SHARED_LIBS=ON", + "-DABSL_PROPAGATE_CXX_STD=ON" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/abseil/abseil-cpp.git", + "tag": "20240116.2", + "commit": "d7aaad83b488fd62bd51c81ecf16cd938532cc0a" + } + ] + }, + { + "name": "protobuf", + "buildsystem": "cmake-ninja", + "config-opts": [ + "-DCMAKE_POSITION_INDEPENDENT_CODE=ON", + "-Dprotobuf_ABSL_PROVIDER=package", + "-Dprotobuf_BUILD_SHARED_LIBS=ON", + "-Dprotobuf_BUILD_TESTS=OFF" + ], + "cleanup": [ + "/bin/protoc*", + "/lib/libprotoc*", + "/lib/libprotobuf-lite*" + ], + "sources": [ + { + "type": "git", + "url": "https://github.com/protocolbuffers/protobuf.git", + "tag": "v25.3", + "commit": "4a2aef570deb2bfb8927426558701e8bfc26f2a4" + } + ] + }, + { + "name": "protobuf-c", + "buildsystem": "autotools", + "sources": [ + { + "type": "git", + "url": "https://github.com/protobuf-c/protobuf-c.git", + "tag": "v1.5.0", + "commit": "8c201f6e47a53feaab773922a743091eb6c8972a" + } + ] + }, + { + "name": "libshumate", + "buildsystem": "meson", + "config-opts": [ + "-Dgir=false", + "-Dvapi=false", + "-Dgtk_doc=false", + "-Dvector_renderer=true" + ], + "sources": [ + { + "type": "git", + "url": "https://gitlab.gnome.org/GNOME/libshumate.git", + "tag": "1.2.2", + "commit": "fab290f36bb7043fe6107308ff4f91c80492aa11" + } + ] + }, + { + "name": "fractal", + "buildsystem": "meson", + "run-tests": true, + "config-opts": [ + "-Dprofile=default" + ], + "sources": [ + { + "type": "dir", + "path": "../" + } + ] + } + ] +}