-
Notifications
You must be signed in to change notification settings - Fork 11
241 lines (234 loc) · 9.36 KB
/
icd_tests_linux.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
name: Linux ICD tests
on:
push:
schedule:
- cron: '0 0 * * *' # UTC time
env:
ICD_RXJS_BRANCH_NAME: ajm/icd-test-stages-lists
jobs:
Build:
name: Build ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2004-dec2023.sif
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2204-dec2023.sif
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/centos7-dec2023.sif
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/almalinux8-dec2023.sif
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD3]
image: /opt/apptainer/almalinux9-dec2023.sif
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: source
- name: Build backend
shell: bash
run: |
SRC_DIR=$GITHUB_WORKSPACE/source
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $SRC_DIR ${{ matrix.image }} /bin/bash -c "\
git submodule update --init --recursive && \
cd $BUILD_DIR && \
cmake $SRC_DIR \
-Dtest=on \
-DCMAKE_BUILD_TYPE=Debug \
-DDevSuppressExternalWarnings=ON \
-DCMAKE_CXX_FLAGS='-O0 -g -fsanitize=address -fno-omit-frame-pointer' \
-DCMAKE_EXE_LINKER_FLAGS='-fsanitize=address' && \
make -j 16"
- name: Check backend runs
shell: bash
run: |
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $BUILD_DIR ${{ matrix.image }} /bin/bash -c "./carta_backend --version"
Prepare-ICD-RxJS:
name: Prepare-ICD-RxJS ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2004-dec2023.sif
port: 9001
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2204-dec2023.sif
port: 9002
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/centos7-dec2023.sif
port: 9003
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/almalinux8-dec2023.sif
port: 9004
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD3]
image: /opt/apptainer/almalinux9-dec2023.sif
port: 9005
needs: Build
steps:
- name: Prepare ICD-RxJS
shell: bash
run: |
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
ICD_RXJS_DIR=$BUILD_DIR/ICD-RxJS
apptainer exec --bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE --pwd $BUILD_DIR ${{ matrix.image }} /bin/bash -c "\
if [ -d '$ICD_RXJS_DIR' ]; then
cd $ICD_RXJS_DIR && git pull
else
echo 'Cloning ICD-RxJS repository...'
git clone https://github.com/CARTAvis/ICD-RxJS.git
cd ICD-RxJS
fi && \
git checkout ${{ env.ICD_RXJS_BRANCH_NAME }} && \
git submodule init && git submodule update && npm install && \
cd protobuf && \
./build_proto.sh && \
cd ../src/test && \
perl -p -i -e 's/3002/${{ matrix.port }}/' config.json"
File-Browser-ICD-Tests:
name: File-Browser ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2004-dec2023.sif
port: 9001
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2204-dec2023.sif
port: 9002
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/centos7-dec2023.sif
port: 9003
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/almalinux8-dec2023.sif
port: 9004
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD3]
image: /opt/apptainer/almalinux9-dec2023.sif
port: 9005
needs: [Build, Prepare-ICD-RxJS]
steps:
- name: File Browser ICD tests
shell: bash
run: |
SRC_DIR=$GITHUB_WORKSPACE/source
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
TEST_STAGE="$BUILD_DIR/ICD-RxJS/ICD_test_stages/file_browser.tests"
LOG_FILE="/tmp/carta_icd_${{ matrix.os_version }}_file_browser.log"
apptainer exec \
--bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
--bind /images:/images \
--pwd $BUILD_DIR \
${{ matrix.image }} /bin/bash -c "\
# Start the carta_backend
ASAN_OPTIONS=suppressions=$SRC_DIR/debug/asan/myasan.supp \
LSAN_OPTIONS=suppressions=$SRC_DIR/debug/asan/myasan-leaks.supp \
ASAN_SYMBOLIZER_PATH=llvm-symbolizer \
./carta_backend /images \
--top_level_folder /images \
--port ${{ matrix.port }} \
--omp_threads=4 \
--debug_no_auth \
--no_frontend \
--no_database \
--verbosity=5 >> $LOG_FILE 2>&1 & \
CARTA_BACKEND_PID=\$(pgrep -f \"carta_backend.*${{ matrix.port }}\" | head -n 1) && \
echo 'carta_backend started with PID' \$CARTA_BACKEND_PID && \
# Run the ICD tests
cd $BUILD_DIR/ICD-RxJS && \
pwd && \
cat $TEST_STAGE && \
while IFS= read -r test_file || [[ -n "\$test_file\" ]]; do
CI=true npm test -- \"\$test_file\"
done < \"$TEST_STAGE\" && \
# Stop the carta_backend
kill \$CARTA_BACKEND_PID"
Animator-ICD-Tests:
name: Animator ${{ matrix.os_version }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- os_version: ubuntu-20.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2004-dec2023.sif
port: 9001
- os_version: ubuntu-22.04
runner: [self-hosted, Linux, Apptainer, ICD1]
image: /opt/apptainer/ubuntu-2204-dec2023.sif
port: 9002
- os_version: rhel-7
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/centos7-dec2023.sif
port: 9003
- os_version: rhel-8
runner: [self-hosted, linux, Apptainer, ICD2]
image: /opt/apptainer/almalinux8-dec2023.sif
port: 9004
- os_version: rhel-9
runner: [self-hosted, linux, Apptainer, ICD3]
image: /opt/apptainer/almalinux9-dec2023.sif
port: 9005
needs: [File-Browser-ICD-Tests, Prepare-ICD-RxJS]
steps:
- name: Animator ICD tests
shell: bash
run: |
SRC_DIR=$GITHUB_WORKSPACE/source
BUILD_DIR=$GITHUB_WORKSPACE/build-${{ matrix.os_version }}
TEST_STAGE="$BUILD_DIR/ICD-RxJS/ICD_test_stages/animator.tests"
LOG_FILE="/tmp/carta_icd_${{ matrix.os_version }}_animator.log"
PORT_NUMBER=${{ matrix.port }}
apptainer exec \
--bind $GITHUB_WORKSPACE:$GITHUB_WORKSPACE \
--bind /images:/images \
--pwd $BUILD_DIR \
${{ matrix.image }} /bin/bash -c "\
# Start the carta_backend
ASAN_OPTIONS=suppressions=$SRC_DIR/debug/asan/myasan.supp \
LSAN_OPTIONS=suppressions=$SRC_DIR/debug/asan/myasan-leaks.supp \
ASAN_SYMBOLIZER_PATH=llvm-symbolizer \
./carta_backend /images \
--top_level_folder /images \
--port ${{ matrix.port }} \
--omp_threads=4 \
--debug_no_auth \
--no_frontend \
--no_database \
--verbosity=5 >> $LOG_FILE 2>&1 & \
CARTA_BACKEND_PID=\$(pgrep -f \"carta_backend.*${{ matrix.port }}\" | head -n 1) && \
echo 'carta_backend started with PID' \$CARTA_BACKEND_PID && \
# Run the ICD tests
cd $BUILD_DIR/ICD-RxJS && \
pwd && \
cat $TEST_STAGE && \
while IFS= read -r test_file || [[ -n "\$test_file\" ]]; do
CI=true npm test -- \"\$test_file\"
done < \"$TEST_STAGE\" && \
# Stop the carta_backend
kill \$CARTA_BACKEND_PID"