Loupe/.gitlab-ci.yml
Matteo Nardi 5e32cfa1df window: remember image property visibility state
Added GSettings support to Loupe. Inspiration was taken from Fractal:
LpApplication will contain `gio::Settings` and all code needing them
will reach them as a singleton by calling `g_application_get_default`.
This design makes the settings dependency less explicit than dependency
injection, but allows for shorter code when new settings will be added
across different parts of the application.

A `show-properties` setting is added for remembaring the image property
sidebar state. It's read by LpWindow when the current page changes, and
saved when toggling the sidebar. When no image is being shown, the
sidebar is always hidden, while the setting remains unchanged. The
sidebar state will be restored when a picture is opened.

Closes #147
2023-12-07 15:25:26 +00:00

150 lines
4.4 KiB
YAML

include:
- project: "GNOME/citemplates"
file: "flatpak/flatpak_ci_initiative.yml"
variables:
BUNDLE: "org.gnome.Loupe.Devel.flatpak"
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Loupe.Devel.json"
FLATPAK_MODULE: "loupe"
APP_ID: "org.gnome.Loupe.Devel"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
flatpak:
extends: ".flatpak@x86_64"
interruptible: true
variables:
# We are running tests manually
RUN_TESTS: "0"
CONFIG_OPTS: "-Dprofile=ci -Ddisable-glycin-sandbox=false"
flatpak@aarch64:
extends: ".flatpak@aarch64"
allow_failure: true
interruptible: true
variables:
RUN_TESTS: "0"
CONFIG_OPTS: "-Dprofile=ci -Ddisable-glycin-sandbox=false"
cargo-fmt:
image: "rust:slim"
interruptible: true
script:
- rustup component add rustfmt
# Create blank versions of our configured files
# so rustfmt does not yell about non-existent files or completely empty files
- echo -e "" >> src/config.rs
- rustc -Vv && cargo -Vv
- cargo fmt --version
- cargo fmt --all -- --check
cargo-doc:
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master'
interruptible: true
tags:
- flatpak
artifacts:
name: 'Code Documentation'
paths:
- doc
script:
# Report the installed versions of the runtime
- flatpak info org.gnome.Platform
- flatpak info org.gnome.Sdk
# Print the date, since appstream depends on local timezone
- date && date -u
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
- flatpak-builder --user --disable-rofiles-fuse --force-clean --keep-build-dirs --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
- flatpak build-finish --socket=x11 --share=network flatpak_app
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak-builder --user --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} <<END
ninja src/doc
END
- cp -r .flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/src/doc doc
- chmod -R a=rwx doc
cargo-clippy:
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master'
interruptible: true
tags:
- flatpak
script:
# Report the installed versions of the runtime
- flatpak info org.gnome.Platform
- flatpak info org.gnome.Sdk
# Print the date, since appstream depends on local timezone
- date && date -u
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
- flatpak-builder --user --disable-rofiles-fuse --force-clean --keep-build-dirs --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
- flatpak build-finish --socket=x11 --share=network flatpak_app
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak-builder --user --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} <<END
cargo clippy -- -D warnings
END
cargo-test:
image: 'quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master'
interruptible: true
tags:
- flatpak
script:
# Report the installed versions of the runtime
- flatpak info org.gnome.Platform
- flatpak info org.gnome.Sdk
# Print the date, since appstream depends on local timezone
- date && date -u
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
- flatpak-builder --user --disable-rofiles-fuse --force-clean --keep-build-dirs --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
- flatpak build-finish --socket=x11 --share=network flatpak_app
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak-builder --user --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} <<END
cargo test
END
cargo-audit:
interruptible: true
image: rust
script:
- cargo install cargo-deny
- cargo deny check
other-checks:
interruptible: true
image: alpine
script:
- apk add --no-cache git
- git ls-files 'src/*.rs' 'src/*.ui' 'data/*.ui' 'data/*.desktop.in*' '*.gschema.xml.in' '*.metainfo.xml.in*' > po/POTFILES.in
- git diff --exit-code
pages:
stage: deploy
dependencies:
- cargo-doc
script:
- mkdir public
- mv doc public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
nightly:
extends: ".publish_nightly"
stage: deploy
dependencies:
- flatpak
nightly@aarch64:
extends: ".publish_nightly"
stage: deploy
dependencies:
- flatpak@aarch64