2017-11-12 11:32:08 +00:00
|
|
|
stages:
|
|
|
|
- test
|
2018-05-14 19:12:07 +00:00
|
|
|
- deploy
|
2017-11-12 11:32:08 +00:00
|
|
|
|
2018-03-19 10:49:11 +00:00
|
|
|
flatpak:
|
2018-06-05 09:34:50 +00:00
|
|
|
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:3.28
|
2018-03-19 10:49:11 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
2018-04-05 17:58:57 +00:00
|
|
|
# Build the flatpak deps
|
2018-03-19 10:49:11 +00:00
|
|
|
- flatpak-builder --stop-at=fractal app flatpak/org.gnome.Fractal.json
|
2018-04-05 17:58:57 +00:00
|
|
|
|
|
|
|
# Force regeneration of gresources regardless of artifacts chage
|
2018-04-16 17:45:14 +00:00
|
|
|
- flatpak-builder --run app flatpak/org.gnome.Fractal.json glib-compile-resources --sourcedir=fractal-gtk/res/ fractal-gtk/res/resources.xml
|
2018-04-05 17:58:57 +00:00
|
|
|
|
2018-03-19 10:49:11 +00:00
|
|
|
- flatpak-builder --run app flatpak/org.gnome.Fractal.json meson --prefix=/app --libdir=/app/lib _build
|
|
|
|
- flatpak-builder --run app flatpak/org.gnome.Fractal.json ninja -C _build install
|
|
|
|
- flatpak-builder --finish-only app flatpak/org.gnome.Fractal.json
|
|
|
|
- flatpak build-export repo app
|
2017-12-22 20:22:32 +00:00
|
|
|
|
2018-03-19 10:49:11 +00:00
|
|
|
# Create a flatpak bundle for designers to use
|
|
|
|
- flatpak build-bundle repo fractal-dev.flatpak org.gnome.Fractal
|
|
|
|
# Run the tests
|
|
|
|
- flatpak-builder --run app flatpak/org.gnome.Fractal.json cargo test
|
2017-11-12 11:32:08 +00:00
|
|
|
|
2018-03-19 10:49:11 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- fractal-dev.flatpak
|
|
|
|
expire_in: 2 days
|
2017-11-12 11:32:08 +00:00
|
|
|
|
2018-03-19 10:49:11 +00:00
|
|
|
cache:
|
|
|
|
# JOB_NAME - Each job will have it's own cache
|
|
|
|
# ^ Keep diffrerent caches for each branch
|
|
|
|
key: "$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- .flatpak-builder/cache/
|
|
|
|
- target/
|
2017-11-12 11:32:08 +00:00
|
|
|
|
2018-06-28 17:28:19 +00:00
|
|
|
.pages:
|
2018-05-18 19:04:12 +00:00
|
|
|
image: fedora
|
2018-05-14 18:58:42 +00:00
|
|
|
stage: deploy
|
|
|
|
only:
|
|
|
|
- master
|
2018-05-18 19:04:12 +00:00
|
|
|
before_script:
|
2018-07-17 19:02:05 +00:00
|
|
|
- dnf install -y rust cargo meson make gtk3-devel gtksourceview3-devel gspell-devel openssl-devel gmp-devel \
|
2018-06-27 07:00:46 +00:00
|
|
|
gstreamer1-devel gstreamer1-plugins-base-tools \
|
|
|
|
gstreamer1-plugins-base-devel \
|
|
|
|
gstreamer1-plugins-good gstreamer1-plugins-good-extras \
|
|
|
|
gstreamer1-plugins-bad-free gstreamer1-plugins-bad-free-devel \
|
|
|
|
gstreamer1-plugins-bad-free-extras
|
|
|
|
|
2018-05-14 18:58:42 +00:00
|
|
|
script:
|
2018-05-18 19:04:12 +00:00
|
|
|
# Setup the cargo cache
|
|
|
|
- mkdir -p .cargo_cache
|
|
|
|
- export CARGO_HOME="${PWD}/.cargo_cache"
|
|
|
|
|
|
|
|
- cargo doc --no-deps
|
2018-05-14 18:58:42 +00:00
|
|
|
- cargo rustdoc -p fractal-gtk -- --document-private-items
|
|
|
|
- rm -rf public
|
|
|
|
- mv target/doc/ public
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
2018-05-18 19:04:12 +00:00
|
|
|
cache:
|
|
|
|
key: "$CI_JOB_NAME"
|
|
|
|
paths:
|
|
|
|
- target/
|
|
|
|
- .cargo_cache/
|
|
|
|
|