stages:
  - build

.cache-paths: &cache-paths
  paths:
    - _ccache/

meson-fedora-x86_64:
  image: registry.gitlab.gnome.org/gnome/gdk-pixbuf/master:v1
  stage: build
  variables:
    BUILD_OPTS: "-Dpng=true -Djpeg=true -Dtiff=true -Djasper=true"
  script:
    - bash -x ./.gitlab/ci/test-docker.sh
  artifacts:
    when: on_failure
    name: "gdk-pixbuf-${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/_build/meson-logs"
  cache:
    key: "$CI_JOB_NAME"
    <<: *cache-paths

stages:
  - build

.cache-paths: &cache-paths
  paths:
    - _ccache/

meson-fedora-x86_64:
  image: registry.gitlab.gnome.org/gnome/gdk-pixbuf/master:v1
  stage: build
  variables:
    BUILD_OPTS: "-Dpng=true -Djpeg=true -Dtiff=true -Djasper=true"
  script:
    - bash -x ./.gitlab/ci/test-docker.sh
  artifacts:
    when: on_failure
    name: "gdk-pixbuf-${CI_COMMIT_REF_NAME}"
    paths:
      - "${CI_PROJECT_DIR}/build_*/meson-logs"
  cache:
    key: "$CI_JOB_NAME"
    <<: *cache-paths

Fix the artifacts caching on failure
ci: Fix the artifacts caching on failure

We generate a random builddir, so we need to modify the `paths` key for
the artifacts we store on CI failure.
