aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 03f2eb7b93e8de54754030b33796103922cbd202 (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
stages:
  - docker-images
  - build
  - 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-script: &build-script
  - mkdir -pv build-obj && cd build-obj
  - PYTHON_VERSION=${PYTHON_VERSION} ../ci/configure-paludis.sh .. ${DISTRIBUTION} ${COMPILER}
  - ninja -j$(nproc) all

.build-template: &build-template
  stage: build
  image: paludis/${DISTRIBUTION}-${COMPILER}:${VERSION}
  script:
    - *build-script
    - 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

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

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

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

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

clang-tidy:
  stage: clang-tidy
  extends: .build-template
  variables:
    DISTRIBUTION: "exherbo"
    COMPILER: "clang"
    VERSION: "latest"
    PYTHON_VERSION: "3.7"
  script:
    - *build-script
    - export PATH="${PATH}:$(llvm-config --prefix)/share/clang"
    - run-clang-tidy.py -j$(nproc) -header-filter="${PWD}/.*"