From 2f2f11b7bc62f80f8bbd026605eb984921d4271b Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Sun, 18 Mar 2018 17:03:16 +0200 Subject: [PATCH] gitlabci: Fix flatpak issue building only master. --- .gitlab-ci.yml | 19 +++++++++++++++---- org.gnome.Hammond.json | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5ab3a25..43f98d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ stages: - mkdir -p .cargo_cache # Only stuff inside the repo directory can be cached # Override the CARGO_HOME variable to force it location - - export CARGO_HOME="${PWD}/.cargo_cache" + - export CARGO_HOME=".cargo_cache" script: - rustc -Vv && cargo -Vv # Force regeneration of gresources regardless of artifacts chage @@ -30,7 +30,7 @@ stages: # JOB_NAME - Each job will have it's own cache # COMMIT_REF_SLUG = Lowercase name of the branch # ^ Keep diffrerent caches for each branch - key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + key: "$CI_JOB_NAME" paths: - target/ - .cargo_cache/ @@ -49,8 +49,19 @@ flatpak: image: registry.gitlab.com/alatiera/gnome-nightly-oci/rust-bundle:latest stage: test script: - - flatpak-builder --force-clean --repo=repo app org.gnome.Hammond.json + # Build the flatpak repo + - flatpak-builder --stop-at=hammond app org.gnome.Hammond.json + - flatpak-builder --run app org.gnome.Hammond.json meson --prefix=/app --libdir=/app/lib _build + - flatpak-builder --run app org.gnome.Hammond.json ninja -C _build install + - flatpak-builder --finish-only app org.gnome.Hammond.json + - flatpak build-export repo app + + # Create a flatpak bundle - flatpak build-bundle repo hammond-dev.flatpak org.gnome.Hammond + # Run the tests + # - flatpak-builder --run app org.gnome.Hammond.json ./scripts/release_tests.sh + # - flatpak-builder --run app org.gnome.Hammond.json ninja -C _build test + artifacts: paths: - hammond-dev.flatpak @@ -60,7 +71,7 @@ flatpak: # JOB_NAME - Each job will have it's own cache # COMMIT_REF_SLUG = Lowercase name of the branch # ^ Keep diffrerent caches for each branch - key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + key: "$CI_JOB_NAME" paths: - .flatpak-builder/cache/ - target/ diff --git a/org.gnome.Hammond.json b/org.gnome.Hammond.json index 86a21b9..56a827f 100644 --- a/org.gnome.Hammond.json +++ b/org.gnome.Hammond.json @@ -33,7 +33,7 @@ }, "modules" : [ { - "name" : "Hammond", + "name" : "hammond", "buildsystem" : "meson", "sources" : [ {