aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: a0566e25cd1b860cf2c0dc1d196126a570370e60 (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
stages:
  - build
  - test
  - clang-tidy

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

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

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

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

build:exherbo-testing:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "gcc"
    VERSION: "next"
    PYTHON_VERSION: "3.8"
  allow_failure: true
  <<: *build-template

test:exherbo-testing:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "gcc"
    VERSION: "next"
  dependencies:
    - build:exherbo-testing
  allow_failure: true
  <<: *test-template

build:exherbo-clang:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "clang"
    VERSION: "latest"
    PYTHON_VERSION: "3.7"
  <<: *build-template

test:exherbo-clang:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "clang"
    VERSION: "latest"
  dependencies:
    - build:exherbo-clang
  allow_failure: true
  <<: *test-template

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

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

clang-tidy:
  stage: clang-tidy
  dependencies:
    - build:exherbo-clang
  image: paludis/exherbo-clang
  script:
    - export PATH="${PATH}:$(llvm-config --prefix)/share/clang"
    - run-clang-tidy.py -j$(nproc) -p build-obj/ -header-filter="${PWD}/.*"