-
Notifications
You must be signed in to change notification settings - Fork 15
/
.gitlab-ci.yml
108 lines (94 loc) · 3.32 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
stages:
- build-and-test
- benchmark-completion
variables:
PYTHONUNBUFFERED: "true"
before_script:
- |+
git submodule update --init
if [ "$MACHINE" = "zullie1" ]; then
export PATH=/opt/local/bin:/Users/gitlab-runner/Library/Python/3.12/bin:$PATH
export MP='-mp'
fi
build_and_test:
stage: build-and-test
parallel:
matrix:
- MACHINE:
- yuria
- yuria2
- yuria3
COMPILER: [clang]
GC: [COPYING]
INTEGERS:
- "-DUSE_TAGGING=true"
- "-DUSE_TAGGING=false -DCACHE_INTEGER=true"
- "-DUSE_TAGGING=false -DCACHE_INTEGER=false"
# Track GCC only for one configuration
- MACHINE: [yuria, yuria2, yuria3]
COMPILER: [gcc]
GC: [COPYING]
INTEGERS: ["-DUSE_TAGGING=true"]
- MACHINE: [zullie1]
COMPILER: [clang]
GC: [GENERATIONAL]
INTEGERS:
- "-DUSE_TAGGING=true"
- "-DUSE_TAGGING=false -DCACHE_INTEGER=true"
- "-DUSE_TAGGING=false -DCACHE_INTEGER=false"
# Mark-Sweep working, but not super exciting
- MACHINE: [yuria, yuria2, yuria3]
COMPILER: [gcc]
GC: [MARK_SWEEP]
INTEGERS: ["-DUSE_TAGGING=true"]
tags: [$MACHINE]
script:
- rm -rf release && mkdir release
- rm -rf debug && mkdir debug
- if [ "$COMPILER" = "gcc" ]; then export CC=gcc-13; export CXX=g++-13; fi
- if [ "$COMPILER" = "clang" ]; then export CC=clang$MP-18; export CXX=clang++$MP-18; fi
# compose a name for this configuration
- |+
export NAME="som-$COMPILER-$GC"
if [[ $INTEGERS =~ "USE_TAGGING=true" ]]; then
NAME="$NAME-inttag"
else
NAME="$NAME-intbox"
fi
if [[ $INTEGERS =~ "CACHE_INTEGER=true" ]]; then
NAME="$NAME-intcache"
fi
NAME=`echo "$NAME" | tr '[:upper:]' '[:lower:]'`
- cd release
- cmake .. $INTEGERS -DGC_TYPE=$GC -DCMAKE_BUILD_TYPE=Release
- make -j
- mv SOM++ ../$NAME
- cd ..
- cd debug
- cmake .. $INTEGERS -DGC_TYPE=$GC -DCMAKE_BUILD_TYPE=Debug
- make -j
- ./SOM++ -cp ../Smalltalk ../TestSuite/TestHarness.som
- ./unittests -cp ../Smalltalk:../TestSuite/BasicInterpreterTests ../Examples/Hello.som
- cd ..
- |+
# Test SomSom
if [ "$COMPILER" = "clang" ]; then
# this is to load balance the SomSom testing
# only when compiling with Clang, and only on one machine for each integer configuration
if [ "$MACHINE $INTEGERS" = "zullie1 -DUSE_TAGGING=true" ] || [ "$MACHINE $INTEGERS" = "yuria2 -DUSE_TAGGING=false -DCACHE_INTEGER=true" ] || [ "$MACHINE $INTEGERS" = "yuria3 -DUSE_TAGGING=false -DCACHE_INTEGER=false" ]; then
./$NAME -cp Smalltalk:TestSuite:core-lib/SomSom/src/compiler:core-lib/SomSom/src/interpreter:core-lib/SomSom/src/primitives:core-lib/SomSom/src/vm:core-lib/SomSom/src/vmobjects core-lib/SomSom/tests/SomSomTests.som
fi
fi
# run the benchmarks
- |+
if [ "$MACHINE" = "zullie1" ]; then
M=''
else
M="m:$MACHINE"
fi
rebench --experiment="CI ID $CI_PIPELINE_ID" --branch="$CI_COMMIT_REF_NAME" -c rebench.conf all "e:${NAME}" $M
complete_benchmarking:
stage: benchmark-completion
tags: [yuria3]
script:
- rebench --experiment="CI ID $CI_PIPELINE_ID" --report-completion rebench.conf