-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
148 lines (131 loc) · 2.62 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
135
136
137
138
139
140
141
142
143
144
145
146
stages:
- build
- unit-testing
- interpretation-testing
.config: &config
rules: &default_rules
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
YADL_PATH: &path target/scala-3.4.1
YADL_JAR: &jar $YADL_PATH/yadl.jar
YADL_WIN: &win zig-out/bin/yadl-win.exe
YADL_LINUX: &linux zig-out/bin/yadl-linux
YADL_MAC: &mac zig-out/bin/yadl-mac
default:
cache:
key: build-cache-$CI_COMMIT_REF_SLUG
paths:
- *path
- zig-out
- .zig-cache
## scala bulid pipeline
build-scala:
stage: build
script:
- sbt clean compile assembly
rules: *default_rules
timeout: 3 min
unit-tests-scala:
stage: unit-testing
needs:
- build-scala
script:
- sbt test
rules: *default_rules
timeout: 5 min
pytest-scripts-scala:
<<: *config
stage: interpretation-testing
allow_failure: true
needs:
- unit-tests-scala
script:
- pytest test-scripts/scala/*.py
artifacts:
paths:
- *jar
timeout: 5 min
## zig build pipeline
build-zig:
stage: build
script:
- zig version
- rm -rf zig-out
- rm -rf .zig-cache
- zig build -Dtarget=x86_64-linux
- zig build -Dtarget=x86_64-windows
- zig build -Dtarget=aarch64-macos
rules: *default_rules
timeout: 3 min
unit-tests-zig:
stage: unit-testing
needs:
- build-zig
script:
- zig build test --summary all
rules: *default_rules
timeout: 5 min
pytest-scripts-zig:
<<: *config
stage: interpretation-testing
needs:
- unit-tests-zig
script:
- pytest test-scripts/zig/*.py
artifacts:
paths:
- *win
- *linux
- *mac
timeout: 5 min
## build pipeline for main branch
build-main-scala:
<<: *config
stage: build
rules:
- if: $CI_COMMIT_BRANCH == "main"
script:
- sbt clean compile assembly
timeout: 3 min
build-main-zig:
<<: *config
stage: build
rules:
- if: $CI_COMMIT_BRANCH == "main"
script:
- zig version
- rm -rf zig-out
- rm -rf .zig-cache
- zig build -Dtarget=x86_64-linux
- zig build -Dtarget=x86_64-windows
- zig build -Dtarget=aarch64-macos
timeout: 3 min
pytest-scala-main:
<<: *config
stage: interpretation-testing
allow_failure: true
rules:
- if: $CI_COMMIT_BRANCH == "main"
needs:
- build-main-scala
script:
- pytest test-scripts/scala/*.py
artifacts:
paths:
- *jar
timeout: 5 min
pytest-zig-main:
<<: *config
stage: interpretation-testing
rules:
- if: $CI_COMMIT_BRANCH == "main"
needs:
- build-main-zig
script:
- pytest test-scripts/zig/*.py
artifacts:
paths:
- *win
- *linux
- *mac
timeout: 5 min