-
Notifications
You must be signed in to change notification settings - Fork 14
392 lines (322 loc) · 20.2 KB
/
pr-tests.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
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
name: CI Tests for PR merge branch
run-name: Run tests for TCB on PR merge branch
on:
pull_request:
branches:
- bullseye
env:
# Container version:
TORIZONCORE_BUILDER_MAJOR: "3"
TORIZONCORE_BUILDER_MINOR: "11"
TORIZONCORE_BUILDER_PATCH: "0"
RELEASE_TYPE: "github-pr-test"
DEBIAN_RELEASE: "bullseye-slim"
# Use overlayfs driver for better performance
DOCKER_DRIVER: overlay2
DOCKER_BUILDKIT: 1
# TC image default versions:
TEST_IMAGES_TC5_VERSION: "5.7.2"
TEST_IMAGE_TC5_32BIT: "torizon-core-docker-apalis-imx6-Tezi_5.7.2+build.20.tar"
TEST_IMAGE_TC5_32BIT_ARTIFACTORY_URL: "https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/dunfell-5.x.y/release/20/apalis-imx6/torizon-upstream/torizon-core-docker/oedeploy"
TEST_IMAGE_TC5_64BIT: "torizon-core-docker-verdin-imx8mm-Tezi_5.7.2+build.20.tar"
TEST_IMAGE_TC5_64BIT_ARTIFACTORY_URL: "https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/dunfell-5.x.y/release/20/verdin-imx8mm/torizon/torizon-core-docker/oedeploy"
AMD64_ARCH: linux/amd64
AMD64_DOCKERFILE_NAME: torizoncore-builder.Dockerfile
AMD64_IMAGE_NAME: torizoncore-builder-amd64
TEST_IMAGES_TC6_VERSION: "6.6.1"
TEST_IMAGE_TC6_32BIT: "torizon-core-docker-colibri-imx7-emmc-Tezi_6.6.1+build.14.tar"
TEST_IMAGE_TC6_32BIT_ARTIFACTORY_URL: "https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/kirkstone-6.x.y/release/14/colibri-imx7-emmc/torizon-upstream/torizon-core-docker/oedeploy"
TEST_IMAGE_TC6_64BIT: "torizon-core-docker-apalis-imx8-Tezi_6.6.1+build.14.tar"
TEST_IMAGE_TC6_64BIT_ARTIFACTORY_URL: "https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/kirkstone-6.x.y/release/14/apalis-imx8/torizon/torizon-core-docker/oedeploy"
# Common Torizon .wic/.img images:
TEST_IMAGES_TC_COMMON_VERSION: "6.6.0-common"
TEST_IMAGE_TC_COMMON_ZIP_URL: "https://github.com/commontorizon/meta-common-torizon/releases/download/v6.6.0-common"
TEST_IMAGE_TC_COMMON_INTEL: "torizon-core-common-docker-dev-intel-corei7-64-20240226043251.rootfs.wic"
TEST_IMAGE_TC_COMMON_RASPI4: "torizon-core-common-docker-dev-v6.6.0-common-raspberrypi4-64.img"
TCB_TESTCASES_64BIT: "dt dto kernel"
jobs:
lint-dockerfiles:
runs-on: ubuntu-latest
steps:
# Some rules cannot be applied in our specific cases.
# However, since we don't want to completely ignore these rules,
# we are changing the following rules to have the level "info":
# - DL3003 (use WORKDIR to switch to a directory)
# - DL3008 (pin versions in apt-get install)
# - DL3029 (do not use --platform flag with FROM)
# - DL4006 (set the SHELL option -o pipefail before RUN with a pipe in it)
- name: Checkout PR merge branch
uses: actions/checkout@v4
- name: Lint Dockefile with Hadolint
run: docker run --rm -i hadolint/hadolint hadolint
--failure-threshold warning
--info DL3003 --info DL3008 --info DL3029 --info DL4006 - < *Dockerfile
lint-python:
runs-on: ubuntu-latest
steps:
- name: Checkout PR merge branch
uses: actions/checkout@v4
- name: Build dev container tcbuilder-dev-amd64
run: docker build . -f torizoncore-builder.Dockerfile
--build-arg IMAGE_ARCH=linux/amd64
--target tcbuilder-dev
--tag tcbuilder-dev-amd64
# Run the code linter disabling only docstring related warnings, use this run as exit code
# IMPORTANT: when running locally, DO NOT pass these --disable arguments to the program
- name: Run pylint
run: docker run --rm -v ${GITHUB_WORKSPACE}:/work -w /work tcbuilder-dev-amd64
pylint --output-format=colorized
--disable=missing-module-docstring
--disable=missing-class-docstring
--disable=missing-function-docstring
--disable=fixme
$(find tcbuilder/ -type f -name "*.py") *.py || echo "exit_code=$?" >> ${GITHUB_ENV}
- name: Pylint result
run: exit ${exit_code}
test-setup:
needs: [lint-dockerfiles, lint-python]
runs-on: ubuntu-latest
outputs:
date: ${{ steps.get_date.outputs.DATE }}
version_suffix: ${{ steps.get_version_suffix.outputs.VERSION_SUFFIX }}
tcb_image_tag: ${{ steps.tcb_image_tag.outputs.TCB_IMAGE_TAG }}
tc5_32bit_machine: ${{ steps.tc5_32bit.outputs.TEST_32BIT_MACHINE }}
tc5_64bit_machine: ${{ steps.tc5_64bit.outputs.TEST_64BIT_MACHINE }}
tc6_32bit_machine: ${{ steps.tc6_32bit.outputs.TEST_32BIT_MACHINE }}
tc6_64bit_machine: ${{ steps.tc6_64bit.outputs.TEST_64BIT_MACHINE }}
tc6_common_intel_machine: ${{ steps.tc6_common_intel_machine.outputs.TEST_INTEL_MACHINE }}
tc6_common_raspi4_machine: ${{ steps.tc6_common_raspi4_machine.outputs.TEST_RASPI4_MACHINE }}
steps:
- id: get_date
run: echo "DATE=$(date +%Y%m%d)" >> ${GITHUB_OUTPUT}
- id: get_version_suffix
run: echo "VERSION_SUFFIX=+${RELEASE_TYPE}" >> ${GITHUB_OUTPUT}
- id: tcb_image_tag
run: echo "TCB_IMAGE_TAG=$(echo "$GITHUB_REF_NAME" | sed 's/\//-/g')" >> ${GITHUB_OUTPUT}
- id: tc5_32bit
run: echo "TEST_32BIT_MACHINE=$(echo ${TEST_IMAGE_TC5_32BIT} | sed -E 's/^torizon(-core)?-docker-(evaluation-)?(.*)-Tezi.*$/\3/')" >> ${GITHUB_OUTPUT}
- id: tc5_64bit
run: echo "TEST_64BIT_MACHINE=$(echo ${TEST_IMAGE_TC5_64BIT} | sed -E 's/^torizon(-core)?-docker-(evaluation-)?(.*)-Tezi.*$/\3/')" >> ${GITHUB_OUTPUT}
- id: tc6_32bit
run: echo "TEST_32BIT_MACHINE=$(echo ${TEST_IMAGE_TC6_32BIT} | sed -E 's/^torizon(-core)?-docker-(evaluation-)?(.*)-Tezi.*$/\3/')" >> ${GITHUB_OUTPUT}
- id: tc6_64bit
run: echo "TEST_64BIT_MACHINE=$(echo ${TEST_IMAGE_TC6_64BIT} | sed -E 's/^torizon(-core)?-docker-(evaluation-)?(.*)-Tezi.*$/\3/')" >> ${GITHUB_OUTPUT}
- id: tc6_common_intel_machine
run: echo "TEST_INTEL_MACHINE=$(echo ${TEST_IMAGE_TC_COMMON_INTEL} | sed -E 's/^torizon(-core)?-common-docker-dev-(evaluation-)?(.*)-.*$/\3/')" >> ${GITHUB_OUTPUT}
- id: tc6_common_raspi4_machine
run: echo "TEST_RASPI4_MACHINE=$(echo ${TEST_IMAGE_TC_COMMON_RASPI4} | sed -E 's/^torizon(-core)?-common-docker-dev-(evaluation-)?(v.*-)?(.*-..).*$/\4/')" >> ${GITHUB_OUTPUT}
amd64-build-test-torizoncore5:
needs: [test-setup]
runs-on: ubuntu-latest
env:
VERSION_SUFFIX: ${{ needs.test-setup.outputs.version_suffix }}
DATE: ${{ needs.test-setup.outputs.date }}
TCB_IMAGE_TAG: ${{ needs.test-setup.outputs.tcb_image_tag }}
TEST_32BIT_MACHINE: ${{ needs.test-setup.outputs.tc5_32bit_machine }}
TEST_64BIT_MACHINE: ${{ needs.test-setup.outputs.tc5_64bit_machine }}
defaults:
run:
shell: bash
working-directory: ./tests/integration/
steps:
- name: Checkout PR repository
uses: actions/checkout@v4
- name: Set Docker image tag
run: echo "TCB_IMAGE_TAG=$(echo "$GITHUB_REF_NAME" | sed 's/\//-/g')" >> ${GITHUB_ENV}
- name: Build TorizonCore Builder
run: docker build ../../ -f "../../${AMD64_DOCKERFILE_NAME}"
--build-arg "IMAGE_ARCH=${AMD64_ARCH}"
--build-arg "IMAGE_TAG=${DEBIAN_RELEASE}"
--build-arg "VERSION_SUFFIX=${VERSION_SUFFIX}"
--label "container.name=${AMD64_IMAGE_NAME}"
--label "container.version=${TORIZONCORE_BUILDER_MAJOR}.${TORIZONCORE_BUILDER_MINOR}.${TORIZONCORE_BUILDER_PATCH}-${DATE}"
--label "git.ref=${GITHUB_REF_NAME}"
--label "git.hash=${GITHUB_SHA}"
--label "workflow.id=${GITHUB_RUN_ID}"
-t "${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}"
- name: Create test-related directories
run: mkdir -p workdir/images && mkdir -p workdir/reports && rm -Rf workdir/reports/*
- name: Run setup script
run: TCB_SKIP_PULL=1 ./setup.sh
- name: Download Torizon OS 5 32-bit test image
run: 'wget --progress=dot:giga ${TEST_IMAGE_TC5_32BIT_ARTIFACTORY_URL}/${TEST_IMAGE_TC5_32BIT} -O workdir/images/${TEST_IMAGE_TC5_32BIT}'
- name: Create flag to indicate image was downloaded
run: touch workdir/images/.images_downloaded
- name: Export TCB command
run: echo "TCBCMD=docker run --rm -v /deploy -v ${GITHUB_WORKSPACE}/tests/integration/workdir:/workdir -v storage:/storage --net=host -v /var/run/docker.sock:/var/run/docker.sock ${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}" >> ${GITHUB_ENV}
- name: Test TCB for Torizon OS 5 32-bit image
run: TCB_REPORT=1 TCB_UNDER_CI=1 TCB_MACHINE=${TEST_32BIT_MACHINE} ./run.sh
- name: Results for Torizon OS 5 32-bit
id: tc5-32bit-results
run: if ! grep -q "^not ok" workdir/reports/* ; then echo "All tests passed!"; else grep "^not ok" workdir/reports/* && exit 1; fi
- name: Delete 32-bit reports before starting 64-bit tests
if: always() && (steps.tc5-32bit-results.outcome == 'success' || steps.tc5-32bit-results.outcome == 'failure')
run: rm -f workdir/reports/*
- name: Download Torizon OS 5 64-bit test image
if: always() && (steps.tc5-32bit-results.outcome == 'success' || steps.tc5-32bit-results.outcome == 'failure')
run: 'wget --progress=dot:giga ${TEST_IMAGE_TC5_64BIT_ARTIFACTORY_URL}/${TEST_IMAGE_TC5_64BIT} -O workdir/images/${TEST_IMAGE_TC5_64BIT}'
- name: Test TCB for Torizon OS 5 64-bit image
if: always() && (steps.tc5-32bit-results.outcome == 'success' || steps.tc5-32bit-results.outcome == 'failure')
run: TCB_REPORT=1 TCB_UNDER_CI=1 TCB_MACHINE=${TEST_64BIT_MACHINE} TCB_TESTCASE=${TCB_TESTCASES_64BIT} ./run.sh
- name: Results for Torizon OS 5 64-bit
if: always() && (steps.tc5-32bit-results.outcome == 'success' || steps.tc5-32bit-results.outcome == 'failure')
run: if ! grep -q "^not ok" workdir/reports/* ; then echo "All tests passed!"; else grep "^not ok" workdir/reports/* && exit 1; fi
amd64-build-test-torizoncore6:
needs: [test-setup]
runs-on: ubuntu-latest
env:
VERSION_SUFFIX: ${{ needs.test-setup.outputs.version_suffix }}
DATE: ${{ needs.test-setup.outputs.date }}
TCB_IMAGE_TAG: ${{ needs.test-setup.outputs.tcb_image_tag }}
TEST_32BIT_MACHINE: ${{ needs.test-setup.outputs.tc6_32bit_machine }}
TEST_64BIT_MACHINE: ${{ needs.test-setup.outputs.tc6_64bit_machine }}
defaults:
run:
shell: bash
working-directory: ./tests/integration/
steps:
- name: Checkout PR repository
uses: actions/checkout@v4
- name: Set Docker image tag
run: echo "TCB_IMAGE_TAG=$(echo "$GITHUB_REF_NAME" | sed 's/\//-/g')" >> ${GITHUB_ENV}
- name: Build TorizonCore Builder
run: docker build ../../ -f "../../${AMD64_DOCKERFILE_NAME}"
--build-arg "IMAGE_ARCH=${AMD64_ARCH}"
--build-arg "IMAGE_TAG=${DEBIAN_RELEASE}"
--build-arg "VERSION_SUFFIX=${VERSION_SUFFIX}"
--label "container.name=${AMD64_IMAGE_NAME}"
--label "container.version=${TORIZONCORE_BUILDER_MAJOR}.${TORIZONCORE_BUILDER_MINOR}.${TORIZONCORE_BUILDER_PATCH}-${DATE}"
--label "git.ref=${GITHUB_REF_NAME}"
--label "git.hash=${GITHUB_SHA}"
--label "workflow.id=${GITHUB_RUN_ID}"
-t "${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}"
- name: Create test-related directories
run: mkdir -p workdir/images && mkdir -p workdir/reports && rm -Rf workdir/reports/*
- name: Run setup script
run: TCB_SKIP_PULL=1 ./setup.sh
- name: Download Torizon OS 6 32-bit test image
run: 'wget --progress=dot:giga ${TEST_IMAGE_TC6_32BIT_ARTIFACTORY_URL}/${TEST_IMAGE_TC6_32BIT} -O workdir/images/${TEST_IMAGE_TC6_32BIT}'
- name: Create flag to indicate image was downloaded
run: touch workdir/images/.images_downloaded
- name: Export TCB command
run: echo "TCBCMD=docker run --rm -v /deploy -v ${GITHUB_WORKSPACE}/tests/integration/workdir:/workdir -v storage:/storage --net=host -v /var/run/docker.sock:/var/run/docker.sock ${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}" >> ${GITHUB_ENV}
- name: Test TCB for Torizon OS 6 32-bit image
run: TCB_REPORT=1 TCB_UNDER_CI=1 TCB_MACHINE=${TEST_32BIT_MACHINE} ./run.sh
- name: Results for Torizon OS 6 32-bit
id: tc6-32bit-results
run: if ! grep -q "^not ok" workdir/reports/* ; then echo "All tests passed!"; else grep "^not ok" workdir/reports/* && exit 1; fi
- name: Delete 32-bit reports before starting 64-bit tests
if: always() && (steps.tc6-32bit-results.outcome == 'success' || steps.tc6-32bit-results.outcome == 'failure')
run: rm -f workdir/reports/*
- name: Download Torizon OS 6 64-bit test image
if: always() && (steps.tc6-32bit-results.outcome == 'success' || steps.tc6-32bit-results.outcome == 'failure')
run: 'wget --progress=dot:giga ${TEST_IMAGE_TC6_64BIT_ARTIFACTORY_URL}/${TEST_IMAGE_TC6_64BIT} -O workdir/images/${TEST_IMAGE_TC6_64BIT}'
- name: Test TCB for Torizon OS 6 64-bit image
if: always() && (steps.tc6-32bit-results.outcome == 'success' || steps.tc6-32bit-results.outcome == 'failure')
run: TCB_REPORT=1 TCB_UNDER_CI=1 TCB_MACHINE=${TEST_64BIT_MACHINE} TCB_TESTCASE=${TCB_TESTCASES_64BIT} ./run.sh
- name: Results for Torizon OS 6 64-bit
if: always() && (steps.tc6-32bit-results.outcome == 'success' || steps.tc6-32bit-results.outcome == 'failure')
run: if ! grep -q "^not ok" workdir/reports/* ; then echo "All tests passed!"; else grep "^not ok" workdir/reports/* && exit 1; fi
amd64-build-test-commontorizon-intel:
# Only run if not manually cancelled, test-setup succeeds,
# and after amd64-build-test-torizoncore5 and amd64-build-test-torizoncore6,
# no matter their results.
if: |
(success() || failure()) &&
contains(needs.test-setup.result, 'success')
needs: [test-setup, amd64-build-test-torizoncore5, amd64-build-test-torizoncore6]
runs-on: ubuntu-latest
env:
RESULT_TEST_SETUP: ${{ needs.test-setup.result }}
RESULT_TEST_TC5: ${{ needs.amd64-build-test-torizoncore5.result }}
RESULT_TEST_TC6: ${{ needs.amd64-build-test-torizoncore6.result }}
VERSION_SUFFIX: ${{ needs.test-setup.outputs.version_suffix }}
DATE: ${{ needs.test-setup.outputs.date }}
TCB_IMAGE_TAG: ${{ needs.test-setup.outputs.tcb_image_tag }}
TEST_INTEL_MACHINE: ${{ needs.test-setup.outputs.tc6_common_intel_machine }}
defaults:
run:
shell: bash
working-directory: ./tests/integration/
steps:
- name: Checkout PR repository
uses: actions/checkout@v4
- name: Set Docker image tag
run: echo "TCB_IMAGE_TAG=$(echo "$GITHUB_REF_NAME" | sed 's/\//-/g')" >> ${GITHUB_ENV}
- name: Build TorizonCore Builder
run: docker build ../../ -f "../../${AMD64_DOCKERFILE_NAME}"
--build-arg "IMAGE_ARCH=${AMD64_ARCH}"
--build-arg "IMAGE_TAG=${DEBIAN_RELEASE}"
--build-arg "VERSION_SUFFIX=${VERSION_SUFFIX}"
--label "container.name=${AMD64_IMAGE_NAME}"
--label "container.version=${TORIZONCORE_BUILDER_MAJOR}.${TORIZONCORE_BUILDER_MINOR}.${TORIZONCORE_BUILDER_PATCH}-${DATE}"
--label "git.ref=${GITHUB_REF_NAME}"
--label "git.hash=${GITHUB_SHA}"
--label "workflow.id=${GITHUB_RUN_ID}"
-t "${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}"
- name: Create test-related directories
run: mkdir -p workdir/images && mkdir -p workdir/reports && rm -Rf workdir/reports/*
- name: Run setup script
run: TCB_SKIP_PULL=1 ./setup.sh
- name: Download Common Torizon OS 6 Intel x86_64 image (zipped)
run: 'wget --progress=dot:giga ${TEST_IMAGE_TC_COMMON_ZIP_URL}/torizon-core-common-docker-dev-v${TEST_IMAGES_TC_COMMON_VERSION}-${TEST_INTEL_MACHINE}.zip -P workdir/images/'
- name: Unzip image
run: unzip workdir/images/'*.zip' -d workdir/images/ && rm workdir/images/*.zip
- name: Create flag to indicate image is ready
run: touch workdir/images/.raw_images_downloaded
- name: Export TCB command
run: echo "TCBCMD=docker run --rm -v /deploy -v ${GITHUB_WORKSPACE}/tests/integration/workdir:/workdir -v storage:/storage --net=host -v /var/run/docker.sock:/var/run/docker.sock ${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}" >> ${GITHUB_ENV}
- name: Test TCB for Common Torizon OS 6 Intel x86_64 image
run: TCB_REPORT=1 TCB_UNDER_CI=1 TCB_MACHINE=${TEST_INTEL_MACHINE} ./run.sh
- name: Results for Common Torizon OS 6 Intel x86_64
run: if ! grep -q "^not ok" workdir/reports/* ; then echo "All tests passed!"; else grep "^not ok" workdir/reports/* && exit 1; fi
amd64-build-test-commontorizon-raspi4:
# Only run if not manually cancelled, test-setup succeeds,
# and after amd64-build-test-torizoncore5 and amd64-build-test-torizoncore6,
# no matter their results.
if: |
(success() || failure()) &&
contains(needs.test-setup.result, 'success')
needs: [test-setup, amd64-build-test-torizoncore5, amd64-build-test-torizoncore6]
runs-on: ubuntu-latest
env:
VERSION_SUFFIX: ${{ needs.test-setup.outputs.version_suffix }}
DATE: ${{ needs.test-setup.outputs.date }}
TCB_IMAGE_TAG: ${{ needs.test-setup.outputs.tcb_image_tag }}
TEST_RASPI4_MACHINE: ${{ needs.test-setup.outputs.tc6_common_raspi4_machine }}
defaults:
run:
shell: bash
working-directory: ./tests/integration/
steps:
- name: Checkout PR repository
uses: actions/checkout@v4
- name: Set Docker image tag
run: echo "TCB_IMAGE_TAG=$(echo "$GITHUB_REF_NAME" | sed 's/\//-/g')" >> ${GITHUB_ENV}
- name: Build TorizonCore Builder
run: docker build ../../ -f "../../${AMD64_DOCKERFILE_NAME}"
--build-arg "IMAGE_ARCH=${AMD64_ARCH}"
--build-arg "IMAGE_TAG=${DEBIAN_RELEASE}"
--build-arg "VERSION_SUFFIX=${VERSION_SUFFIX}"
--label "container.name=${AMD64_IMAGE_NAME}"
--label "container.version=${TORIZONCORE_BUILDER_MAJOR}.${TORIZONCORE_BUILDER_MINOR}.${TORIZONCORE_BUILDER_PATCH}-${DATE}"
--label "git.ref=${GITHUB_REF_NAME}"
--label "git.hash=${GITHUB_SHA}"
--label "workflow.id=${GITHUB_RUN_ID}"
-t "${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}"
- name: Create test-related directories
run: mkdir -p workdir/images && mkdir -p workdir/reports && rm -Rf workdir/reports/*
- name: Run setup script
run: TCB_SKIP_PULL=1 ./setup.sh
- name: Download Common Torizon OS 6 Raspberry Pi 4 image (zipped)
run: 'wget --progress=dot:giga ${TEST_IMAGE_TC_COMMON_ZIP_URL}/torizon-core-common-docker-dev-v${TEST_IMAGES_TC_COMMON_VERSION}-${TEST_RASPI4_MACHINE}.zip -P workdir/images/'
- name: Unzip image
run: unzip workdir/images/'*.zip' -d workdir/images/ && rm workdir/images/*.zip
- name: Create flag to indicate image is ready
run: touch workdir/images/.raw_images_downloaded
- name: Export TCB command
run: echo "TCBCMD=docker run --rm -v /deploy -v ${GITHUB_WORKSPACE}/tests/integration/workdir:/workdir -v storage:/storage --net=host -v /var/run/docker.sock:/var/run/docker.sock ${AMD64_IMAGE_NAME}:github-${TCB_IMAGE_TAG}" >> ${GITHUB_ENV}
- name: Test TCB for Common Torizon OS 6 Raspberry Pi 4 image
run: TCB_REPORT=1 TCB_UNDER_CI=1 TCB_MACHINE=${TEST_RASPI4_MACHINE} ./run.sh
- name: Results for Common Torizon OS 6 Raspberry Pi 4
run: if ! grep -q "^not ok" workdir/reports/* ; then echo "All tests passed!"; else grep "^not ok" workdir/reports/* && exit 1; fi