Skip to content

Commit 68f659a

Browse files
committed
workflows: Submit LAVA test jobs
Prepare and submit LAVA test jobs using flash.tar.gz archive. Signed-off-by: Milosz Wasilewski <[email protected]>
1 parent ca980ea commit 68f659a

File tree

2 files changed

+93
-0
lines changed

2 files changed

+93
-0
lines changed

.github/workflows/debos.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,31 @@ jobs:
9595
# instruct fileserver to publish this directory
9696
url="${FILESERVER_URL}/${id}/"
9797
curl -X POST -H 'Accept: text/event-stream' "${url}"
98+
- name: Prepare LAVA test job
99+
run: |
100+
id="${GITHUB_REPOSITORY}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
101+
url="${FILESERVER_URL}/${id}/"
102+
BUILD_FILE_NAME=flash.tar.gz
103+
BUILD_DOWNLOAD_URL="${url}${BUILD_FILE_NAME}"
104+
105+
sed -i "s|{{BUILD_FILE_NAME}}|${BUILD_FILE_NAME}|g" "ci/lava/rb3gen2-vision-kit-boot.yaml"
106+
sed -i "s|{{BUILD_DOWNLOAD_URL}}|${BUILD_DOWNLOAD_URL}|g" "ci/lava/rb3gen2-vision-kit-boot.yaml"
107+
cat "ci/lava/rb3gen2-vision-kit-boot.yaml"
108+
109+
- name: Submit LAVA job
110+
timeout-minutes: 30
111+
uses: foundriesio/lava-action@v6
112+
with:
113+
lava_token: ${{ secrets.LAVATOKEN }}
114+
lava_url: 'lava.infra.foundries.io'
115+
job_definition: ${{ matrix.target }}
116+
wait_for_job: true
117+
fail_action_on_failure: false
118+
save_result_as_artifact: true
119+
save_job_details: true
120+
121+
- name: Publish Test Results
122+
uses: EnricoMi/publish-unit-test-result-action@v2
123+
with:
124+
files: "${{ github.workspace }}/artifacts/**/*.xml"
98125

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
actions:
2+
- deploy:
3+
images:
4+
image:
5+
headers:
6+
Authentication: Q_GITHUB_TOKEN
7+
url: "{{BUILD_DOWNLOAD_URL}}"
8+
postprocess:
9+
docker:
10+
image: ghcr.io/foundriesio/lava-lmp-sign:main
11+
steps:
12+
- export IMAGE_PATH=$PWD
13+
- cp overlay*.tar.gz overlay.tar.gz
14+
- echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings
15+
- echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings
16+
- echo "ROOTFS_IMAGE=disk-ufs.img2" >> $IMAGE_PATH/flash.settings
17+
- echo "DEVICE_TYPE=debian-rb3gen2-vision-kit" >> $IMAGE_PATH/flash.settings
18+
- cat $IMAGE_PATH/flash.settings
19+
timeout:
20+
minutes: 5
21+
to: downloads
22+
- deploy:
23+
images:
24+
image:
25+
url: downloads://{{BUILD_FILE_NAME}}
26+
settings:
27+
url: downloads://flash.settings
28+
overlay:
29+
url: downloads://overlay.tar.gz
30+
timeout:
31+
minutes: 5
32+
to: flasher
33+
- boot:
34+
auto_login:
35+
login_prompt: 'login:'
36+
username: root
37+
method: minimal
38+
prompts:
39+
- root@debian
40+
timeout:
41+
minutes: 3
42+
- test:
43+
definitions:
44+
- from: git
45+
name: "smoke-test"
46+
path: automated/linux/smoke/smoke.yaml
47+
repository: https://github.com/linaro/test-definitions.git
48+
parameters:
49+
SKIP_INSTALL: "True"
50+
TESTS: "pwd, uname -a, ip a"
51+
- command:
52+
name: network_turn_on
53+
context:
54+
lava_test_results_dir: /home/lava-%s
55+
test_character_delay: 10
56+
device_type: qcs6490
57+
job_name: boot test (rb3gen2) {{GITHUB_RUN_ID}}
58+
metadata:
59+
build-commit: '{{GITHUB_SHA}}'
60+
priority: 50
61+
tags:
62+
- cambridge-lab
63+
timeouts:
64+
job:
65+
minutes: 15
66+
visibility: public

0 commit comments

Comments
 (0)