Skip to content

Commit 40bf908

Browse files
authored
Merge branch 'qualcomm-linux:master' into master
2 parents 2c346a4 + bd4a419 commit 40bf908

File tree

70 files changed

+1324
-1246
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1324
-1246
lines changed

.github/actions/compile/action.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ runs:
3939
run: |
4040
mkdir $KAS_WORK_DIR
4141
${{inputs.kas}} dump --resolve-env --resolve-local --resolve-refs \
42-
ci/mirror.yml:ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }} > kas-build.yml
42+
ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }} > kas-build.yml
4343
4444
- name: Kas qcom world build
4545
shell: bash
4646
run: |
47-
${{inputs.kas}} build ci/mirror.yml:ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}:ci/world.yml
47+
${{inputs.kas}} build ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}:ci/world.yml
4848
ci/kas-container-shell-helper.sh ci/yocto-pybootchartgui.sh
4949
mv $KAS_WORK_DIR/build/buildchart.svg buildchart-world.svg
5050
5151
- name: Kas build images
5252
shell: bash
5353
run: |
54-
${{inputs.kas}} build ci/mirror.yml:ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}
54+
${{inputs.kas}} build ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}
5555
ci/kas-container-shell-helper.sh ci/yocto-pybootchartgui.sh
5656
mv $KAS_WORK_DIR/build/buildchart.svg .
5757
5858
if [ "${{ inputs.machine }}" = "qcom-armv8a" ]; then
59-
${{inputs.kas}} build ci/mirror.yml:ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}:ci/initramfs-test.yml
59+
${{inputs.kas}} build ci/${{ inputs.machine }}.yml${{ inputs.distro_yaml }}${{ inputs.kernel_yaml }}:ci/initramfs-test.yml
6060
fi
6161
6262
- uses: actions/upload-artifact@v4
@@ -96,3 +96,23 @@ runs:
9696
path: ./uploads
9797
destination: ${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ github.run_id }}-${{ github.run_attempt }}/
9898
s3_bucket: qcom-prd-gh-artifacts
99+
100+
- name: "Print output"
101+
shell: bash
102+
id: print-output
103+
run: |
104+
KERNEL_DIRNAME="${{ inputs.kernel_dirname }}"
105+
if [ -n "${KERNEL_DIRNAME}" ]; then
106+
KERNEL_DIRNAME="_${KERNEL_DIRNAME}"
107+
fi
108+
BUILDNAME="${{ inputs.machine }}_${{ inputs.distro_name }}${KERNEL_DIRNAME}"
109+
FILENAME="build-url_${BUILDNAME}"
110+
echo "${{ steps.upload_artifacts.outputs.url }}" > "${FILENAME}"
111+
echo "filename=${FILENAME}" >> $GITHUB_OUTPUT
112+
- name: Upload build URL
113+
uses: actions/upload-artifact@v4
114+
with:
115+
overwrite: true
116+
name: ${{ steps.print-output.outputs.filename }}
117+
path: ${{ steps.print-output.outputs.filename }}
118+

.github/workflows/build-yocto.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -165,24 +165,41 @@ jobs:
165165
cache_dir: ${CACHE_DIR}
166166
kas: ${KAS_CONTAINER}
167167

168-
create-output:
168+
publish_summary:
169169
needs: compile
170-
outputs:
171-
url: ${{ steps.print-output.outputs.url }}
172-
runs-on: ubuntu-latest
170+
runs-on: [self-hosted, qcom-u2404, amd64-ssd]
173171
steps:
172+
- name: 'Download build URLs'
173+
uses: actions/download-artifact@v4
174+
with:
175+
github-token: ${{ secrets.GITHUB_TOKEN }}
176+
pattern: build-url*
177+
174178
- name: "Print output"
179+
shell: bash
175180
id: print-output
176-
env:
177-
build_url: ${{ needs.compile.outputs.url }}
178181
run: |
179-
echo "Downloads URL: ${build_url}"
180-
echo "url=\"${build_url}\"" >> $GITHUB_OUTPUT
181-
echo "${build_url}" > build_url
182-
echo "## Download URL" >> $GITHUB_STEP_SUMMARY
183-
echo "[${build_url}](${build_url})" >> $GITHUB_STEP_SUMMARY
182+
echo "## Download URLs" >> $GITHUB_STEP_SUMMARY
183+
export BUILD_URL=""
184+
for FILE in build-url*
185+
do
186+
# Extract build OS and machine name
187+
remainder="$FILE"
188+
BUILD_URL_STR="${remainder%%_*}"; remainder="${remainder#*_}"
189+
MACHINE="${remainder%%_*}"; remainder="${remainder#*_}"
190+
OS="${remainder%%_*}"
191+
BUILD_URL=$(cat "$FILE/$FILE")
192+
echo "### ${MACHINE} ${OS}" >> $GITHUB_STEP_SUMMARY
193+
echo "[${BUILD_URL}](${BUILD_URL})" >> $GITHUB_STEP_SUMMARY
194+
done
195+
# for backward compatibility only
196+
# This section should be removed once the patch is merged
197+
echo "${BUILD_URL}" > build_url
184198
- name: Upload build URL
185199
uses: actions/upload-artifact@v4
186200
with:
201+
overwrite: true
187202
name: build_url
188203
path: build_url
204+
205+

.github/workflows/lava-schema-check.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/nightly-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
needs: build-nightly
2121
secrets: inherit
2222
with:
23-
url: ${{ needs.build-nightly.outputs.artifacts_url }}
23+
build_id: ${{ github.run_id }}

.github/workflows/pr.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,4 @@ jobs:
2121
path: ${{ github.event_path }}
2222
build-pr:
2323
uses: ./.github/workflows/build-yocto.yml
24-
schema-check:
25-
uses: ./.github/workflows/lava-schema-check.yml
2624

.github/workflows/push.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ permissions:
1414
jobs:
1515
build:
1616
uses: ./.github/workflows/build-yocto.yml
17-
schema-check:
18-
uses: ./.github/workflows/lava-schema-check.yml
1917
test:
2018
uses: ./.github/workflows/test.yml
21-
needs: [build, schema-check]
19+
needs: [build]
2220
secrets: inherit
2321
with:
24-
url: ${{ needs.build.outputs.artifacts_url }}
22+
build_id: ${{ github.run_id }}

.github/workflows/test-pr.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,12 @@ permissions:
1515
packages: read
1616

1717
jobs:
18-
retrieve-build-url:
19-
runs-on: ubuntu-latest
20-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
21-
outputs:
22-
url: ${{ steps.set-build-url.outputs.url }}
23-
steps:
24-
- name: 'Download build URL'
25-
id: download-artifact
26-
uses: actions/download-artifact@v4
27-
with:
28-
run-id: ${{ github.event.workflow_run.id }}
29-
github-token: ${{ secrets.GITHUB_TOKEN }}
30-
name: build_url
31-
- name: 'Setup build URL'
32-
id: set-build-url
33-
run: |
34-
BUILD_URL=$(cat build_url)
35-
echo "Build URL: ${BUILD_URL}"
36-
echo "url=${BUILD_URL}" >> $GITHUB_OUTPUT
37-
3818
test:
19+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
3920
uses: ./.github/workflows/test.yml
4021
secrets: inherit
41-
needs: retrieve-build-url
4222
with:
43-
url: ${{ needs.retrieve-build-url.outputs.url }}
23+
build_id: ${{ github.event.workflow_run.id }}
4424

4525
publish-test-results:
4626
name: "Publish Tests Results"

.github/workflows/test.yml

Lines changed: 74 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,79 @@ name: Tests
33
on:
44
workflow_call:
55
inputs:
6-
url:
6+
build_id:
77
required: true
88
type: string
99

1010
jobs:
11+
prepare-jobs:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
machine:
16+
- iq-8275-evk
17+
- iq-9075-evk
18+
- qcm6490-idp
19+
- qcs615-adp-air
20+
- qcs6490-rb3gen2-core-kit
21+
- qcs8300-ride-sx
22+
- qcs9100-ride-sx
23+
- qrb2210-rb1-core-kit
24+
- qcom-armv8a
25+
- qcom-armv7a
26+
distro:
27+
- name: poky-altcfg
28+
- name: qcom-distro
29+
steps:
30+
- uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: 'Download build URLs'
35+
uses: actions/download-artifact@v4
36+
with:
37+
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
run-id: ${{ inputs.build_id }}
39+
pattern: build-url*
40+
41+
- name: "Generate testjobs"
42+
run: |
43+
export BUILD_URL_FILE="$GITHUB_WORKSPACE/build-url_${{ matrix.machine }}_${{ matrix.distro.name }}/build-url_${{ matrix.machine }}_${{ matrix.distro.name }}"
44+
echo "${BUILD_URL_FILE}"
45+
if [ -f "$BUILD_URL_FILE" ]; then
46+
# install dependencies
47+
export BUILD_URL=$(cat "${BUILD_URL_FILE}")
48+
pip install jinja2
49+
if [ "${{ matrix.machine }}" = "qcom-armv8a" ]; then
50+
python3 ci/generatetests.py --templates ci/lava --os ${{ matrix.distro.name }} --device dragonboard-410c --build-url "${BUILD_URL}"
51+
python3 ci/generatetests.py --templates ci/lava --os ${{ matrix.distro.name }} --device dragonboard-820c --build-url "${BUILD_URL}"
52+
echo "MACHINE=dragonboard" >> $GITHUB_ENV
53+
else
54+
python3 ci/generatetests.py --templates ci/lava --os ${{ matrix.distro.name }} --device ${{ matrix.machine }} --build-url "${BUILD_URL}"
55+
echo "MACHINE=${{ matrix.machine }}" >> $GITHUB_ENV
56+
fi
57+
fi
58+
- name: 'Upload test jobs'
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: testjobs-${{ matrix.machine }}-${{ matrix.distro.name }}
62+
path: ${{ env.MACHINE}}*-${{ matrix.distro.name }}-*.yaml
63+
1164
prepare-job-list:
65+
needs: prepare-jobs
1266
runs-on: ubuntu-latest
1367
outputs:
1468
jobmatrix: ${{ steps.listjobs.outputs.jobmatrix }}
1569
steps:
16-
- name: Clone repository
17-
uses: actions/checkout@v4
70+
- name: 'Download job templates'
71+
uses: actions/download-artifact@v4
1872
with:
19-
fetch-depth: 0
20-
- name: Print trigger
21-
run: |
22-
echo "Triggered by ${{ github.event_name }}"
23-
echo "Build URL: ${{ inputs.url }}"
73+
pattern: testjobs-*
74+
2475
- name: "List jobs"
2576
id: listjobs
2677
run: |
27-
JOBFILES=$(find ci/lava/ -name *.yaml)
78+
JOBFILES=$(find . -name *.yaml)
2879
JOBFILES=$(echo "$JOBFILES" | sed -e "s/^/\"/" | sed -e "s/$/\",/" | tr -d "\n" | sed -e "s/.$//")
2980
JOBFILES="[${JOBFILES}]"
3081
J=$(jq -cn --argjson jobfiles "$JOBFILES" '{target: $jobfiles}')
@@ -35,34 +86,21 @@ jobs:
3586
needs: prepare-job-list
3687
runs-on: ubuntu-latest
3788
strategy:
38-
fail-fast: false
3989
matrix: ${{ fromJson(needs.prepare-job-list.outputs.jobmatrix) }}
4090
steps:
41-
- name: Clone repository
42-
uses: actions/checkout@v4
91+
- name: 'Download job templates'
92+
uses: actions/download-artifact@v4
4393
with:
44-
fetch-depth: 0
94+
pattern: testjobs-*
4595

