1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-07-07 19:39:49 +00:00
evince/.gitlab-ci.yml
Germán Poo-Caamaño 0ea6860eaf ci: Install docker to rebuild image
* Add a CI stage to rebuild the CI image and update Gitlab's
  registry.
* Change the tag to use :latest instead of :poppler. Thus, future
  rebuilds will not need manual intervention (or reduce it at least).
* Use Alpine to build the image, as it is small and it only requires
  buildah and runc.
2022-09-18 10:17:14 -03:00

93 lines
2.6 KiB
YAML

include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
stages:
- build
- deploy
- image
variables:
BUNDLE: "org.gnome.Evince.flatpak"
meson:
image: registry.gitlab.gnome.org/gnome/evince/x86_64-ubuntu:latest
stage: build
script:
- >
meson
-Dlibhandy:examples=false -Dlibhandy:tests=false -Dlibhandy:vapi=false
-Dlibhandy:glade_catalog=disabled -Dlibhandy:introspection=disabled
_build
- ninja -C _build all
artifacts:
when: on_failure
paths:
- _build/meson-logs/meson-log.txt
expire_in: 2 days
meson-internal-synctex:
image: registry.gitlab.gnome.org/gnome/evince/x86_64-ubuntu:latest
stage: build
script:
- meson -Dinternal_synctex=true _build
- ninja -C _build all
artifacts:
when: on_failure
paths:
- _build/meson-logs/meson-log.txt
expire_in: 2 days
flatpak:
extends: .flatpak
stage: build
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Evince.json"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
FLATPAK_MODULE: "evince"
MESON_ARGS: "-Dnautilus=false -Dgtk_doc=false"
APP_ID: "org.gnome.Evince"
artifacts:
# Rewrite paths and reports to "remove" testlog.txt and junit files,
# which do not exists in evince build, yet.
paths:
- "${BUNDLE}"
- 'repo.tar'
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt'
reports:
junit: []
nightly:
dependencies:
- flatpak
extends: .publish_nightly
update image:
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE/x86_64-ubuntu
# Tell 'docker:dind' to enable TLS (recommended)
# and generate certificates in the specified directory.
DOCKER_TLS_CERTDIR: "/certs"
STORAGE_DRIVER: vfs
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot
image: alpine:latest
stage: image
script:
- apk add --no-cache buildah runc
- buildah bud --tag $IMAGE_TAG -f .gitlab-ci/ubuntu.Dockerfile
- buildah tag $IMAGE_TAG "$IMAGE_TAG:v$CI_JOB_ID"
- buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $IMAGE_TAG
- buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD "$IMAGE_TAG:v$CI_JOB_ID"
when: manual
only:
- web
- main
except:
variables:
- $CI_PROJECT_NAMESPACE != "GNOME"