-
Notifications
You must be signed in to change notification settings - Fork 345
482 lines (412 loc) · 22.3 KB
/
build-and-test.yml
File metadata and controls
482 lines (412 loc) · 22.3 KB
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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
name: Compile SOFA and run Tests
on:
workflow_call:
inputs:
sofa-branch-name:
type: string
required: true
sofa-commit-sha:
type: string
required: true
pr-owner-url:
type: string
required: false
pr-branch-name:
type: string
required: false
pr-commit-sha:
type: string
required: false
preset:
type: string
required: true
python-version:
type: string
required: true
ci-depends-on:
type: string
required: false
with-all-tests:
type: boolean
required: false
default: false
force-full-build:
type: boolean
required: false
default: false
generate-binaries:
type: boolean
required: false
default: false
external-plugins:
type: string
required: false
additionnal-cmake-flags:
type: string
required: false
builder-os:
type: string
required: true
default: '["sh-ubuntu_gcc_release"]'
dash-info:
type: string
required: false
default: 'NONE'
description: 'Json scructure with three parameters {"COMMIT_HASH":"fullhsashofthecommit", }'
jobs:
display-inputs:
runs-on: ubuntu-latest
steps:
- name: Display
shell: bash
run: |
echo "Build and test launched with following parameters:"
echo "sofa-branch-name : ${{ inputs.sofa-branch-name }}"
echo "sofa-commit-sha : ${{ inputs.sofa-commit-sha }}"
echo "pr-owner-url : ${{ inputs.pr-owner-url }}"
echo "pr-branch-name : ${{ inputs.pr-branch-name }}"
echo "pr-commit-sha : ${{ inputs.pr-commit-sha }}"
echo "preset : ${{ inputs.preset }}"
echo "python-version : ${{ inputs.python-version }}"
echo "ci-depends-on : ${{ inputs.ci-depends-on }}"
echo "with-all-tests : ${{ inputs.with-all-tests }}"
echo "force-full-build : ${{ inputs.force-full-build }}"
echo "generate-binaries : ${{ inputs.generate-binaries }}"
echo "external-plugins : ${{ inputs.external-plugins }}"
echo "additionnal-cmake-flags : ${{ inputs.additionnal-cmake-flags }}"
echo "builder-os : ${{ inputs.builder-os }}"
build:
strategy:
fail-fast: false
matrix:
os: ${{ fromJson(inputs.builder-os) }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
steps:
- name: Configure builder
id: configure
shell: bash
run: |
## Go to workspace given by the runner (this file is generated by the pre-build script)
WORKSPACE=$(cat $GITHUB_WORKFLOW_SHA)/${{ matrix.os }}
echo "WORKSPACE=$WORKSPACE" >> $GITHUB_ENV
echo "LOG_DIR=$WORKSPACE" >> $GITHUB_ENV
echo "BUILDER_OS=${{ matrix.os }}" >> $GITHUB_ENV
if [ ! -d $WORKSPACE ]; then
mkdir -p $WORKSPACE
fi
cd $WORKSPACE
echo "Workspace folder for this build will be $WORKSPACE"
## Setup github
# Git config (needed by CMake ExternalProject)
if ! git config --get user.name; then
git config --system user.name 'SOFA Bot' > /dev/null 2>&1 ||
git config --global user.name 'SOFA Bot' > /dev/null 2>&1 ||
git config user.name 'SOFA Bot' > /dev/null 2>&1 ||
echo "WARNING: cannot setup git config"
fi
if ! git config --get user.email; then
git config --system user.email '<>' > /dev/null 2>&1 ||
git config --global user.email '<>' > /dev/null 2>&1 ||
git config user.email '<>' > /dev/null 2>&1 ||
echo "WARNING: cannot setup git config"
fi
##TODO (if required) fix path too long for windows (see main.sh:201)
- name: Clone SOFA and CI
id: clone
shell: bash
run: |
cd $WORKSPACE
## Clone sofa and merge origin master
echo "Cloning SOFA at commit $GITHUB_WORKFLOW_SHA"
if [ -d $WORKSPACE/sofa ]; then
rm -rf $WORKSPACE/sofa
fi
SRC_DIR=$(pwd)/sofa
echo "SRC_DIR=$SRC_DIR" >> $GITHUB_ENV
if [ ! -z "${{ inputs.pr-owner-url }}" ]; then
echo "This is a PR, merging branch ${{ inputs.pr-branch-name }} from remote ${{ inputs.pr-owner-url }} into origin branch ${{ inputs.sofa-branch-name }}"
git clone -b ${{ inputs.sofa-branch-name }} --single-branch https://www.github.com/sofa-framework/sofa
cd sofa
git remote add pr ${{ inputs.pr-owner-url }}
git fetch pr
if [ "${{ inputs.pr-commit-sha }}" == "HEAD" ]; then
git merge ${{ inputs.pr-branch-name }}
else
git merge ${{ inputs.pr-commit-sha }}
fi
else
echo "This is not a PR: checking out sha ${{ inputs.sofa-commit-sha }} from branch ${{ inputs.sofa-branch-name }}"
git clone -b ${{ inputs.sofa-branch-name }} --single-branch https://www.github.com/sofa-framework/sofa
cd sofa
git checkout ${{ inputs.sofa-commit-sha }}
fi
cd $WORKSPACE
## Clone CI and use ci-depends-on structure
ci_branch=${{ inputs.sofa-branch-name }}
ci_repo_url="https://www.github.com/sofa-framework/ci"
# check if ci has a ci-depends-on
ci_ci_depends_on=$(echo "${{ inputs.ci-depends-on }}" | jq .ci)
if [ -n "${{ inputs.ci-depends-on }}" ] && [ "$ci_ci_depends_on" != "null" ]; then
echo "ci-depends-on for ci repository detected."
ci_repo_url=$(echo "${{ inputs.ci-depends-on }}" | jq .ci.repo_url)
ci_branch=$(echo "${{ inputs.ci-depends-on }}" | jq .ci.branch_name)
fi
echo "CI_BRANCH=$ci_branch" >> $GITHUB_ENV
echo "Cloning CI from remote ${ci_repo_url}, selecting branch ${ci_branch}"
if [ -d $WORKSPACE/ci ]; then
rm -rf $WORKSPACE/ci
fi
CI_DIR=$WORKSPACE/ci
echo "CI_DIR=$CI_DIR" >> $GITHUB_ENV
git clone -b ${ci_branch//\"} --single-branch ${ci_repo_url//\"}
cd $WORKSPACE
## Setup build folder
if [ "${{ inputs.force-full-build }}" == "true" ] && [ -d $WORKSPACE/build ]; then
rm -rf $WORKSPACE/build
fi
if [ ! -d $WORKSPACE/build ]; then
mkdir $WORKSPACE/build
fi
BUILD_DIR=$WORKSPACE/build
echo "BUILD_DIR=$BUILD_DIR" >> $GITHUB_ENV
if [ -n "${{ inputs.external-plugins }}" ]; then
echo "Setting up external plugins."
for plugin in ${{ inputs.external-plugins }}; do
plugin_base=${plugin%@*}
plugin_branch=${plugin##*@}
plugin_repo=$(basename "$plugin_base")
echo "Adding line 'sofa_add_external(plugin $plugin_repo GIT_REF $plugin_branch GIT_REPOSITORY $plugin_base ON)' to file ${SRC_DIR}/applications/CMakeLists.txt"
echo "sofa_add_external(plugin $plugin_repo GIT_REF $plugin_branch GIT_REPOSITORY $plugin_base ON)" >> "${SRC_DIR}/applications/CMakeLists.txt"
done
fi
- name: Build
id: build-step
shell: bash
run: |
## Configure the build: setup cmake variables
# retrive build type and compiler
BUILD_TYPE=$(echo ${{ matrix.os }} | awk -F '_' '{print $3}')
CONFIG=$(echo ${{ matrix.os }} | awk -F '_' '{print $1"_"$2}')
# Needed by configure-and-build
if [[ "$RUNNER_OS" == "Linux" ]]; then
NODE_NAME="$(hostname)"
else
NODE_NAME="$(scutil --get LocalHostName)"
fi
echo "NODE_NAME=$NODE_NAME" >> $GITHUB_ENV
## Deal with ci-depends-on
# Loop over each key-value pair in the JSON avoiding ci repository if inside
CMAKE_OPTIONS="${{inputs.additionnal-cmake-flags}}"
for key in $(echo "${{ inputs.ci-depends-on }}" | jq -r 'keys[]' | grep -v '^ci$'); do
repo_url=$(echo "${{ inputs.ci-depends-on }}" | jq -r ".\"$key\".repo_url")
branch_name=$(echo "${{ inputs.ci-depends-on }}" | jq -r ".\"$key\".branch_name")
# Format the CMake flags for this key and append to the result
fixed_name=$(echo "$key" | awk '{gsub(/\./, "_"); print toupper($0)}')
flag_repository="-D${fixed_name}_GIT_REPOSITORY=\"$repo_url\""
flag_tag="-D${fixed_name}_GIT_TAG=\"$branch_name\""
# Append both flags to the result string with a space
CMAKE_OPTIONS="$CMAKE_OPTIONS $flag_repository $flag_tag "
done
if [[ ! -n "$CMAKE_OPTIONS" ]]; then
CMAKE_OPTIONS="no-additionnal-cmake-flags"
echo "No ci-depends-on detected."
else
echo "Adding the following cmake variable : $CMAKE_OPTIONS"
fi
echo "" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo "------ Before build (and docker) ------" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo "Main folders:" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - WORKSPACE = $WORKSPACE" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - SRC_DIR = $SRC_DIR" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - CI_DIR = $CI_DIR" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - BUILD_DIR = $BUILD_DIR" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - LOG_DIR = ${{ env.LOG_DIR }}" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo "" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo "Configuration:" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - NODE_NAME = $NODE_NAME" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - BUILD_TYPE = $BUILD_TYPE" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - CONFIG = $CONFIG" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - PYTHON_VERSION = ${{ inputs.python-version }}" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - PRESET = ${{ inputs.preset }}" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - GENERATE_BINARIES = ${{ inputs.generate-binaries }}" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo " - ADDITIONNAL_CMAKE_OPTIONS = $CMAKE_OPTIONS" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo "---------------------------------------" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
echo "" | tee -a "${{ env.LOG_DIR }}/cmake-output.txt"
#If os has got docker then use it
if [[ "${{ matrix.os }}" == *"ubuntu"* ]] || [[ "${{ matrix.os }}" == *"fedora"* ]]; then
builder_type=$(echo "${{ matrix.os }}" | awk -F '_' '{print $1}' | awk -F '-' '{print $2}')
if [[ "${{ inputs.sofa-branch-name }}" =~ ^v[0-9]{2}\.[0-9]{2}$ ]]; then
default_tag=${{ inputs.sofa-branch-name }}
else
default_tag=master
fi
echo "${DOCKERHUB_TOKEN}" | docker login -u sofaframework --password-stdin
echo "Pulling Docker image sofaframework/sofabuilder_${builder_type}:${CI_BRANCH} ..."
docker pull --quiet sofaframework/sofabuilder_${builder_type}:${CI_BRANCH} || true
DOCKER_IMAGE="sofaframework/sofabuilder_${builder_type}:${CI_BRANCH}"
if [[ "$(docker image list --format "table {{.Repository}}:{{.Tag}}")" != *"sofaframework/sofabuilder_${builder_type}:${CI_BRANCH}"* ]]; then
echo "Docker image sofaframework/sofabuilder_${builder_type}:${CI_BRANCH} doesn't exist, pulling default tag ${default_tag} "
docker pull --quiet sofaframework/sofabuilder_${builder_type}:${default_tag}
DOCKER_IMAGE="sofaframework/sofabuilder_${builder_type}:${default_tag}"
fi
echo "DOCKER_IMAGE=$DOCKER_IMAGE" >> $GITHUB_ENV
DOCKER_SRC_DIR="/workspace/$(realpath --relative-to=$WORKSPACE $SRC_DIR)"
DOCKER_BUILD_DIR="/workspace/$(realpath --relative-to=$WORKSPACE $BUILD_DIR)"
DOCKER_CI_DIR="/workspace/$(realpath --relative-to=$WORKSPACE $CI_DIR)"
DOCKER_LOG_DIR="/workspace/$(realpath --relative-to=$WORKSPACE ${{ env.LOG_DIR }})"
echo "DOCKER_SRC_DIR=$DOCKER_SRC_DIR" >> $GITHUB_ENV
echo "DOCKER_BUILD_DIR=$DOCKER_BUILD_DIR" >> $GITHUB_ENV
echo "DOCKER_CI_DIR=$DOCKER_CI_DIR" >> $GITHUB_ENV
echo "DOCKER_LOG_DIR=$DOCKER_LOG_DIR" >> $GITHUB_ENV
export XDG_CACHE_HOME="/cache"
echo "Launching configuration and build through docker using image ${DOCKER_IMAGE}. Running ./ci/scripts/configure-and-build.sh /workspace/build/ /workspace/sofa/ /workspace/ci/scripts/ \"${NODE_NAME}\" \"${BUILD_TYPE}\" \"${CONFIG}\" \"${{ inputs.python-version }}\" \"${{ inputs.preset }}\" \"${{ inputs.generate-binaries }}\" \"${CMAKE_OPTIONS}\""
docker run --rm --env XDG_CACHE_HOME -v $BUILDER_CACHE_DIR:/cache\
--user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \
${DOCKER_IMAGE} \
/bin/bash -c "env; cd /workspace; ccache -M 5; /bin/bash $DOCKER_CI_DIR/scripts/configure-and-build.sh $DOCKER_BUILD_DIR $DOCKER_SRC_DIR $DOCKER_CI_DIR/scripts/ $DOCKER_LOG_DIR \"${NODE_NAME}\" \"${BUILD_TYPE}\" \"${CONFIG}\" \"${{ inputs.python-version }}\" \"${{ inputs.preset }}\" \"${{ inputs.generate-binaries }}\" \"${CMAKE_OPTIONS}\""
else
echo "Launching configuration and build"
bash ${CI_DIR}/scripts/configure-and-build.sh "${BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "${{ env.LOG_DIR }}" "${NODE_NAME}" "${BUILD_TYPE}" "${CONFIG}" "${{ inputs.python-version }}" "${{ inputs.preset }}" "${{ inputs.generate-binaries }}" "${CMAKE_OPTIONS}"
fi
- name: Unit tests
id: unit-tests-step
if: always() && steps.build-step.outcome == 'success' && inputs.generate-binaries == false
shell: bash
run: |
# If os has got docker then use it
# Here no need to fetch it because it has already been taken care of in the build step
if [[ "${{ matrix.os }}" == *"ubuntu"* ]] || [[ "${{ matrix.os }}" == *"fedora"* ]]; then
echo "Launching unit test suite through docker using image ${DOCKER_IMAGE}."
docker run --rm \
--user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \
${DOCKER_IMAGE} \
/bin/bash -c "env ; cd /workspace; /bin/bash $DOCKER_CI_DIR/scripts/test.sh $DOCKER_BUILD_DIR $DOCKER_SRC_DIR $DOCKER_CI_DIR/scripts/ ${NODE_NAME} ${{ inputs.python-version }} UNIT"
else
echo "Launching unit test suite."
bash ${CI_DIR}/scripts/test.sh "${BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" "UNIT"
fi
if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"unit-tests_"* ]]; then
exit 1
fi
- name: Scene tests
id: scene-tests-step
if: always() && steps.build-step.outcome == 'success' && inputs.generate-binaries == false && inputs.with-all-tests == true
shell: bash
run: |
# If os has got docker then use it
# Here no need to fetch it because it has already been taken care of in the build step
if [[ "${{ matrix.os }}" == *"ubuntu"* ]] || [[ "${{ matrix.os }}" == *"fedora"* ]]; then
echo "Launching scene test suite through docker using image ${DOCKER_IMAGE}."
docker run --rm \
--user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \
${DOCKER_IMAGE} \
/bin/bash -c "env ; cd /workspace; /bin/bash $DOCKER_CI_DIR/scripts/test.sh $DOCKER_BUILD_DIR $DOCKER_SRC_DIR $DOCKER_CI_DIR/scripts/ ${NODE_NAME} ${{ inputs.python-version }} SCENE"
else
echo "Launching scene test suite."
bash ${CI_DIR}/scripts/test.sh "${BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" "SCENE"
fi
if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"scene-tests_"* ]]; then
exit 1
fi
- name: Regression tests
id: regression-tests-step
if: always() && steps.build-step.outcome == 'success' && inputs.generate-binaries == false && inputs.with-all-tests == true
shell: bash
run: |
# If os has got docker then use it
# Here no need to fetch it because it has already been taken care of in the build step
if [[ "${{ matrix.os }}" == *"ubuntu"* ]] || [[ "${{ matrix.os }}" == *"fedora"* ]]; then
echo "Launching regression test suite through docker using image ${DOCKER_IMAGE}."
docker run --rm \
--user $(id -u):$(id -g) --network=host -v $WORKSPACE:/workspace \
${DOCKER_IMAGE} \
/bin/bash -c "env ; cd /workspace; /bin/bash $DOCKER_CI_DIR/scripts/test.sh $DOCKER_BUILD_DIR $DOCKER_SRC_DIR $DOCKER_CI_DIR/scripts/ ${NODE_NAME} ${{ inputs.python-version }} REGRESSION"
else
echo "Launching regression test suite"
bash ${CI_DIR}/scripts/test.sh "${BUILD_DIR}" "${SRC_DIR}" "${CI_DIR}/scripts/" "${NODE_NAME}" "${{ inputs.python-version }}" "REGRESSION"
fi
if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" == *"regression-tests_"* ]]; then
exit 1
fi
- name: Publish artifacts
if: steps.build-step.outcome == 'success' && inputs.generate-binaries == true
uses: actions/upload-artifact@v4
with:
name: binaries_${{ env.BUILDER_OS }}
path: |
${{ env.BUILD_DIR }}/SOFA_v*
- name: Publish build logs
id: publish-build-logs
if: always()
uses: actions/upload-artifact@v4
with:
name: build-logs_${{ env.BUILDER_OS }}
path: |
${{ env.LOG_DIR }}/make-output.txt
${{ env.LOG_DIR }}/cmake-output.txt
- name: Publish tests logs
id: publish-tests-logs
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-logs_${{ env.BUILDER_OS }}
path: |
${{ env.BUILD_DIR }}/tests_results/
- name: Summarize results
if: always()
shell: bash
run: |
bold="\033[1m"
normal="\033[0m"
if [[ "${{ steps.configure.outcome }}" == "failure" || "${{ steps.clone.outcome }}" == "failure" ]]; then
echo "❌ Something whent wrong during the configure or clone steps..."
echo -e "${bold}Please check those actions logs${normal}"
exit 1
else
echo "✅ Setup OK."
fi
if [[ "${{ steps.build-step.outcome }}" == "failure" ]]; then
echo "❌ Build step failed"
echo -e "${bold}You can download all logs here : ${{ steps.publish-build-logs.outputs.artifact-url }}${normal}"
exit 1
else
echo "✅ Build OK."
fi
if [[ "${{ inputs.generate-binaries }}" == "false" ]]; then
if [[ "$(cd "${{ env.BUILD_DIR }}/tests_results/" && find . -maxdepth 1 -type f)" != "" ]]; then
echo "❌ Tests have resulted in : "
echo ""
python3 ${{ env.CI_DIR }}/scripts/generate-tests-table.py "${{ env.BUILD_DIR }}/tests_results/"
echo ""
echo "#----------------------------------------#"
echo "#---------------Quick Logs---------------#"
echo "#----------------------------------------#"
for testType in 'unit' 'scene' 'regression';
do
for errorType in 'errors' 'crashes' 'failures';
do
if [ -f "${{ env.BUILD_DIR }}/tests_results/${testType}-tests_${errorType}" ]; then
capitalized="$(echo "${testType:0:1}" | tr '[:lower:]' '[:upper:]')${testType:1}"
echo ""
echo -e "${bold}${capitalized} ${errorType}:${normal}"
echo ""
cat "${{ env.BUILD_DIR }}/tests_results/${testType}-tests_${errorType}"
echo ""
echo "#----------------------------------------#"
fi
done
done
echo -e "${bold}You can download all logs here : ${{ steps.publish-tests-logs.outputs.artifact-url }}${normal}"
exit 1
elif [[ "${{ steps.unit-tests-step.outcome }}" == "failure" || "${{ steps.scene-tests-step.outcome }}" == "failure" || "${{ steps.regression-tests-step.outcome }}" == "failure" ]]; then
echo "❌ Something whent wrong during one of the tests steps"
echo -e "${bold}Please check this action logs, and download tests logs here: ${{ steps.publish-tests-logs.outputs.artifact-url }}${normal}"
exit 1
else
echo "✅ Tests where successful : "
echo ""
python3 ${{ env.CI_DIR }}/scripts/generate-tests-table.py "${{ env.BUILD_DIR }}/tests_results/"
echo ""
fi
fi