-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
134 lines (116 loc) · 3.08 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
image: aurorafossorg/archlinux:latest
stages:
- check
- build
- test
- production
- deploy
# Style checker
codestyle:
stage: check
image: aurorafossorg/dlang:latest
script: dscanner -S .
# 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 "src/**/*.d" "*.json" "**/meson.build" "*.yml"
# Artifacts template
.artifacts_template: &artifacts_definition
artifacts:
name: "$CI_JOB_NAME"
paths:
- .out/bin/
# dub template
.linux-dub_template: &linux-dub_definition
cache:
paths:
- .dub/
image: aurorafossorg/dlang:latest
script:
- dub $BUILD_DUB_FLAGS
x86_64-linux-dub-dmd-debug:
stage: build
<<: *artifacts_definition
<<: *linux-dub_definition
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86_64 --compiler=dmd --build=debug
x86-linux-dub-dmd-debug:
stage: build
<<: *artifacts_definition
<<: *linux-dub_definition
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86 --compiler=dmd --build=debug
x86_64-linux-dub-ldc-debug:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: build
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86_64 --compiler=ldc --build=debug
x86-linux-dub-ldc-debug:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: build
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86 --compiler=ldc --build=debug
x86_64-linux-dub-gdcd-debug:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: build
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86_64 --compiler=gdc --build=debug
allow_failure: true
x86-linux-dub-gdc-debug:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: build
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --arch=x86 --compiler=gdc --build=debug
allow_failure: true
unittests:
stage: test
<<: *artifacts_definition
<<: *linux-dub_definition
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --build=unittest
code_coverage:
<<: *linux-dub_definition
stage: test
variables:
BUILD_DUB_FLAGS: $CI_JOB_STAGE --build=unittest-cov --coverage
after_script:
- bash <(curl -s https://codecov.io/bash)
x86_64-linux-dub-ldc-release:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: production
variables:
BUILD_DUB_FLAGS: build --arch=x86_64 --compiler=ldc --build=release
x86-linux-dub-ldc-release:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: production
variables:
BUILD_DUB_FLAGS: build --arch=x86 --compiler=ldc --build=release
x86_64-linux-dub-dmd-release:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: production
variables:
BUILD_DUB_FLAGS: build --arch=x86_64 --compiler=dmd --build=release
x86-linux-dub-dmd-release:
<<: *artifacts_definition
<<: *linux-dub_definition
stage: production
variables:
BUILD_DUB_FLAGS: build --arch=x86 --compiler=dmd --build=release