-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
72 lines (66 loc) · 1.64 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
# **************************************************************************** #
# Advent of Code 2023 #
# **************************************************************************** #
# 2023 template
.2023-template:
variables:
AOC_YEAR: 2023
# Prepare docker for 2023
docker ~ aoc-2023:
extends:
- .2023-template
- .prepare-docker-template
# 2023 Kotlin build
build ~ aoc-2023:
stage: build
extends:
- .2023-template
- .run-current-year-template
needs:
- docker ~ aoc-2023
script:
- gradle assemble --console plain
# 2023 Kotlin test
test ~ aoc-2023:
stage: test
extends:
- .2023-template
- .run-current-year-template
needs:
- build ~ aoc-2023
script:
- gradle test --console plain --warning-mode none
artifacts:
reports:
junit: 2023/**/*ExampleTest.xml
when: always
expire_in: 1 week
# 2023 Kotlin fmt check
format ~ aoc-2023:
stage: test
extends:
- .2023-template
- .run-current-year-template
needs:
- docker ~ aoc-2023
- job: build ~ aoc-2023
optional: true
script:
- gradle ktfmtCheck --console plain --warning-mode none
allow_failure: true
# 2023 Kotlin benchmark (release)
bench ~ aoc-2023:
stage: benchmark
extends:
- .2023-template
- .run-current-year-template
needs:
- test ~ aoc-2023
script:
- gradle benchmark --console plain --warning-mode none | tee bench.log
- cd ${CI_PROJECT_DIR}
- mkdir -p benchmarks_${AOC_YEAR}
- cat ${AOC_YEAR}/bench.log | aha > benchmarks_${AOC_YEAR}/index.html
artifacts:
paths:
- benchmarks_${AOC_YEAR}