File: .gitlab-ci.yml

package info (click to toggle)
nautilus-python 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 408 kB
  • sloc: xml: 1,686; ansic: 623; python: 238; makefile: 10
file content (42 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
include:
  - component: gitlab.gnome.org/GNOME/citemplates/release-service@master
    inputs:
      dist-job-name: "build-and-test"

build-and-test:
  image: nixpkgs/nix:latest
  variables:
    MESON_BUILD_DIR: _build
  script:
    - nix-shell --run "meson setup '${MESON_BUILD_DIR}'"
    - nix-shell --run "meson compile -C '${MESON_BUILD_DIR}'"
    - nix-shell --run "meson test -C '${MESON_BUILD_DIR}'"
    - nix-shell --run "meson dist -C '${MESON_BUILD_DIR}' --include-subprojects"
    - cp -r "${MESON_BUILD_DIR}/meson-dist/" "${CI_PROJECT_DIR}/public-dist/"
  artifacts:
    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    when: "always"
    paths:
      - "public-dist"

build-nix-derivation:
  image: nixpkgs/nix:latest
  script:
    # Build the project including docs.
    - nix-build -A all
    - cp -r result-devdoc/share/gtk-doc/html/nautilus-python/ public/
  artifacts:
    paths:
      - public/

pages:
  stage: deploy
  dependencies:
    - build-nix-derivation
  script:
    - echo "Re-using public artifact from build job"
  artifacts:
    paths:
      - public/
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH