-
Notifications
You must be signed in to change notification settings - Fork 11
74 lines (67 loc) · 2.96 KB
/
lava.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
name: Run LAVA tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
submit-job-intel:
runs-on: ubuntu-latest
permissions:
checks: write
env:
ARCH: intel
steps:
- name: Install lavacli
run: sudo apt-get install lavacli
- name: Add lava identity
run: lavacli identities add --token ${{ secrets.LAVA_TOKEN }} --uri https://lava.collabora.dev/RPC2 --username detlev ci
- uses: actions/checkout@v3
with:
repository: 'cazou/cros-codecs'
- name: Create job description
run: ./ci/lava_job_generate.py --template ci/template.yaml --arch $ARCH --ccdec-build-id "${{ github.run_id }}" --test-repo "${{ github.server_url }}/${{ github.repository }}" --test-branch "${GITHUB_REF_NAME}" --config-file ci/config.yaml --token ${{ secrets.GH_BEARER }} --repo ${GITHUB_REPOSITORY} | tee job.yaml
- name: Submit job
run: lavacli -i ci jobs submit job.yaml | tee lava-jobid.txt
- name: Log job
run: lavacli -i ci jobs logs $(cat lava-jobid.txt)
- name: Retrieve test results
# lavacli doesn't support retrieving results in the JUnit format. Use the REST API
run: "curl -H \"Authorization: Token ${{ secrets.LAVA_TOKEN }}\" https://lava.collabora.dev/api/v0.2/jobs/$(cat lava-jobid.txt)/junit/ > results-junit.xml"
- name: Test results
uses: cazou/test-reporter@fix-split-on-undefined
with:
name: Cros-codecs tests results for Intel
path: '*.xml'
reporter: java-junit
fail-on-error: true
submit-job-amd:
runs-on: ubuntu-latest
permissions:
checks: write
env:
ARCH: amd
steps:
- name: Install lavacli
run: sudo apt-get install lavacli
- name: Add lava identity
run: lavacli identities add --token ${{ secrets.LAVA_TOKEN }} --uri https://lava.collabora.dev/RPC2 --username detlev ci
- uses: actions/checkout@v3
with:
repository: 'cazou/cros-codecs'
- name: Create job description
run: ./ci/lava_job_generate.py --template ci/template.yaml --arch $ARCH --ccdec-build-id "${{ github.run_id }}" --test-repo "${{ github.server_url }}/${{ github.repository }}" --test-branch "${GITHUB_REF_NAME}" --config-file ci/config.yaml --token ${{ secrets.GH_BEARER }} --repo ${GITHUB_REPOSITORY} | tee job.yaml
- name: Submit job
run: lavacli -i ci jobs submit job.yaml | tee lava-jobid.txt
- name: Log job
run: lavacli -i ci jobs logs $(cat lava-jobid.txt)
- name: Retrieve test results
# lavacli doesn't support retrieving results in the JUnit format. Use the REST API
run: "curl -H \"Authorization: Token ${{ secrets.LAVA_TOKEN }}\" https://lava.collabora.dev/api/v0.2/jobs/$(cat lava-jobid.txt)/junit/ > results-junit.xml"
- name: Test results
uses: cazou/test-reporter@fix-split-on-undefined
with:
name: Cros-codecs tests results for AMD
path: '*.xml'
reporter: java-junit
fail-on-error: true