aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: abcfa28b23c08442d22470f678173afc4950350f (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
stages:
  - build
  - test

.build-template: &build-template
  stage: build
  image: paludis/${DISTRIBUTION}-${COMPILER}:${VERSION}
  script:
    - mkdir -pv build-obj && cd build-obj
    - ../ci/configure-paludis.sh .. ${DISTRIBUTION} ${COMPILER}
    - ninja -j$(nproc) all
  cache: &build_artifact_cache
    key: build-${DISTRIBUTION}-${COMPILER}-${VERSION}
    paths:
      - build-obj/

.test-template: &test-template
  stage: test
  image: paludis/${DISTRIBUTION}-${COMPILER}:${VERSION}
  cache: *build_artifact_cache
  script:
    - cd build-obj
    - ctest -V

build:exherbo:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "gcc"
    VERSION: "latest"
  <<: *build-template

test:exherbo:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "gcc"
    VERSION: "latest"
  dependencies:
    - build:exherbo
  <<: *test-template

build:gentoo:
  variables:
    DISTRIBUTION: "gentoo"
    COMPILER: "gcc"
    VERSION: "latest"
  <<: *build-template

test:gentoo:
  variables:
    DISTRIBUTION: "gentoo"
    COMPILER: "gcc"
    VERSION: "latest"
  dependencies:
    - build:gentoo
  <<: *test-template