gitlabci: Fix flatpak issue building only master.

This commit is contained in:
Jordan Petridis 2018-03-18 17:03:16 +02:00
parent 260e6015a1
commit 2f2f11b7bc
No known key found for this signature in database
GPG Key ID: CEABAD9F5683B9A6
2 changed files with 16 additions and 5 deletions

View File

@ -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/

View File

@ -33,7 +33,7 @@
},
"modules" : [
{
"name" : "Hammond",
"name" : "hammond",
"buildsystem" : "meson",
"sources" : [
{