-
Notifications
You must be signed in to change notification settings - Fork 12
172 lines (147 loc) · 5.3 KB
/
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: Tests
on: [push, pull_request]
jobs:
test_soms:
runs-on: ubuntu-20.04 # ubuntu-latest
continue-on-error: ${{ matrix.not-up-to-date }}
strategy:
fail-fast: false # we want all jobs to run, because they may fail independently
matrix:
include:
- name: SOM++
repo: SOMpp.git
apt: libcppunit-dev
build: "cmake . && make SOM++"
som: "./som.sh"
not-up-to-date: true
- name: CSOM
repo: CSOM.git
build: |
export COMPILER=gcc
export ARCH=64bit
make
som: "./som.sh"
not-up-to-date: true
- name: JsSOM
repo: JsSOM.git
build: ""
som: "./som.sh"
not-up-to-date: true
- name: PySOM
repo: PySOM.git
som: "PYTHON=python SOM_INTERP=BC ./som.sh"
not-up-to-date: false
- name: SOM (Java)
build: make
som: ./som.sh
repo: som-java.git
not-up-to-date: false
- name: TruffleSOM
repo: TruffleSOM.git
build: |
export JAVA_HOME=$JAVA_HOME_17_X64
ant jar
som: "JAVA_HOME=$JAVA_HOME_17_X64 ./som -G"
not-up-to-date: false
- name: Specification Tests
som: spec
not-up-to-date: false
- name: SOM-RS
repo: som-rs.git
build: "cargo build --release -p som-interpreter-bc"
som: "./target/release/som-interpreter-bc"
som-tests: " -c ../Smalltalk ../TestSuite -- TestHarness"
not-up-to-date: false
- name: ykSOM
repo: yksom.git
build: "cargo build"
som: "cargo run -- "
som-tests: "--cp ../Smalltalk ../TestSuite/TestHarness.som"
not-up-to-date: true
name: ${{ matrix.name }}
steps:
- name: Checkout SOM Repository
uses: actions/checkout@v3
- name: Checkout SOM VM Repository
if: matrix.som != 'spec'
run: |
set +e # Disable early abort in Bash
export BRANCH_NAME=${GITHUB_REF##*/}
export GITHUB_USER=${{ github.actor }}
export PR_TARGET_USER=${{ github.repository_owner }}
export REPO=${{ matrix.repo }}
GIT_CMDS=(
"git clone --branch $BRANCH_NAME --depth 1 https://github.com/$GITHUB_USER/$REPO som-vm"
)
if [ ! -z "${{ github.head_ref }}" ]
then
GIT_CMDS+=(
"git clone --branch ${{ github.head_ref }} --depth 1 https://github.com/$GITHUB_USER/$REPO som-vm"
)
fi
GIT_CMDS+=(
"git clone --depth 1 https://github.com/$GITHUB_USER/$REPO som-vm"
"git clone --depth 1 https://github.com/$PR_TARGET_USER/$REPO som-vm"
)
for ((i = 0; i < ${#GIT_CMDS[@]}; i++))
do
echo ""
echo ""
echo "Attempting: ${GIT_CMDS[$i]}"
echo ""
eval "${GIT_CMDS[$i]}"
if [ $? -eq 0 ]
then
echo ""
echo "Clone succeeded"
break
fi
done
- name: Install Apt Packages
if: ${{ matrix.apt != '' }}
run: |
sudo apt-get install ${{ matrix.apt }}
- name: Test Specification
if: ${{ matrix.som == 'spec' }}
run: |
cd specification
make test
- name: Check Whether Basic Interpreter Tests are Up to Date
if: ${{ matrix.som == 'spec' }}
run: |
./TestSuite/BasicInterpreterTests/number-of-tests.sh
- name: Build SOM VM
if: ${{ matrix.som != 'spec' }}
run: |
export ST_DIR=`pwd`/Smalltalk
cd som-vm
git --no-pager log -n 1
echo Build ${{ matrix.repo }}
${{ matrix.build }}
- name: Run Tests on SOM VM
if: ${{ matrix.som != 'spec' }}
run: |
cd som-vm
if [ "${{ matrix.som-tests }}" == "" ]
then
# The default settings for running the test harness, supported by most SOM VMs
export SOM_TESTS="-cp ../Smalltalk ../TestSuite/TestHarness.som"
else
export SOM_TESTS="${{ matrix.som-tests }}"
fi
echo "${{ matrix.som }} $SOM_TESTS"
eval "${{ matrix.som }} $SOM_TESTS"
# We currently test SomSom only on TruffleSOM
- name: Test SomSom on TruffleSOM
if: ${{ matrix.repo == 'TruffleSOM.git' }}
run: |
cd som-vm
${{ matrix.som }} -cp ../Smalltalk:../TestSuite:../SomSom/src/compiler:../SomSom/src/interpreter:../SomSom/src/primitives:../SomSom/src/vm:../SomSom/src/vmobjects ../SomSom/tests/SomSomTests.som
- name: Test Unit Test Benchmark
if: ${{ matrix.repo == 'som-java.git' }}
run: |
cd Examples/Benchmarks/TestSuite
./duplicate-tests.sh
cd ../../../som-vm
${{ matrix.som }} -cp ../Smalltalk:../Examples/Benchmarks/TestSuite ../Examples/Benchmarks/BenchmarkHarness.som --gc TestGC100 1 1
${{ matrix.som }} -cp ../Smalltalk:../Examples/Benchmarks/TestSuite ../Examples/Benchmarks/BenchmarkHarness.som Test100 1 1