aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: d018b57a9a4c8de84e9833cea68cea2bb495e931 (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
stages:
  - docker-images
  - build
  - test
  - clang-tidy

.dockerimage-template: &dockerimage-template
  stage: docker-images
  image: exherbo/exherbo_did
  tags:
    - did
  only:
    refs:
      - schedules
      - web
  script:
    - cd ci/docker/${DISTRIBUTION}/paludis-${DISTRIBUTION}-${COMPILER}
    - dockerd >/dev/null 2>&1 &
    - docker login -u ${DOCKER_USER} -p ${DOCKER_PASSWORD}
    - ./build.sh ${VERSION}
    - docker push paludis/${DISTRIBUTION}-${COMPILER}:${VERSION}

.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

docker-images:exherbo-gcc:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "gcc"
    VERSION: "latest"
  <<: *dockerimage-template

docker-images:exherbo-gcc-testing:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "gcc"
    VERSION: "next"
  <<: *dockerimage-template

docker-images:exherbo-clang:
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "clang"
    VERSION: "latest"
  <<: *dockerimage-template

docker-images:gentoo-gcc:
  variables:
    DISTRIBUTION: "gentoo"
    COMPILER: "gcc"
    VERSION: "latest"
  <<: *dockerimage-template

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}/.*"