From dae44ec53ac6a7a65ebc41b7f14292d6659c00fb Mon Sep 17 00:00:00 2001 From: Milosz Wasilewski Date: Tue, 11 Nov 2025 13:31:49 +0000 Subject: [PATCH 1/4] workflows: move LAVA job generation to lava-test-plans LAVA test jobs are now generated using qualcomm-linux/lava-test-plans repository. This allows to decouple job generation from meta-qcom workflows and manage test plan separately. It also allows to share the test jobs with other projects in qualcomm-linux. Signed-off-by: Milosz Wasilewski --- .github/actions/lava-test-plans/action.yml | 102 +++++++++++++++ .github/workflows/test.yml | 27 +--- ci/generatetests.py | 44 ------- ci/lava.yml | 118 ------------------ ci/lava/poky-altcfg/README.md | 36 ------ .../poky-altcfg/dragonboard-410c/boot.yaml | 79 ------------ .../poky-altcfg/dragonboard-820c/boot.yaml | 77 ------------ ci/lava/poky-altcfg/iq-9075-evk/boot.yaml | 63 ---------- ci/lava/poky-altcfg/qcs8300-ride-sx/boot.yaml | 63 ---------- ci/lava/poky-altcfg/qcs9100-ride-sx/boot.yaml | 63 ---------- ci/lava/poky-altcfg/rb1-core-kit/boot.yaml | 63 ---------- .../poky-altcfg/rb3gen2-core-kit/boot.yaml | 63 ---------- ci/lava/qcom-distro/README.md | 36 ------ .../qcom-distro/dragonboard-410c/boot.yaml | 81 ------------ .../qcom-distro/dragonboard-820c/boot.yaml | 79 ------------ ci/lava/qcom-distro/iq-9075-evk/boot.yaml | 65 ---------- ci/lava/qcom-distro/qcs8300-ride-sx/boot.yaml | 65 ---------- ci/lava/qcom-distro/qcs9100-ride-sx/boot.yaml | 65 ---------- ci/lava/qcom-distro/rb1-core-kit/boot.yaml | 65 ---------- .../qcom-distro/rb3gen2-core-kit/boot.yaml | 65 ---------- 20 files changed, 108 insertions(+), 1211 deletions(-) create mode 100644 .github/actions/lava-test-plans/action.yml delete mode 100644 ci/generatetests.py delete mode 100644 ci/lava.yml delete mode 100644 ci/lava/poky-altcfg/README.md delete mode 100644 ci/lava/poky-altcfg/dragonboard-410c/boot.yaml delete mode 100644 ci/lava/poky-altcfg/dragonboard-820c/boot.yaml delete mode 100644 ci/lava/poky-altcfg/iq-9075-evk/boot.yaml delete mode 100644 ci/lava/poky-altcfg/qcs8300-ride-sx/boot.yaml delete mode 100644 ci/lava/poky-altcfg/qcs9100-ride-sx/boot.yaml delete mode 100644 ci/lava/poky-altcfg/rb1-core-kit/boot.yaml delete mode 100644 ci/lava/poky-altcfg/rb3gen2-core-kit/boot.yaml delete mode 100644 ci/lava/qcom-distro/README.md delete mode 100644 ci/lava/qcom-distro/dragonboard-410c/boot.yaml delete mode 100644 ci/lava/qcom-distro/dragonboard-820c/boot.yaml delete mode 100644 ci/lava/qcom-distro/iq-9075-evk/boot.yaml delete mode 100644 ci/lava/qcom-distro/qcs8300-ride-sx/boot.yaml delete mode 100644 ci/lava/qcom-distro/qcs9100-ride-sx/boot.yaml delete mode 100644 ci/lava/qcom-distro/rb1-core-kit/boot.yaml delete mode 100644 ci/lava/qcom-distro/rb3gen2-core-kit/boot.yaml diff --git a/.github/actions/lava-test-plans/action.yml b/.github/actions/lava-test-plans/action.yml new file mode 100644 index 000000000..ce7f8341c --- /dev/null +++ b/.github/actions/lava-test-plans/action.yml @@ -0,0 +1,102 @@ +name: Run lava-test-plans +inputs: + machine: + required: true + distro_name: + required: true + build_id: + required: true + gh_token: + required: true +outputs: + url: + description: Location of the published binaries + value: ${{ steps.upload_artifacts.outputs.url }} +runs: + using: "composite" + steps: + - uses: actions/checkout@v4 + with: + repository: qualcomm-linux/lava-test-plans + path: lava-test-plans + ref: 35c697c2779bcb98c77b2f7b4a9b1962e18c83e3 + + - name: 'Download build URLs' + uses: actions/download-artifact@v6 + with: + github-token: ${{ inputs.gh_token }} + run-id: ${{ inputs.build_id }} + pattern: build-url_* + + - name: Run lava-test-plans + shell: bash + run: | + cd lava-test-plans && pip install . + lava-test-plans --help + #echo "PROJECT_NAME=${GITHUB_REPOSITORY#*/}" >> variables.ini + #echo "PROJECT=projects/${GITHUB_REPOSITORY#*/}/" >> variables.ini + echo "PROJECT_NAME=meta-qcom" >> gh-variables.ini + echo "PROJECT=projects/meta-qcom/" >> gh-variables.ini + echo "LAVA_JOB_PRIORITY=50" >> gh-variables.ini + echo "OS_INFO=qcom-distro" >> gh-variables.ini + echo "BUILD_NUMBER=${{ github.run_id }}-${{ github.run_attempt }}" >> gh-variables.ini + echo "DOCKER_IMAGE_POSTPROCESS=ghcr.io/foundriesio/lava-lmp-sign:main" >> gh-variables.ini + echo "AUTH_HEADER_NAME=Authentication" >> gh-variables.ini + echo "AUTH_HEADER_TOKEN=Q_GITHUB_TOKEN" >> gh-variables.ini + IMAGE_TYPE="core-image-base" + if [ "${{ inputs.distro_name }}" = "qcom-distro" ]; then + IMAGE_TYPE="qcom-multimedia-image" + echo "AUTO_LOGIN_PASSWORD_PROMPT=Password" >> gh-variables.ini + echo "AUTO_LOGIN_PASSWORD=oelinux123" >> gh-variables.ini + fi + echo "IMAGE_FILE_NAME=${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> gh-variables.ini + export BUILD_URL="" + export BUILD_URL_FILE="$GITHUB_WORKSPACE/build-url_${{ inputs.machine }}_${{ inputs.distro_name }}/build-url_${{ inputs.machine }}_${{ inputs.distro_name }}" + echo "${BUILD_URL_FILE}" + if [ -f "$BUILD_URL_FILE" ]; then + export BUILD_URL=$(cat "${BUILD_URL_FILE}") + fi + if [ -z "${BUILD_URL}" ]; then + echo "BUILD_URL missing" + # fail action if BUILD_URL is empty. At this point the variable should be filled in + exit 1 + fi + echo "BUILD_DOWNLOAD_URL=${BUILD_URL}/" >> gh-variables.ini + + #echo "ROOTFS_URL=https://quic-yocto-fileserver-1029608027416.us-central1.run.app/${GITHUB_REPOSITORY}/${{ github.run_id }}-${{ github.run_attempt }}/${{ inputs.distro_name }}/${{ inputs.machine }}/${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> gh-variables.ini + echo "ROOTFS_URL=${BUILD_URL}/${{ inputs.distro_name }}/${{ inputs.machine }}/${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> gh-variables.ini + + if [ "${{ inputs.machine }}" = "qcom-armv8a" ]; then + echo "ROOTFS_IMG_FILE=core-image-base-qcom-armv8a.rootfs.ext4" >> gh-variables.ini + cp gh-variables.ini dragonboard-410c.ini + echo "DEVICE_TYPE=dragonboard-410c" >> dragonboard-410c.ini + echo "BOOT_IMG_FILE=boot-apq8016-sbc-qcom-armv8a.img" >> dragonboard-410c.ini + cat dragonboard-410c.ini + lava-test-plans --dry-run --variables dragonboard-410c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}" --device-type "dragonboard-410c" --dry-run-path ../dragonboard-410c-${{ inputs.distro_name }} || true + cp gh-variables.ini dragonboard-820c.ini + echo "BOOT_IMG_FILE=boot-apq8096-db820c-qcom-armv8a.img" >> dragonboard-820c.ini + echo "DEVICE_TYPE=dragonboard-820c" >> dragonboard-820c.ini + cat dragonboard-820c.ini + lava-test-plans --dry-run --variables dragonboard-820c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}" --device-type "dragonboard-820c" --dry-run-path ../dragonboard-820c-${{ inputs.distro_name }} || true + echo "MACHINE=dragonboard" >> $GITHUB_ENV + else + echo "DEVICE_TYPE=${{ inputs.machine }}" >> gh-variables.ini + + cat gh-variables.ini + #lava-test-plans --dry-run --variables gh-variables.ini --test-plan "${GITHUB_REPOSITORY#*/}" --device-type "${{ inputs.machine }}" --verbose 10 + lava-test-plans --dry-run --variables gh-variables.ini --test-plan "meta-qcom/${{ inputs.distro_name }}" --device-type "${{ inputs.machine }}" --dry-run-path ../${{ inputs.machine }}-${{ inputs.distro_name }} || true + echo "MACHINE=${{ inputs.machine }}" >> $GITHUB_ENV + fi + + - name: "List files" + shell: bash + run: | + echo $GITHUB_WORKSPACE + ls -R $GITHUB_WORKSPACE + + - name: 'Upload test jobs' + uses: actions/upload-artifact@v4 + with: + name: testjobs-${{ inputs.machine }}-${{ inputs.distro_name }} + path: ${{ env.MACHINE}}*-${{ inputs.distro_name }} + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index efbe05323..6e38cfbe3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,28 +38,13 @@ jobs: run-id: ${{ inputs.build_id }} pattern: build-url* - - name: "Generate testjobs" - run: | - export BUILD_URL_FILE="$GITHUB_WORKSPACE/build-url_${{ matrix.machine }}_${{ matrix.distro.name }}/build-url_${{ matrix.machine }}_${{ matrix.distro.name }}" - echo "${BUILD_URL_FILE}" - if [ -f "$BUILD_URL_FILE" ]; then - # install dependencies - export BUILD_URL=$(cat "${BUILD_URL_FILE}") - pip install jinja2 - if [ "${{ matrix.machine }}" = "qcom-armv8a" ]; then - python3 ci/generatetests.py --templates ci/lava --os ${{ matrix.distro.name }} --device dragonboard-410c --build-url "${BUILD_URL}" - python3 ci/generatetests.py --templates ci/lava --os ${{ matrix.distro.name }} --device dragonboard-820c --build-url "${BUILD_URL}" - echo "MACHINE=dragonboard" >> $GITHUB_ENV - else - python3 ci/generatetests.py --templates ci/lava --os ${{ matrix.distro.name }} --device ${{ matrix.machine }} --build-url "${BUILD_URL}" - echo "MACHINE=${{ matrix.machine }}" >> $GITHUB_ENV - fi - fi - - name: 'Upload test jobs' - uses: actions/upload-artifact@v4 + - name: Run lava-test-plans + uses: ./.github/actions/lava-test-plans with: - name: testjobs-${{ matrix.machine }}-${{ matrix.distro.name }} - path: ${{ env.MACHINE}}*-${{ matrix.distro.name }}-*.yaml + machine: ${{ matrix.machine }} + distro_name: ${{ matrix.distro.name }} + build_id: ${{ github.run_id }} + gh_token: ${{ secrets.GITHUB_TOKEN }} prepare-job-list: needs: prepare-jobs diff --git a/ci/generatetests.py b/ci/generatetests.py deleted file mode 100644 index 53ee5c5bc..000000000 --- a/ci/generatetests.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved. -# SPDX-License-Identifier: MIT - -import logging -import os -import sys - -from argparse import ArgumentParser, FileType -from jinja2 import Environment, FileSystemLoader - -logger = logging.getLogger() - - -class Secrets: - pass - - -if __name__ == "__main__": - parser = ArgumentParser() - parser.add_argument("--device", required=True, help="Device type in LAVA") - parser.add_argument("--os", required=True, help="OS build (debian/qcom/poky)") - parser.add_argument("--build-url", required=True, help="Base URL (without path) pointing to the downloads location") - parser.add_argument("--templates", required=True, help="Base path to the templates directory") - - args = parser.parse_args() - context = os.environ - context.update({"BUILD_DOWNLOAD_URL": args.build_url}) - context.update({"DEVICE_TYPE": args.device}) - - job_template_dir = os.path.join(args.templates, args.os, args.device) - if not os.path.isdir(job_template_dir): - logger.info(f"No templates found for: {args.os}/{args.device}") - sys.exit(0) - - environment = Environment(loader=FileSystemLoader(job_template_dir)) - # get list of all templates - with os.scandir(job_template_dir) as direntry: - for entry in direntry: - if entry.name.endswith('yaml') and entry.is_file(): - template = environment.get_template(entry.name) - lava_job = template.render(context) - with open(f"{args.device}-{args.os}-{entry.name}", "w") as lava_job_file: - lava_job_file.write(lava_job) - diff --git a/ci/lava.yml b/ci/lava.yml deleted file mode 100644 index d3d590292..000000000 --- a/ci/lava.yml +++ /dev/null @@ -1,118 +0,0 @@ -plan: - qcs9075-iq-9075-evk: - poky-altcfg: - jobs: - - name: smoke - tests: - - name: smoke - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" - visibility: public - download: poky-altcfg/qcs9075-iq-9075-evk/core-image-base-qcs9075-iq-9075-evk.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - - qcs9100-ride-sx: - poky-altcfg: - jobs: - - name: smoke - tests: - - name: smoke - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" - visibility: public - download: poky-altcfg/qcs9100-ride-sx/core-image-base-qcs9100-ride-sx.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - - rb3gen2-core-kit: - poky-altcfg: - jobs: - - name: smoke - tests: - - name: smoke - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" - visibility: public - download: poky-altcfg/rb3gen2-core-kit/core-image-base-rb3gen2-core-kit.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - qcom-distro: - jobs: - - name: smoke - tests: - - name: smoke - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" - visibility: public - download: qcom/rb3gen2-core-kit/qcom-multimedia-image-rb3gen2-core-kit.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - - name: wifi - tests: - - name: wifi - parameters: - DEVICE: 'wlp1s0' - ETHERNET_DEVICE: 'end0' - FILE_CHECKSUM: 8388f7232b400bdc80279668847f90da - FILE_URL: http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/mini.iso - SSID_NAME: "{secrets.AP_NAME}" - SSID_PASSWORD: "{secrets.AP_PASSWORD}" - TIME_DELAY: 120s - visibility: personal - download: qcom/rb3gen2-core-kit/qcom-multimedia-image-rb3gen2-core-kit.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - secrets: - - AP_NAME - - AP_PASSWORD - - rb1-core-kit: - poky-altcfg: - jobs: - - name: smoke - tests: - - name: smoke - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" - visibility: public - download: poky-altcfg/rb1-core-kit/core-image-base-rb1-core-kit.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - qcom-distro: - jobs: - - name: smoke - tests: - - name: smoke - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" - visibility: public - download: qcom/rb1-core-kit/qcom-multimedia-image-rb1-core-kit.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - - name: wifi - tests: - - name: wifi - parameters: - DEVICE: 'wlp1s0' - ETHERNET_DEVICE: 'end0' - FILE_CHECKSUM: 8388f7232b400bdc80279668847f90da - FILE_URL: http://archive.ubuntu.com/ubuntu/dists/bionic/main/installer-amd64/current/images/netboot/mini.iso - SSID_NAME: "{secrets.AP_NAME}" - SSID_PASSWORD: "{secrets.AP_PASSWORD}" - TIME_DELAY: 120s - visibility: personal - download: qcom/rb1-core-kit/qcom-multimedia-image-rb1-core-kit.rootfs.qcomflash.tar.gz - headers: - - Authentication: Q_GITHUB_TOKEN - secrets: - - AP_NAME - - AP_PASSWORD - - diff --git a/ci/lava/poky-altcfg/README.md b/ci/lava/poky-altcfg/README.md deleted file mode 100644 index f1f241282..000000000 --- a/ci/lava/poky-altcfg/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Test setup - -`ci/lava` directory contains directories with names corresponding to build MACHINE names. -New directories should only be added after the build is available for a given MACHINE. -All files in the `ci/lava/` directory should have `.yaml` extension. -Each file should be a valid LAVA job template. - -LAVA templates are used to create test jobs during the CI runs in this repository. -This happens for the following triggers: - - pull_request - - push - - cron (nightly build) - -# LAVA job templates - -Job templates can use the following variables: - - `DEVICE_TYPE`: name of the LAVA device type or alias. Full list can be found on [LAVA master web interface](https://lava.infra.foundries.io/scheduler/device_types) - - `GITHUB_SHA`: Commit ID corresponding to the github action trigger - - `BUILD_FILE_NAME`: Name of the build artifact to be downloaded. It's constructed as: `core-image-base-${DEVICE_TYPE}.rootfs.qcomflash.tar.gz` - - `BUILD_DOWNLOAD_URL`: URL where the build artifacts can be found. This variable is constructed as: `${{inputs.url}}/${DEVICE_TYPE}/${BUILD_FILE_NAME}` where `{{inputs.url}}` comes from the build action. - - `GITHUB_RUN_ID`: ID of the current Github run. - -After variable substitution the file should form a valid LAVA job definition. - -# Template validation - -Template validation is performed as github action using `lavasoftware/lava-server` container. -Version of the container will be kept in sync with the LAVA server running the test jobs. -Validation script, `schemacheck.py`, uses LAVA code from `lava_common.schemas.validate` method and PyYAML parser. - -## Local template validation - -Before checking the schema locally, all variables mentioned above need to be substituted. -Templates can be validated using `lavasoftware/lava-server` container. - - docker run --rm -v $PWD:/home/ lavasoftware/lava-server:latest python3 /home/ci/schemacheck.py /home/ci/lava diff --git a/ci/lava/poky-altcfg/dragonboard-410c/boot.yaml b/ci/lava/poky-altcfg/dragonboard-410c/boot.yaml deleted file mode 100644 index d09bd11db..000000000 --- a/ci/lava/poky-altcfg/dragonboard-410c/boot.yaml +++ /dev/null @@ -1,79 +0,0 @@ -actions: -- deploy: - timeout: - minutes: 10 - to: downloads - images: - boot: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/qcom-armv8a/boot-apq8016-sbc-qcom-armv8a.img" - rootfs: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/qcom-armv8a/core-image-base-qcom-armv8a.rootfs.ext4.gz" - compression: gz - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - img2simg core-image-base-qcom-armv8a.rootfs.ext4 core-image-base-qcom-armv8a.rootfs.img -- deploy: - timeout: - minutes: 15 - to: fastboot - images: - boot: - url: downloads://boot-apq8016-sbc-qcom-armv8a.img - rootfs: - url: downloads://core-image-base-qcom-armv8a.rootfs.img - apply-overlay: true -- command: - name: pre_power_command - timeout: - minutes: 2 -- command: - name: network_turn_on - timeout: - minutes: 2 -- boot: - auto_login: - login_prompt: 'login:' - username: root - prompts: - - 'root@qcom-armv8a' - timeout: - minutes: 5 - method: fastboot -- command: - name: pre_os_command - timeout: - minutes: 2 -- test: - timeout: - minutes: 5 - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -context: - test_character_delay: 10 -metadata: - build-commit: '{{GITHUB_SHA}}' -timeouts: - job: - minutes: 45 - action: - minutes: 15 - connection: - minutes: 2 -priority: medium -visibility: public - diff --git a/ci/lava/poky-altcfg/dragonboard-820c/boot.yaml b/ci/lava/poky-altcfg/dragonboard-820c/boot.yaml deleted file mode 100644 index 066cb9f0e..000000000 --- a/ci/lava/poky-altcfg/dragonboard-820c/boot.yaml +++ /dev/null @@ -1,77 +0,0 @@ -actions: -- deploy: - timeout: - minutes: 10 - to: downloads - images: - boot: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/qcom-armv8a/boot-apq8096-db820c-qcom-armv8a.img" - rootfs: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/qcom-armv8a/core-image-base-qcom-armv8a.rootfs.ext4.gz" - compression: gz - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - img2simg core-image-base-qcom-armv8a.rootfs.ext4 core-image-base-qcom-armv8a.rootfs.img -- deploy: - timeout: - minutes: 15 - to: fastboot - images: - boot: - url: downloads://boot-apq8096-db820c-qcom-armv8a.img - rootfs: - url: downloads://core-image-base-qcom-armv8a.rootfs.img - apply-overlay: true -- command: - name: pre_power_command - timeout: - minutes: 2 -- command: - name: network_turn_on - timeout: - minutes: 2 -- boot: - auto_login: - login_prompt: 'login:' - username: root - prompts: - - 'root@qcom-armv8a' - timeout: - minutes: 5 - method: fastboot -- command: - name: pre_os_command - timeout: - minutes: 2 -- test: - timeout: - minutes: 5 - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -timeouts: - job: - minutes: 45 - action: - minutes: 15 - connection: - minutes: 2 -priority: medium -visibility: public - diff --git a/ci/lava/poky-altcfg/iq-9075-evk/boot.yaml b/ci/lava/poky-altcfg/iq-9075-evk/boot.yaml deleted file mode 100644 index 212be9b7f..000000000 --- a/ci/lava/poky-altcfg/iq-9075-evk/boot.yaml +++ /dev/null @@ -1,63 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/{{DEVICE_TYPE}}/core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs9100-rb8" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/poky-altcfg/qcs8300-ride-sx/boot.yaml b/ci/lava/poky-altcfg/qcs8300-ride-sx/boot.yaml deleted file mode 100644 index 55af3ef30..000000000 --- a/ci/lava/poky-altcfg/qcs8300-ride-sx/boot.yaml +++ /dev/null @@ -1,63 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/{{DEVICE_TYPE}}/core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs8300" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: qcs8300-ride -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/poky-altcfg/qcs9100-ride-sx/boot.yaml b/ci/lava/poky-altcfg/qcs9100-ride-sx/boot.yaml deleted file mode 100644 index 10b74a22e..000000000 --- a/ci/lava/poky-altcfg/qcs9100-ride-sx/boot.yaml +++ /dev/null @@ -1,63 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/{{DEVICE_TYPE}}/core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs9100" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/poky-altcfg/rb1-core-kit/boot.yaml b/ci/lava/poky-altcfg/rb1-core-kit/boot.yaml deleted file mode 100644 index d419b65e0..000000000 --- a/ci/lava/poky-altcfg/rb1-core-kit/boot.yaml +++ /dev/null @@ -1,63 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/{{DEVICE_TYPE}}/core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qrb2210-rb1" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/poky-altcfg/rb3gen2-core-kit/boot.yaml b/ci/lava/poky-altcfg/rb3gen2-core-kit/boot.yaml deleted file mode 100644 index 6400c8383..000000000 --- a/ci/lava/poky-altcfg/rb3gen2-core-kit/boot.yaml +++ /dev/null @@ -1,63 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/poky-altcfg/{{DEVICE_TYPE}}/core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs6490-rb3gen2" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://core-image-base-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/qcom-distro/README.md b/ci/lava/qcom-distro/README.md deleted file mode 100644 index f043c7a1d..000000000 --- a/ci/lava/qcom-distro/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Test setup - -`ci/lava` directory contains directories with names corresponding to build MACHINE names. -New directories should only be added after the build is available for a given MACHINE. -All files in the `ci/lava/` directory should have `.yaml` extension. -Each file should be a valid LAVA job template. - -LAVA templates are used to create test jobs during the CI runs in this repository. -This happens for the following triggers: - - pull_request - - push - - cron (nightly build) - -# LAVA job templates - -Job templates can use the following variables: - - `DEVICE_TYPE`: name of the LAVA device type or alias. Full list can be found on [LAVA master web interface](https://lava.infra.foundries.io/scheduler/device_types) - - `GITHUB_SHA`: Commit ID corresponding to the github action trigger - - `BUILD_FILE_NAME`: Name of the build artifact to be downloaded. It's constructed as: `qcom-multimedia-image-${DEVICE_TYPE}.rootfs.qcomflash.tar.gz` - - `BUILD_DOWNLOAD_URL`: URL where the build artifacts can be found. This variable is constructed as: `${{inputs.url}}/${DEVICE_TYPE}/${BUILD_FILE_NAME}` where `{{inputs.url}}` comes from the build action. - - `GITHUB_RUN_ID`: ID of the current Github run. - -After variable substitution the file should form a valid LAVA job definition. - -# Template validation - -Template validation is performed as github action using `lavasoftware/lava-server` container. -Version of the container will be kept in sync with the LAVA server running the test jobs. -Validation script, `schemacheck.py`, uses LAVA code from `lava_common.schemas.validate` method and PyYAML parser. - -## Local template validation - -Before checking the schema locally, all variables mentioned above need to be substituted. -Templates can be validated using `lavasoftware/lava-server` container. - - docker run --rm -v $PWD:/home/ lavasoftware/lava-server:latest python3 /home/ci/schemacheck.py /home/ci/lava diff --git a/ci/lava/qcom-distro/dragonboard-410c/boot.yaml b/ci/lava/qcom-distro/dragonboard-410c/boot.yaml deleted file mode 100644 index 510cd191f..000000000 --- a/ci/lava/qcom-distro/dragonboard-410c/boot.yaml +++ /dev/null @@ -1,81 +0,0 @@ -actions: -- deploy: - timeout: - minutes: 10 - to: downloads - images: - boot: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/qcom-armv8a/boot-apq8016-sbc-qcom-armv8a.img" - rootfs: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/qcom-armv8a/qcom-multimedia-image-qcom-armv8a.rootfs.ext4.gz" - compression: gz - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - img2simg qcom-multimedia-image-qcom-armv8a.rootfs.ext4 qcom-multimedia-image-qcom-armv8a.rootfs.img -- deploy: - timeout: - minutes: 15 - to: fastboot - images: - boot: - url: downloads://boot-apq8016-sbc-qcom-armv8a.img - rootfs: - url: downloads://qcom-multimedia-image-qcom-armv8a.rootfs.img - apply-overlay: true -- command: - name: pre_power_command - timeout: - minutes: 2 -- command: - name: network_turn_on - timeout: - minutes: 2 -- boot: - auto_login: - login_prompt: 'login:' - username: root - password_prompt: 'Password' - password: oelinux123 - prompts: - - 'root@qcom-armv8a' - timeout: - minutes: 5 - method: fastboot -- command: - name: pre_os_command - timeout: - minutes: 2 -- test: - timeout: - minutes: 5 - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -context: - test_character_delay: 10 -metadata: - build-commit: '{{GITHUB_SHA}}' -timeouts: - job: - minutes: 45 - action: - minutes: 15 - connection: - minutes: 2 -priority: medium -visibility: public - diff --git a/ci/lava/qcom-distro/dragonboard-820c/boot.yaml b/ci/lava/qcom-distro/dragonboard-820c/boot.yaml deleted file mode 100644 index 064b67886..000000000 --- a/ci/lava/qcom-distro/dragonboard-820c/boot.yaml +++ /dev/null @@ -1,79 +0,0 @@ -actions: -- deploy: - timeout: - minutes: 10 - to: downloads - images: - boot: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/qcom-armv8a/boot-apq8096-db820c-qcom-armv8a.img" - rootfs: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/qcom-armv8a/qcom-multimedia-image-qcom-armv8a.rootfs.ext4.gz" - compression: gz - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - img2simg qcom-multimedia-image-qcom-armv8a.rootfs.ext4 qcom-multimedia-image-qcom-armv8a.rootfs.img -- deploy: - timeout: - minutes: 15 - to: fastboot - images: - boot: - url: downloads://boot-apq8096-db820c-qcom-armv8a.img - rootfs: - url: downloads://qcom-multimedia-image-qcom-armv8a.rootfs.img - apply-overlay: true -- command: - name: pre_power_command - timeout: - minutes: 2 -- command: - name: network_turn_on - timeout: - minutes: 2 -- boot: - auto_login: - login_prompt: 'login:' - username: root - password_prompt: 'Password' - password: oelinux123 - prompts: - - 'root@qcom-armv8a' - timeout: - minutes: 5 - method: fastboot -- command: - name: pre_os_command - timeout: - minutes: 2 -- test: - timeout: - minutes: 5 - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -timeouts: - job: - minutes: 45 - action: - minutes: 15 - connection: - minutes: 2 -priority: medium -visibility: public - diff --git a/ci/lava/qcom-distro/iq-9075-evk/boot.yaml b/ci/lava/qcom-distro/iq-9075-evk/boot.yaml deleted file mode 100644 index f0ae80acb..000000000 --- a/ci/lava/qcom-distro/iq-9075-evk/boot.yaml +++ /dev/null @@ -1,65 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/{{DEVICE_TYPE}}/qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs9100-rb8" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - password_prompt: 'Password' - password: oelinux123 - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/qcom-distro/qcs8300-ride-sx/boot.yaml b/ci/lava/qcom-distro/qcs8300-ride-sx/boot.yaml deleted file mode 100644 index 75d93e105..000000000 --- a/ci/lava/qcom-distro/qcs8300-ride-sx/boot.yaml +++ /dev/null @@ -1,65 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/{{DEVICE_TYPE}}/qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs8300" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - password_prompt: 'Password' - password: oelinux123 - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: qcs8300-ride -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/qcom-distro/qcs9100-ride-sx/boot.yaml b/ci/lava/qcom-distro/qcs9100-ride-sx/boot.yaml deleted file mode 100644 index 2772acbb1..000000000 --- a/ci/lava/qcom-distro/qcs9100-ride-sx/boot.yaml +++ /dev/null @@ -1,65 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/{{DEVICE_TYPE}}/qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs9100" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - password_prompt: 'Password' - password: oelinux123 - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/qcom-distro/rb1-core-kit/boot.yaml b/ci/lava/qcom-distro/rb1-core-kit/boot.yaml deleted file mode 100644 index 469962191..000000000 --- a/ci/lava/qcom-distro/rb1-core-kit/boot.yaml +++ /dev/null @@ -1,65 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/{{DEVICE_TYPE}}/qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qrb2210-rb1" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - password_prompt: 'Password' - password: oelinux123 - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public diff --git a/ci/lava/qcom-distro/rb3gen2-core-kit/boot.yaml b/ci/lava/qcom-distro/rb3gen2-core-kit/boot.yaml deleted file mode 100644 index 022b17c6a..000000000 --- a/ci/lava/qcom-distro/rb3gen2-core-kit/boot.yaml +++ /dev/null @@ -1,65 +0,0 @@ -actions: -- deploy: - images: - image: - headers: - Authentication: Q_GITHUB_TOKEN - url: "{{BUILD_DOWNLOAD_URL}}/qcom-distro/{{DEVICE_TYPE}}/qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz" - postprocess: - docker: - image: ghcr.io/foundriesio/lava-lmp-sign:main - steps: - - export IMAGE_PATH=$PWD - - cp overlay*.tar.gz overlay.tar.gz - - echo "OVERLAY=overlay.tar.gz" >> $IMAGE_PATH/flash.settings - - echo "OVERLAY_PATH=/home/" >> $IMAGE_PATH/flash.settings - - echo "DEVICE_TYPE=qcs6490-rb3gen2" >> $IMAGE_PATH/flash.settings - - cat $IMAGE_PATH/flash.settings - timeout: - minutes: 10 - to: downloads -- deploy: - images: - image: - url: downloads://qcom-multimedia-image-{{DEVICE_TYPE}}.rootfs.qcomflash.tar.gz - settings: - url: downloads://flash.settings - overlay: - url: downloads://overlay.tar.gz - timeout: - minutes: 5 - to: flasher -- boot: - auto_login: - login_prompt: 'login:' - username: root - password_prompt: 'Password' - password: oelinux123 - method: minimal - prompts: - - root@{{DEVICE_TYPE}} - timeout: - minutes: 3 -- test: - definitions: - - from: git - name: "{{DEVICE_TYPE}}-smoke-test" - path: automated/linux/smoke/smoke.yaml - repository: https://github.com/linaro/test-definitions.git - parameters: - SKIP_INSTALL: "True" - TESTS: "pwd, uname -a, ip a, dmesg" -- command: - name: network_turn_on -context: - lava_test_results_dir: /home/lava-%s - test_character_delay: 10 -device_type: {{DEVICE_TYPE}} -job_name: boot test ({{DEVICE_TYPE}}) {{GITHUB_RUN_ID}} -metadata: - build-commit: '{{GITHUB_SHA}}' -priority: 50 -timeouts: - job: - minutes: 20 -visibility: public From 07d3b9284ba436415916a4c0e6eb39805e8790f4 Mon Sep 17 00:00:00 2001 From: Milosz Wasilewski Date: Thu, 11 Dec 2025 10:59:58 +0000 Subject: [PATCH 2/4] workflows: add pre-merge test plan for meta-qcom Pre-merge test plan is generated from lava-test-plans repository. Modified test.yml workflow will run tests in 2 stages: - boot test: performs basic boot test on supported platforms - pre-merge test: runs a set of basic functional tests on supported platforms. This way the load on the testing LAB is minimized should the boot test fail. Additional pre-merge tests can be added in lava-test-plans directly without changing the workflow Signed-off-by: Milosz Wasilewski --- .github/actions/lava-test-plans/action.yml | 40 +++-- .github/actions/list-jobs/action.yml | 54 +++++++ .github/workflows/test.yml | 179 +++++++++++++++++---- 3 files changed, 227 insertions(+), 46 deletions(-) create mode 100644 .github/actions/list-jobs/action.yml diff --git a/.github/actions/lava-test-plans/action.yml b/.github/actions/lava-test-plans/action.yml index ce7f8341c..bddcbd25a 100644 --- a/.github/actions/lava-test-plans/action.yml +++ b/.github/actions/lava-test-plans/action.yml @@ -5,13 +5,18 @@ inputs: distro_name: required: true build_id: + description: "ID of the workflow from which build URL will be downloaded" required: true gh_token: + description: "Github token. It's required to download artifacts from the workflow" required: true -outputs: - url: - description: Location of the published binaries - value: ${{ steps.upload_artifacts.outputs.url }} + prefix: + description: "Prefix for the compressed file that is uploaded as workflow artifact" + default: testjobs + testplan: + description: "Name of the test plan to use in job generation" + default: boot + runs: using: "composite" steps: @@ -19,7 +24,7 @@ runs: with: repository: qualcomm-linux/lava-test-plans path: lava-test-plans - ref: 35c697c2779bcb98c77b2f7b4a9b1962e18c83e3 + ref: cdb8221de2a8f78533ef6b812fc4f5a2461c5525 - name: 'Download build URLs' uses: actions/download-artifact@v6 @@ -33,16 +38,18 @@ runs: run: | cd lava-test-plans && pip install . lava-test-plans --help - #echo "PROJECT_NAME=${GITHUB_REPOSITORY#*/}" >> variables.ini - #echo "PROJECT=projects/${GITHUB_REPOSITORY#*/}/" >> variables.ini - echo "PROJECT_NAME=meta-qcom" >> gh-variables.ini - echo "PROJECT=projects/meta-qcom/" >> gh-variables.ini + echo "PROJECT_NAME=${GITHUB_REPOSITORY#*/}" >> gh-variables.ini + echo "PROJECT=projects/${GITHUB_REPOSITORY#*/}/" >> gh-variables.ini + #echo "PROJECT_NAME=meta-qcom" >> gh-variables.ini + #echo "PROJECT=projects/meta-qcom/" >> gh-variables.ini echo "LAVA_JOB_PRIORITY=50" >> gh-variables.ini echo "OS_INFO=qcom-distro" >> gh-variables.ini echo "BUILD_NUMBER=${{ github.run_id }}-${{ github.run_attempt }}" >> gh-variables.ini echo "DOCKER_IMAGE_POSTPROCESS=ghcr.io/foundriesio/lava-lmp-sign:main" >> gh-variables.ini echo "AUTH_HEADER_NAME=Authentication" >> gh-variables.ini echo "AUTH_HEADER_TOKEN=Q_GITHUB_TOKEN" >> gh-variables.ini + echo "TEST_DEFINITIONS_REPOSITORY=https://github.com/qualcomm-linux/qcom-linux-testkit/" >> gh-variables.ini + echo "FLASHER_DEVICE_TYPE=qcs" >> gh-variables.ini IMAGE_TYPE="core-image-base" if [ "${{ inputs.distro_name }}" = "qcom-distro" ]; then IMAGE_TYPE="qcom-multimedia-image" @@ -63,7 +70,6 @@ runs: fi echo "BUILD_DOWNLOAD_URL=${BUILD_URL}/" >> gh-variables.ini - #echo "ROOTFS_URL=https://quic-yocto-fileserver-1029608027416.us-central1.run.app/${GITHUB_REPOSITORY}/${{ github.run_id }}-${{ github.run_attempt }}/${{ inputs.distro_name }}/${{ inputs.machine }}/${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> gh-variables.ini echo "ROOTFS_URL=${BUILD_URL}/${{ inputs.distro_name }}/${{ inputs.machine }}/${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> gh-variables.ini if [ "${{ inputs.machine }}" = "qcom-armv8a" ]; then @@ -72,19 +78,21 @@ runs: echo "DEVICE_TYPE=dragonboard-410c" >> dragonboard-410c.ini echo "BOOT_IMG_FILE=boot-apq8016-sbc-qcom-armv8a.img" >> dragonboard-410c.ini cat dragonboard-410c.ini - lava-test-plans --dry-run --variables dragonboard-410c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}" --device-type "dragonboard-410c" --dry-run-path ../dragonboard-410c-${{ inputs.distro_name }} || true + #lava-test-plans --dry-run --variables dragonboard-410c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-410c" --dry-run-path ../dragonboard-410c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true + lava-test-plans --dry-run --variables dragonboard-410c.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-410c" --dry-run-path ../dragonboard-410c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true cp gh-variables.ini dragonboard-820c.ini echo "BOOT_IMG_FILE=boot-apq8096-db820c-qcom-armv8a.img" >> dragonboard-820c.ini echo "DEVICE_TYPE=dragonboard-820c" >> dragonboard-820c.ini cat dragonboard-820c.ini - lava-test-plans --dry-run --variables dragonboard-820c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}" --device-type "dragonboard-820c" --dry-run-path ../dragonboard-820c-${{ inputs.distro_name }} || true + #lava-test-plans --dry-run --variables dragonboard-820c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-820c" --dry-run-path ../dragonboard-820c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true + lava-test-plans --dry-run --variables dragonboard-820c.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-820c" --dry-run-path ../dragonboard-820c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true echo "MACHINE=dragonboard" >> $GITHUB_ENV else echo "DEVICE_TYPE=${{ inputs.machine }}" >> gh-variables.ini cat gh-variables.ini - #lava-test-plans --dry-run --variables gh-variables.ini --test-plan "${GITHUB_REPOSITORY#*/}" --device-type "${{ inputs.machine }}" --verbose 10 - lava-test-plans --dry-run --variables gh-variables.ini --test-plan "meta-qcom/${{ inputs.distro_name }}" --device-type "${{ inputs.machine }}" --dry-run-path ../${{ inputs.machine }}-${{ inputs.distro_name }} || true + #lava-test-plans --dry-run --variables gh-variables.ini --test-plan "meta-qcom/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "${{ inputs.machine }}" --dry-run-path ../${{ inputs.machine }}-${{ inputs.distro_name }}-${{ inputs.testplan }} || true + lava-test-plans --dry-run --variables gh-variables.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "${{ inputs.machine }}" --dry-run-path ../${{ inputs.machine }}-${{ inputs.distro_name }}-${{ inputs.testplan }} || true echo "MACHINE=${{ inputs.machine }}" >> $GITHUB_ENV fi @@ -97,6 +105,6 @@ runs: - name: 'Upload test jobs' uses: actions/upload-artifact@v4 with: - name: testjobs-${{ inputs.machine }}-${{ inputs.distro_name }} - path: ${{ env.MACHINE}}*-${{ inputs.distro_name }} + name: ${{ inputs.prefix }}-${{ inputs.machine }}-${{ inputs.distro_name }} + path: ${{ env.MACHINE}}*-${{ inputs.distro_name }}* diff --git a/.github/actions/list-jobs/action.yml b/.github/actions/list-jobs/action.yml new file mode 100644 index 000000000..43d4d07da --- /dev/null +++ b/.github/actions/list-jobs/action.yml @@ -0,0 +1,54 @@ +name: List LAVA test jobs for subsequent steps +inputs: + prefix: + description: Test job name prefix. Will be used for searching .yaml files + required: true + build_id: + description: "ID of the workflow from which build URL will be downloaded" + required: true + gh_token: + description: "Github token. It's required to download artifacts from the workflow" + required: true + +outputs: + jobmatrix: + description: Job matrix composed from downloaded LAVA test job files + value: ${{ steps.listjobs.outputs.jobmatrix }} +runs: + using: "composite" + steps: + - name: 'Download build URLs' + uses: actions/download-artifact@v6 + with: + github-token: ${{ inputs.gh_token }} + run-id: ${{ inputs.build_id }} + pattern: ${{ inputs.prefix }}* + + - name: "List files" + shell: bash + run: | + echo $GITHUB_WORKSPACE + ls -R $GITHUB_WORKSPACE + + - name: "List jobs" + id: listjobs + shell: bash + run: | + JOBFILES=$(find . -name "*.yaml" | grep "${{ inputs.prefix }}") + RESULT_JSON=$(jq -n '{target: []}') + for J in $JOBFILES + do + echo $J + NAME=$(echo "$J" | cut --delimiter "/" --field 3) + echo $NAME + F_TMP="${J#*/}" + RESULT_NAME="${F_TMP//\//-}" + echo $RESULT_NAME + RESULT_JSON=$(echo "$RESULT_JSON" | jq -c --arg path "${J}" --arg result_file "${RESULT_NAME}" --arg name "${NAME}" '.target += [$ARGS.named]') + echo "$RESULT_JSON" + done + echo "$RESULT_JSON" + + echo "jobmatrix=$RESULT_JSON" >> $GITHUB_OUTPUT + echo "Preparing testjob files" + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e38cfbe3..bc3ec575f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: type: string jobs: - prepare-jobs: + prepare-boot-jobs: runs-on: ubuntu-latest strategy: matrix: @@ -31,76 +31,195 @@ jobs: with: fetch-depth: 0 - - name: 'Download build URLs' + - name: Run lava-test-plans + uses: ./.github/actions/lava-test-plans + with: + machine: ${{ matrix.machine }} + distro_name: ${{ matrix.distro.name }} + build_id: ${{ inputs.build_id }} + gh_token: ${{ secrets.GITHUB_TOKEN }} + prefix: boottest + + prepare-boot-job-list: + needs: prepare-boot-jobs + runs-on: ubuntu-latest + outputs: + jobmatrix: ${{ steps.listjobs.outputs.jobmatrix }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 'Download job templates' uses: actions/download-artifact@v6 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - run-id: ${{ inputs.build_id }} - pattern: build-url* + pattern: boottest-* + + - name: "List jobs" + id: listjobs + uses: ./.github/actions/list-jobs + with: + prefix: "boottest" + build_id: ${{ inputs.build_id }} + gh_token: ${{ secrets.GITHUB_TOKEN }} + + submit-boot-job: + needs: prepare-boot-job-list + runs-on: ubuntu-latest + continue-on-error: true + name: Boot ${{ matrix.target.name }} + strategy: + matrix: ${{ fromJson(needs.prepare-boot-job-list.outputs.jobmatrix) }} + steps: + - name: 'Download job templates' + uses: actions/download-artifact@v6 + with: + pattern: boottest-* + + - name: Submit ${{ matrix.target.name }} + timeout-minutes: 20 + id: submit + uses: foundriesio/lava-action@v9 + with: + lava_token: ${{ secrets.LAVATOKEN }} + lava_url: 'lava.infra.foundries.io' + job_definition: ${{ matrix.target.path }} + wait_for_job: true + fail_action_on_failure: true + fail_action_on_incomplete: true + save_result_as_artifact: true + save_job_details: true + result_file_name: "${{ matrix.target.result_file }}" + - uses: mwasilew/github-action-matrix-outputs-write@v2 + if: always() + id: out + with: + matrix-step-name: ${{ github.job }} + matrix-key: ${{ matrix.target.name }} + artifact-name: ${{ matrix.target.name }} + outputs: |- + result: ${{ steps.submit.outcome }} + + + boot-job-result: + runs-on: ubuntu-latest + needs: [submit-boot-job] + outputs: + boot_result: "${{ steps.print-boot-result.outputs.boot_result }}" + steps: + - uses: cloudposse/github-action-matrix-outputs-read@v1 + id: read + with: + matrix-step-name: "submit-boot-job" + - id: print-boot-result + name: "Print boot result" + run: | + # collapse results of matrix of boot test jobs to a single result + echo '${{ steps.read.outputs.result }}' | yq + BOOT_RESULT=$(echo '${{ steps.read.outputs.result }}' | yq '.[] | first (. != "success")') + if [ -z "$BOOT_RESULT" ]; then + BOOT_RESULT="success" + fi + echo "boot_result=$BOOT_RESULT" + echo "boot_result=$BOOT_RESULT" >> "$GITHUB_OUTPUT" + + prepare-premerge-jobs: + needs: boot-job-result + # run only if boot jobs are successful + if: ${{ needs.boot-job-result.outputs.boot_result == 'success' }} + runs-on: ubuntu-latest + strategy: + matrix: + # only run pre-merge tests on devices available in the LAB + # and "contemporary" - exclude dragonboards + machine: + - iq-9075-evk + - qcs615-ride + - rb3gen2-core-kit + - qcs8300-ride-sx + - qcs9100-ride-sx + - rb1-core-kit + distro: + - name: poky-altcfg + - name: qcom-distro + steps: + - id: print-condition + name: "Print condition" + env: + RESULT: ${{ needs.boot-job-result.outputs.boot_result }} + run: | + echo "${RESULT}" + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Run lava-test-plans uses: ./.github/actions/lava-test-plans with: machine: ${{ matrix.machine }} distro_name: ${{ matrix.distro.name }} - build_id: ${{ github.run_id }} + build_id: ${{ inputs.build_id }} gh_token: ${{ secrets.GITHUB_TOKEN }} + prefix: premerge + testplan: pre-merge - prepare-job-list: - needs: prepare-jobs + prepare-premerge-job-list: + needs: prepare-premerge-jobs runs-on: ubuntu-latest outputs: jobmatrix: ${{ steps.listjobs.outputs.jobmatrix }} steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: 'Download job templates' uses: actions/download-artifact@v6 with: - pattern: testjobs-* + pattern: premerge-* - name: "List jobs" id: listjobs - run: | - JOBFILES=$(find . -name *.yaml) - JOBFILES=$(echo "$JOBFILES" | sed -e "s/^/\"/" | sed -e "s/$/\",/" | tr -d "\n" | sed -e "s/.$//") - JOBFILES="[${JOBFILES}]" - J=$(jq -cn --argjson jobfiles "$JOBFILES" '{target: $jobfiles}') - echo "jobmatrix=$J" >> $GITHUB_OUTPUT - echo "Preparing testjob files" - - submit-job: - needs: prepare-job-list + uses: ./.github/actions/list-jobs + with: + prefix: "premerge" + build_id: ${{ inputs.build_id }} + gh_token: ${{ secrets.GITHUB_TOKEN }} + + submit-premerge-job: + needs: prepare-premerge-job-list runs-on: ubuntu-latest continue-on-error: true + name: Pre-merge ${{ matrix.target.name }} strategy: - matrix: ${{ fromJson(needs.prepare-job-list.outputs.jobmatrix) }} + matrix: ${{ fromJson(needs.prepare-premerge-job-list.outputs.jobmatrix) }} steps: - name: 'Download job templates' uses: actions/download-artifact@v6 with: - pattern: testjobs-* - - - name: 'Prepare output file name' - run: | - OUTPUT_NAME=$(echo "${{ matrix.target }}" | sed "s|\/|-|g") - echo "RESULT_NAME=${OUTPUT_NAME#??}" >> $GITHUB_ENV + pattern: premerge-* - - name: Submit ${{ matrix.target }} + - name: Submit ${{ matrix.target.name }} timeout-minutes: 20 uses: foundriesio/lava-action@v9 with: lava_token: ${{ secrets.LAVATOKEN }} lava_url: 'lava.infra.foundries.io' - job_definition: ${{ matrix.target }} + job_definition: ${{ matrix.target.path }} wait_for_job: true fail_action_on_failure: true fail_action_on_incomplete: true save_result_as_artifact: true save_job_details: true - result_file_name: "${{ env.RESULT_NAME }}" + result_file_name: "${{ matrix.target.result_file }}" publish-test-summary: name: "Publish Tests Summary" - needs: submit-job + needs: [submit-premerge-job, submit-boot-job] + if: | + always() + && contains(needs.*.result, 'success') + && !contains(needs.*.result, 'failure') runs-on: ubuntu-latest permissions: checks: write From 3962ae9b186d95f441c281be6c522ab4180b62c9 Mon Sep 17 00:00:00 2001 From: Milosz Wasilewski Date: Mon, 22 Dec 2025 10:34:31 +0000 Subject: [PATCH 3/4] workflows: lava-test-plans: Save files to separate dirs When generating temporary files in the action, save the files to separate directories. This avoids confusing the existing files with files generated during the action Signed-off-by: Milosz Wasilewski --- .github/actions/lava-test-plans/action.yml | 59 +++++++++++----------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/.github/actions/lava-test-plans/action.yml b/.github/actions/lava-test-plans/action.yml index bddcbd25a..a2f3aba5c 100644 --- a/.github/actions/lava-test-plans/action.yml +++ b/.github/actions/lava-test-plans/action.yml @@ -36,27 +36,31 @@ runs: - name: Run lava-test-plans shell: bash run: | + set -euo pipefail cd lava-test-plans && pip install . - lava-test-plans --help - echo "PROJECT_NAME=${GITHUB_REPOSITORY#*/}" >> gh-variables.ini - echo "PROJECT=projects/${GITHUB_REPOSITORY#*/}/" >> gh-variables.ini - #echo "PROJECT_NAME=meta-qcom" >> gh-variables.ini - #echo "PROJECT=projects/meta-qcom/" >> gh-variables.ini - echo "LAVA_JOB_PRIORITY=50" >> gh-variables.ini - echo "OS_INFO=qcom-distro" >> gh-variables.ini - echo "BUILD_NUMBER=${{ github.run_id }}-${{ github.run_attempt }}" >> gh-variables.ini - echo "DOCKER_IMAGE_POSTPROCESS=ghcr.io/foundriesio/lava-lmp-sign:main" >> gh-variables.ini - echo "AUTH_HEADER_NAME=Authentication" >> gh-variables.ini - echo "AUTH_HEADER_TOKEN=Q_GITHUB_TOKEN" >> gh-variables.ini - echo "TEST_DEFINITIONS_REPOSITORY=https://github.com/qualcomm-linux/qcom-linux-testkit/" >> gh-variables.ini - echo "FLASHER_DEVICE_TYPE=qcs" >> gh-variables.ini + lava-test-plans --version + OUT_PATH="${GITHUB_WORKSPACE}/out" + VARS_OUT_PATH="${OUT_PATH}/vars" + JOBS_OUT_PATH="${OUT_PATH}/jobs" + mkdir -p "${VARS_OUT_PATH}" + mkdir -p "${JOBS_OUT_PATH}" + echo "PROJECT_NAME=${GITHUB_REPOSITORY#*/}" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "PROJECT=projects/${GITHUB_REPOSITORY#*/}/" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "LAVA_JOB_PRIORITY=50" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "OS_INFO=qcom-distro" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "BUILD_NUMBER=${{ github.run_id }}-${{ github.run_attempt }}" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "DOCKER_IMAGE_POSTPROCESS=ghcr.io/foundriesio/lava-lmp-sign:main" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "AUTH_HEADER_NAME=Authentication" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "AUTH_HEADER_TOKEN=Q_GITHUB_TOKEN" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "TEST_DEFINITIONS_REPOSITORY=https://github.com/qualcomm-linux/qcom-linux-testkit/" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "FLASHER_DEVICE_TYPE=qcs" >> "${VARS_OUT_PATH}/gh-variables.ini" IMAGE_TYPE="core-image-base" if [ "${{ inputs.distro_name }}" = "qcom-distro" ]; then IMAGE_TYPE="qcom-multimedia-image" - echo "AUTO_LOGIN_PASSWORD_PROMPT=Password" >> gh-variables.ini - echo "AUTO_LOGIN_PASSWORD=oelinux123" >> gh-variables.ini + echo "AUTO_LOGIN_PASSWORD_PROMPT=Password" >> "${VARS_OUT_PATH}/gh-variables.ini" + echo "AUTO_LOGIN_PASSWORD=oelinux123" >> "${VARS_OUT_PATH}/gh-variables.ini" fi - echo "IMAGE_FILE_NAME=${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> gh-variables.ini + echo "IMAGE_FILE_NAME=${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> "${VARS_OUT_PATH}/gh-variables.ini" export BUILD_URL="" export BUILD_URL_FILE="$GITHUB_WORKSPACE/build-url_${{ inputs.machine }}_${{ inputs.distro_name }}/build-url_${{ inputs.machine }}_${{ inputs.distro_name }}" echo "${BUILD_URL_FILE}" @@ -68,31 +72,28 @@ runs: # fail action if BUILD_URL is empty. At this point the variable should be filled in exit 1 fi - echo "BUILD_DOWNLOAD_URL=${BUILD_URL}/" >> gh-variables.ini + echo "BUILD_DOWNLOAD_URL=${BUILD_URL}/" >> "${VARS_OUT_PATH}/gh-variables.ini" - echo "ROOTFS_URL=${BUILD_URL}/${{ inputs.distro_name }}/${{ inputs.machine }}/${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> gh-variables.ini + echo "ROOTFS_URL=${BUILD_URL}/${{ inputs.distro_name }}/${{ inputs.machine }}/${IMAGE_TYPE}-${{ inputs.machine }}.rootfs.qcomflash.tar.gz" >> "${VARS_OUT_PATH}/gh-variables.ini" if [ "${{ inputs.machine }}" = "qcom-armv8a" ]; then - echo "ROOTFS_IMG_FILE=core-image-base-qcom-armv8a.rootfs.ext4" >> gh-variables.ini - cp gh-variables.ini dragonboard-410c.ini + echo "ROOTFS_IMG_FILE=core-image-base-qcom-armv8a.rootfs.ext4" >> "${VARS_OUT_PATH}/gh-variables.ini" + cp "${VARS_OUT_PATH}/gh-variables.ini" dragonboard-410c.ini echo "DEVICE_TYPE=dragonboard-410c" >> dragonboard-410c.ini echo "BOOT_IMG_FILE=boot-apq8016-sbc-qcom-armv8a.img" >> dragonboard-410c.ini cat dragonboard-410c.ini - #lava-test-plans --dry-run --variables dragonboard-410c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-410c" --dry-run-path ../dragonboard-410c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true - lava-test-plans --dry-run --variables dragonboard-410c.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-410c" --dry-run-path ../dragonboard-410c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true - cp gh-variables.ini dragonboard-820c.ini + lava-test-plans --dry-run --variables dragonboard-410c.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-410c" --dry-run-path "${JOBS_OUT_PATH}/dragonboard-410c-${{ inputs.distro_name }}-${{ inputs.testplan }}" || true + cp "${VARS_OUT_PATH}/gh-variables.ini" dragonboard-820c.ini echo "BOOT_IMG_FILE=boot-apq8096-db820c-qcom-armv8a.img" >> dragonboard-820c.ini echo "DEVICE_TYPE=dragonboard-820c" >> dragonboard-820c.ini cat dragonboard-820c.ini - #lava-test-plans --dry-run --variables dragonboard-820c.ini --test-plan "meta-qcom/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-820c" --dry-run-path ../dragonboard-820c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true - lava-test-plans --dry-run --variables dragonboard-820c.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-820c" --dry-run-path ../dragonboard-820c-${{ inputs.distro_name }}-${{ inputs.testplan }} || true + lava-test-plans --dry-run --variables dragonboard-820c.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "dragonboard-820c" --dry-run-path "${JOBS_OUT_PATH}/dragonboard-820c-${{ inputs.distro_name }}-${{ inputs.testplan }}" || true echo "MACHINE=dragonboard" >> $GITHUB_ENV else - echo "DEVICE_TYPE=${{ inputs.machine }}" >> gh-variables.ini + echo "DEVICE_TYPE=${{ inputs.machine }}" >> "${VARS_OUT_PATH}/gh-variables.ini" - cat gh-variables.ini - #lava-test-plans --dry-run --variables gh-variables.ini --test-plan "meta-qcom/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "${{ inputs.machine }}" --dry-run-path ../${{ inputs.machine }}-${{ inputs.distro_name }}-${{ inputs.testplan }} || true - lava-test-plans --dry-run --variables gh-variables.ini --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "${{ inputs.machine }}" --dry-run-path ../${{ inputs.machine }}-${{ inputs.distro_name }}-${{ inputs.testplan }} || true + cat "${VARS_OUT_PATH}/gh-variables.ini" + lava-test-plans --dry-run --variables "${VARS_OUT_PATH}/gh-variables.ini" --test-plan "${GITHUB_REPOSITORY#*/}/${{ inputs.distro_name }}/${{ inputs.testplan }}" --device-type "${{ inputs.machine }}" --dry-run-path "${JOBS_OUT_PATH}/${{ inputs.machine }}-${{ inputs.distro_name }}-${{ inputs.testplan }}" || true echo "MACHINE=${{ inputs.machine }}" >> $GITHUB_ENV fi From b733e303a1436800ea9bef0669ef6e474af1e41b Mon Sep 17 00:00:00 2001 From: Milosz Wasilewski Date: Mon, 22 Dec 2025 12:58:29 +0000 Subject: [PATCH 4/4] workflows: Pin python version in lava-test-plans Set python version to 3.11 in lava-test-plans action to avoid issues with unexpected upgrades. Signed-off-by: Milosz Wasilewski --- .github/actions/lava-test-plans/action.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/actions/lava-test-plans/action.yml b/.github/actions/lava-test-plans/action.yml index a2f3aba5c..16d31a43b 100644 --- a/.github/actions/lava-test-plans/action.yml +++ b/.github/actions/lava-test-plans/action.yml @@ -26,6 +26,10 @@ runs: path: lava-test-plans ref: cdb8221de2a8f78533ef6b812fc4f5a2461c5525 + - uses: actions/setup-python@v6 + with: + python-version: 3.11 + - name: 'Download build URLs' uses: actions/download-artifact@v6 with: @@ -42,6 +46,7 @@ runs: OUT_PATH="${GITHUB_WORKSPACE}/out" VARS_OUT_PATH="${OUT_PATH}/vars" JOBS_OUT_PATH="${OUT_PATH}/jobs" + echo "JOBS_OUT_PATH=${JOBS_OUT_PATH}" >> $GITHUB_ENV mkdir -p "${VARS_OUT_PATH}" mkdir -p "${JOBS_OUT_PATH}" echo "PROJECT_NAME=${GITHUB_REPOSITORY#*/}" >> "${VARS_OUT_PATH}/gh-variables.ini" @@ -100,12 +105,12 @@ runs: - name: "List files" shell: bash run: | - echo $GITHUB_WORKSPACE - ls -R $GITHUB_WORKSPACE + echo "${GITHUB_WORKSPACE}" + ls -R "${GITHUB_WORKSPACE}" - name: 'Upload test jobs' uses: actions/upload-artifact@v4 with: name: ${{ inputs.prefix }}-${{ inputs.machine }}-${{ inputs.distro_name }} - path: ${{ env.MACHINE}}*-${{ inputs.distro_name }}* + path: ${{ env.JOBS_OUT_PATH }}/**