-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
112 lines (98 loc) · 2.63 KB
/
.gitlab-ci.yml
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
image: aurorafossorg/archlinux:latest
stages:
- check
- build
- test
- production
- deploy
# Style checker
codestyle:
stage: check
image: aurorafossorg/dlang:latest
script: dscanner -S .
allow_failure: true
# Syntax check before compilation
syntax_check:
stage: check
image: aurorafossorg/dlang:latest
script: dscanner -s .
# Indentation check according to editorconfig file
editorconfig:
stage: check
image: node:latest
cache:
paths:
- node_modules/
script:
- npm install eclint
- npx eclint check "source/**/*.d" "*.json" "**/meson.build" "*.yml"
# Artifacts template
.artifacts_template: &artifacts_definition
artifacts:
name: "$CI_JOB_NAME"
paths:
- build
# dub template
.linux-dub_template: &linux-dub_definition
cache:
paths:
- .dub/
image: aurorafossorg/dlang:latest
script:
- dub add-local .
- ./tools/dub.sh $BUILD_DUB_FLAGS
.x86_64-linux-deps_template: &x86_64-linux-deps_definition
before_script:
- pacman -Sy gtk3 luarocks lua-lgi python --noconfirm
x86_64-linux-dub-dmd-debug:
stage: build
<<: *artifacts_definition
<<: *linux-dub_definition
<<: *x86_64-linux-deps_definition
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86_64 --compiler=dmd --build=debug
x86_64-linux-dub-ldc-debug:
<<: *artifacts_definition
<<: *linux-dub_definition
<<: *x86_64-linux-deps_definition
stage: build
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86_64 --compiler=ldc --build=debug
x86_64-linux-dub-gdcd-debug:
<<: *artifacts_definition
<<: *linux-dub_definition
<<: *x86_64-linux-deps_definition
stage: build
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86_64 --compiler=gdc --build=debug
allow_failure: true
# Build and test all examples
unittests:
stage: test
<<: *artifacts_definition
<<: *linux-dub_definition
<<: *x86_64-linux-deps_definition
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --build=unittest
code_coverage:
<<: *linux-dub_definition
<<: *x86_64-linux-deps_definition
stage: test
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --build=unittest-cov --coverage
after_script:
- bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
x86_64-linux-dub-ldc-release:
<<: *artifacts_definition
<<: *linux-dub_definition
<<: *x86_64-linux-deps_definition
stage: production
variables:
BUILD_DUB_FLAGS: build --arch=x86_64 --compiler=ldc --build=release
x86_64-linux-dub-dmd-release:
<<: *artifacts_definition
<<: *linux-dub_definition
<<: *x86_64-linux-deps_definition
stage: production
variables:
BUILD_DUB_FLAGS: build --arch=x86_64 --compiler=dmd --build=release