46-
- name: "Update test definition ${{ matrix.target }}"
96+
- name: 'Prepare output file name'
4797
run: |
48-
TARGET=${{ matrix.target }}
49-
FIND_PATH="${TARGET#*/}"
50-
DEVICE_TYPE_PATH="${FIND_PATH%/*}"
51-
DEVICE_TYPE="${DEVICE_TYPE_PATH#*/}"
52-
BUILD_DOWNLOAD_URL="${{inputs.url}}"
53-
FILE_NAME=$(echo "${FIND_PATH%.yaml}" | tr "/" "-")
54-
sed -i "s|{{DEVICE_TYPE}}|${DEVICE_TYPE}|g" "${{ matrix.target }}"
55-
sed -i "s|{{GITHUB_SHA}}|${GITHUB_SHA}|g" "${{ matrix.target }}"
56-
sed -i "s|{{BUILD_DOWNLOAD_URL}}|${BUILD_DOWNLOAD_URL}|g" "${{ matrix.target }}"
57-
sed -i "s|{{GITHUB_RUN_ID}}|${GITHUB_RUN_ID}|g" "${{ matrix.target }}"
58-
cat "${{ matrix.target }}"
59-
echo "JOB_NAME=${FILE_NAME}" >> $GITHUB_ENV
98+
OUTPUT_NAME=$(echo "${{ matrix.target }}" | sed "s|\/|-|g")
99+
echo "RESULT_NAME=${OUTPUT_NAME#??}" >> $GITHUB_ENV
60100
61101
- name: Submit ${{ matrix.target }}
62102
timeout-minutes: 20
63103
uses: foundriesio/lava-action@v8
64-
env:
65-
JOB_NAME: ${{ env.JOB_NAME }}
66104
with:
67105
lava_token: ${{ secrets.LAVATOKEN }}
68106
lava_url: 'lava.infra.foundries.io'
@@ -72,7 +110,7 @@ jobs:
72110
fail_action_on_incomplete: false
73111
save_result_as_artifact: true
74112
save_job_details: true
75-
result_file_name: "${{ env.JOB_NAME }}"
113+
result_file_name: "${{ env.RESULT_NAME }}"
76114

77115
publish-test-results:
78116
name: "Publish Tests Results"
@@ -93,11 +131,6 @@ jobs:
93131
echo $GITHUB_WORKSPACE
94132
ls -R $GITHUB_WORKSPACE
95133
96-
- name: Publish Test Results
97-
uses: EnricoMi/publish-unit-test-result-action@v2
98-
with:
99-
files: "${{ github.workspace }}/artifacts/**/*.xml"
100-
101134
- name: Publish Test Job Details
102135
run: |
103136
for json_file in $(find ${{ github.workspace }} -name "test-job-*.json")
@@ -108,3 +141,10 @@ jobs:
108141
echo " * [Job $JOB_ID on $DEVICE_TYPE]($URL)"
109142
echo " * [Job $JOB_ID on $DEVICE_TYPE]($URL)" >> $GITHUB_STEP_SUMMARY
110143
done
144+
145+
- name: Publish Test Results
146+
uses: EnricoMi/publish-unit-test-result-action@v2
147+
with:
148+
files: "${{ github.workspace }}/artifacts/**/*.xml"
149+
action_fail: true
150+
action_fail_on_inconclusive: true

ci/base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
local_conf_header:
3131
base: |
3232
CONF_VERSION = "2"
33-
INHERIT += "buildstats buildstats-summary"
33+
INHERIT += "buildstats-summary"
3434
INHERIT += "buildhistory"
3535
INHERIT += "rm_work"
3636
cmdline: |

0 commit comments

Comments
 (0)