Commit 51fdad2a authored by Jordan Petridis's avatar Jordan Petridis 🌱

CI: Use variables instread of hardcoding things

parent 86545e5f
......@@ -7,18 +7,23 @@ variables:
BUNDLE: "org.gnome.Podcasts.${CI_COMMIT_REF_SHA}.flatpak"
flatpak:
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.28
stage: test
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.28"
stage: "test"
variables:
MANIFEST_PATH: "org.gnome.Podcasts.json"
FLATPAK_MODULE: "gnome-podcasts"
DBUS_ID: "org.gnome.Podcasts"
script:
- flatpak-builder --stop-at=gnome-podcasts app org.gnome.Podcasts.json
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
# https://gitlab.gnome.org/World/podcasts/issues/55
# Force regeneration of gresources regardless of artifacts chage
- flatpak-builder --run app org.gnome.Podcasts.json glib-compile-resources --sourcedir=podcasts-gtk/resources/ podcasts-gtk/resources/resources.xml
- flatpak-builder --run app ${MANIFEST_PATH} glib-compile-resources --sourcedir=podcasts-gtk/resources/ podcasts-gtk/resources/resources.xml
# Build the flatpak repo
- flatpak-builder --run app org.gnome.Podcasts.json meson --prefix=/app _build
- flatpak-builder --run app org.gnome.Podcasts.json ninja -C _build install
- flatpak-builder --finish-only app org.gnome.Podcasts.json
- flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app _build
- flatpak-builder --run app ${MANIFEST_PATH} ninja -C _build install
- flatpak-builder --finish-only app ${MANIFEST_PATH}
- flatpak build-export repo app
# Run the tests
......@@ -27,13 +32,13 @@ flatpak:
flatpak-builder --run \
--env=CARGO_HOME="target/cargo-home/" \
--env=RUSTFLAGS="--cfg rayon_unstable" \
app org.gnome.Podcasts.json \
app ${MANIFEST_PATH} \
cargo test -- --test-threads=1
# - flatpak-builder --run app org.gnome.Podcasts.json cargo test -- --test-threads=1 --ignored
# - flatpak-builder --run app ${MANIFEST_PATH} cargo test -- --test-threads=1 --ignored
# Create a flatpak bundle
- flatpak build-bundle repo ${BUNDLE} org.gnome.Podcasts
- flatpak build-bundle repo ${BUNDLE} ${DBUS_ID}
artifacts:
paths:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment