-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
67 lines (61 loc) · 1.5 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
# **************************************************************************** #
# Advent of Code 2024 #
# **************************************************************************** #
# 2024 template
.2024-template:
variables:
AOC_YEAR: 2024
# Prepare docker for 2024
docker ~ aoc-2024:
extends:
- .2024-template
- .prepare-docker-template
# 2024 Zig build
build ~ aoc-2024:
stage: build
extends:
- .2024-template
- .run-current-year-template
needs:
- docker ~ aoc-2024
script:
- zig build -Doptimize=ReleaseSafe -j2 --summary all
# 2024 Zig test
test ~ aoc-2024:
stage: test
extends:
- .2024-template
- .run-current-year-template
needs:
- build ~ aoc-2024
script:
- zig build test -Doptimize=Debug -j2 --summary all
# 2024 Zig fmt check
format ~ aoc-2024:
stage: test
extends:
- .2024-template
- .run-current-year-template
needs:
- docker ~ aoc-2024
- job: build ~ aoc-2024
optional: true
script:
- zig fmt --check .
allow_failure: true
# 2024 Zig benchmark (release)
bench ~ aoc-2024:
stage: benchmark
extends:
- .2024-template
- .run-current-year-template
needs:
- test ~ aoc-2024
script:
- zig build benchmark -Doptimize=ReleaseFast -j1 | 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}