Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
684294d
updated the cron and loading logic.
Manigurr Jan 19, 2026
0df268a
updated the sync and build logic
Manigurr Jan 19, 2026
f6c6a07
updated loading action
Manigurr Jan 19, 2026
a431a70
Update loading.yml
Manigurr Jan 19, 2026
2f30a5b
fix
Manigurr Jan 19, 2026
7bcd957
updated the loading logic and cron logic
Manigurr Jan 19, 2026
cf85c26
updated
Manigurr Jan 19, 2026
be63d96
updated typo issue
Manigurr Jan 19, 2026
e26fe35
updated post merge logic
Manigurr Jan 19, 2026
015a77a
updated postmerge logic
Manigurr Jan 20, 2026
e71740d
updated loading logic for the cron job
Manigurr Jan 20, 2026
2a3da4e
made changes in the loading action.yaml
Manigurr Jan 20, 2026
7c137ce
loading action has updated
Manigurr Jan 20, 2026
8061b23
workflow action.yaml update
Manigurr Jan 20, 2026
c6bad3d
updated the loading.yml for the permission issues
Manigurr Jan 25, 2026
a6ffbe5
Update sync-and-build.yml for the permission issue in the post merge.yml
Manigurr Jan 25, 2026
fbc81f1
fix
Manigurr Jan 25, 2026
3a85f92
fix path
Manigurr Jan 25, 2026
0db4bf4
path fix
Manigurr Jan 26, 2026
7865220
fixed path for the permission
Manigurr Jan 26, 2026
8ffd9ca
reverted the path reference
Manigurr Jan 27, 2026
d7adc70
explicitly check into the driver code for the post merge
Manigurr Jan 27, 2026
38a3126
removed the target branch in the postmerge.yml
Manigurr Jan 28, 2026
b61295d
updated the clean logic
Manigurr Jan 28, 2026
6a50d1b
fix
Manigurr Jan 28, 2026
1d4af6f
updated the syntax
Manigurr Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ runs:
- name: Build kernel
shell: bash
run: |
# Running as root to avoid permission issues.
# Ownership will be fixed in the calling workflow.
docker run --rm \
-v "${{ inputs.workspace_path }}:${{ inputs.workspace_path }}" \
-w "${{ inputs.workspace_path }}/kernel" \
--user $(id -u):$(id -g) \
${{ inputs.docker_image }} \
bash -c "
make O=../kobj ARCH=arm64 defconfig &&
Expand All @@ -33,11 +34,9 @@ runs:
docker run --rm \
-v "${{ inputs.workspace_path }}:${{ inputs.workspace_path }}" \
-w "${{ inputs.workspace_path }}/video-driver" \
--user $(id -u):$(id -g) \
${{ inputs.docker_image }} \
bash -c "
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CC=aarch64-linux-gnu-gcc-13 \
-C ${{ inputs.workspace_path }}/kobj \
M=\$(pwd) VIDEO_KERNEL_ROOT=\$(pwd) modules
"

"
23 changes: 5 additions & 18 deletions .github/actions/lava_job_render/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,18 @@ runs:
const modulesTarUrl = findUrlByFilename('modules.tar.xz');
const imageUrl = findUrlByFilename('Image');
const mergedRamdiskUrl = findUrlByFilename('video-merged.cpio.gz');
const vmlinuxUrl = findUrlByFilename('vmlinux');

// DTB is expected to be "<MACHINE>.dtb"
const dtbFilename = `${process.env.MACHINE}.dtb`;
const dtbUrl = findUrlByFilename(dtbFilename);

core.setOutput('modules_url', modulesTarUrl || '');
core.setOutput('image_url', imageUrl || '');
core.setOutput('vmlinux_url', vmlinuxUrl || '');
core.setOutput('dtb_url', dtbUrl || '');
core.setOutput('merged_ramdisk_url', mergedRamdiskUrl || '');

console.log(`Modules URL: ${modulesTarUrl}`);
console.log(`Image URL: ${imageUrl}`);
console.log(`Vmlinux URL: ${vmlinuxUrl}`);
console.log(`Dtb URL: ${dtbUrl}`);
console.log(`Merged Ramdisk URL: ${mergedRamdiskUrl}`);

Expand All @@ -68,19 +65,18 @@ runs:

- name: Upload metadata.json
id: upload_metadata
uses: qualcomm-linux/video-driver/.github/actions/aws_s3_helper@video.qclinux.0.0
uses: qualcomm-linux-stg/video-driver/.github/actions/aws_s3_helper@workflow_2
with:
local_file: ../job_render/data/metadata.json
s3_bucket: qli-prd-video-gh-artifacts
s3_bucket: qli-stg-video-gh-artifacts
mode: single-upload

- name: Create template json (cloudData.json)
shell: bash
run: |
echo "Populating cloudData.json with kernel, vmlinux, modules, metadata, ramdisk"
echo "Populating cloudData.json with kernel, modules, metadata, ramdisk"
metadata_url="${{ steps.upload_metadata.outputs.presigned_url }}"
image_url="${{ steps.process_urls.outputs.image_url }}"
vmlinux_url="${{ steps.process_urls.outputs.vmlinux_url }}"
modules_url="${{ steps.process_urls.outputs.modules_url }}"
merged_ramdisk_url="${{ steps.process_urls.outputs.merged_ramdisk_url }}"

Expand All @@ -104,15 +100,6 @@ runs:
${{ inputs.docker_image }} \
jq '.artifacts.kernel = env.image_url' data/cloudData.json > temp.json && mv temp.json data/cloudData.json

# vmlinux (set only if present)
docker run -i --rm \
--user "$(id -u):$(id -g)" \
--workdir="$PWD" \
-v "$(dirname "$PWD")":"$(dirname "$PWD")" \
-e vmlinux_url="$vmlinux_url" \
${{ inputs.docker_image }} \
sh -c 'if [ -n "$vmlinux_url" ]; then jq ".artifacts.vmlinux = env.vmlinux_url" data/cloudData.json > temp.json && mv temp.json data/cloudData.json; fi'

# modules
docker run -i --rm \
--user "$(id -u):$(id -g)" \
Expand All @@ -138,7 +125,7 @@ runs:
# Fallback to stable kerneltest ramdisk only if merged ramdisk is not available
if [ -z "${{ steps.process_urls.outputs.merged_ramdisk_url }}" ]; then
echo "Merged ramdisk not found. Using stable kerneltest ramdisk fallback."
ramdisk_url="$(aws s3 presign s3://qli-prd-video-gh-artifacts/qualcomm-linux/video-driver/artifacts/initramfs/initramfs-kerneltest-full-image-qcom-armv8a.cpio.gz --expires 7600)"
ramdisk_url="$(aws s3 presign s3://qli-stg-video-gh-artifacts/qualcomm-linux-stg/video-driver/artifacts/initramfs/initramfs-kerneltest-full-image-qcom-armv8a.cpio.gz --expires 7600)"
docker run -i --rm \
--user "$(id -u):$(id -g)" \
--workdir="$PWD" \
Expand All @@ -152,7 +139,7 @@ runs:

# Optional board-specific firmware initramfs
if [ -n "${{ env.FIRMWARE }}" ]; then
firmware_url="$(aws s3 presign s3://qli-prd-video-gh-artifacts/qualcomm-linux/video-driver/artifacts/initramfs/initramfs-firmware-${{ env.FIRMWARE }}-image-qcom-armv8a.cpio.gz --expires 7600)"
firmware_url="$(aws s3 presign s3://qli-stg-video-gh-artifacts/qualcomm-linux-stg/video-driver/artifacts/initramfs/initramfs-firmware-${{ env.FIRMWARE }}-image-qcom-armv8a.cpio.gz --expires 7600)"
docker run -i --rm \
--user "$(id -u):$(id -g)" \
--workdir="$PWD" \
Expand Down
51 changes: 37 additions & 14 deletions .github/actions/loading/action.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
---
name: Load Parameters
description: Load parameters for the build job

outputs:
build_matrix:
description: Build matrix
value: ${{ steps.set-matrix.outputs.build_matrix }}

full_matrix:
description: full matrix containing lava devails
description: Full matrix containing lava details
value: ${{ steps.set-matrix.outputs.full_matrix }}

runs:
Expand All @@ -21,24 +19,49 @@ runs:
script: |
const fs = require('fs');
const path = require('path');
const targetsPath = path.join(process.env.GITHUB_WORKSPACE, 'video-driver', 'ci', 'MACHINES.json');

// 1. Define possible paths for MACHINES.json
// Path A: Workspace/video-driver/ci/MACHINES.json (Nested)
const pathNested = path.join(process.env.GITHUB_WORKSPACE, 'video-driver', 'ci', 'MACHINES.json');
// Path B: Workspace/ci/MACHINES.json (Root)
const pathRoot = path.join(process.env.GITHUB_WORKSPACE, 'ci', 'MACHINES.json');

let targetsPath = '';

// 2. Check which path exists
if (fs.existsSync(pathNested)) {
console.log(`Found config at nested path: ${pathNested}`);
targetsPath = pathNested;
} else if (fs.existsSync(pathRoot)) {
console.log(`Found config at root path: ${pathRoot}`);
targetsPath = pathRoot;
} else {
// 3. Debugging: If neither exists, list files to help us see what is happening
console.log('!!! Error: MACHINES.json not found in expected locations.');
console.log(`Checked: ${pathNested}`);
console.log(`Checked: ${pathRoot}`);

console.log('--- Workspace Root Contents ---');
try {
console.log(fs.readdirSync(process.env.GITHUB_WORKSPACE));
} catch (e) { console.log(e.message); }

core.setFailed(`MACHINES.json not found.`);
return;
}

// 4. Parse the file
let targets;
try {
if (!fs.existsSync(targetsPath)) {
core.setFailed(`MACHINES.json not found at ${targetsPath}`);
return;
}
targets = JSON.parse(fs.readFileSync(targetsPath, 'utf-8'));
} catch (err) {
core.setFailed(`Failed to load or parse MACHINES.json: ${err.message}`);
core.setFailed(`Failed to parse MACHINES.json: ${err.message}`);
return;
}
// Build matrix: machine, firmware

// 5. Generate Outputs
const build_matrix = Object.values(targets).map(({ machine, firmware }) => ({ machine, firmware }));
core.setOutput('build_matrix', JSON.stringify(build_matrix));
console.log("Build Matrix:", build_matrix);

// Full matrix: machine, firmware, lavaname
const full_matrix = Object.values(targets).map(({ machine, firmware, lavaname }) => ({ machine, firmware, lavaname }));
core.setOutput('full_matrix', JSON.stringify(full_matrix));
console.log("Full Matrix:", full_matrix);
core.setOutput('full_matrix', JSON.stringify(full_matrix));
28 changes: 23 additions & 5 deletions .github/workflows/loading.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
---
name: _loading
description: Load required parameters for the subsequent jobs

on:
workflow_call:
inputs:
target_branch:
description: "Branch to checkout (optional)"
required: false
type: string
default: ""
outputs:
build_matrix:
description: Build matrix
value: ${{ jobs.loading.outputs.build_matrix }}

full_matrix:
description: Full Matrix containing lava description
value: ${{ jobs.loading.outputs.full_matrix }}
Expand All @@ -20,14 +24,28 @@ jobs:
build_matrix: ${{ steps.loading.outputs.build_matrix }}
full_matrix: ${{ steps.loading.outputs.full_matrix }}
steps:
- name: Sync codebase
uses: qualcomm-linux/video-driver/.github/actions/sync@video.qclinux.0.0
# SCENARIO 1: Pull Request (Pre-Merge)
# Uses your custom sync action to merge PR code with base
- name: Sync codebase (PR)
if: github.event_name == 'pull_request'
uses: qualcomm-linux-stg/video-driver/.github/actions/sync@video.qclinux.0.0
with:
event_name: ${{ github.event_name }}
pr_ref: ${{ github.event.pull_request.head.ref }}
pr_repo: ${{ github.event.pull_request.head.repo.full_name }}
base_ref: ${{ github.ref_name }}

# SCENARIO 2: Schedule or Manual (Post-Merge)
# Uses standard checkout because there is no PR to sync
- name: Checkout Code (Schedule)
if: github.event_name != 'pull_request'
uses: actions/checkout@v4
with:
# Use the input branch if provided, otherwise default to current ref
ref: ${{ inputs.target_branch || github.ref_name }}
# Check out into 'video-driver' folder so the script finds the nested path
path: video-driver

- name: Load Parameters
id: loading
uses: qualcomm-linux/video-driver/.github/actions/loading@video.qclinux.0.0
uses: qualcomm-linux-stg/video-driver/.github/actions/loading@video.qclinux.0.0
15 changes: 6 additions & 9 deletions .github/workflows/post_merge.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
name: post_merge_weekly
description: |
Runs post-merge CI for the video-driver repository on a weekly schedule.
Reuses loading, build and test workflows.
name: Post Merge Weekly

on:
schedule:
# Every Monday and Thursday at 02:30 UTC (8:00 AM IST)
- cron: "30 2 * * 1,4"
- cron: '*/5 * * * *'
workflow_dispatch:

jobs:
loading:
uses: qualcomm-linux/video-driver/.github/workflows/loading.yml@video.qclinux.0.0
# We call the reusable workflow
uses: qualcomm-linux-stg/video-driver/.github/workflows/loading.yml@video.qclinux.0.0
secrets: inherit

build:
needs: loading
uses: qualcomm-linux/video-driver/.github/workflows/sync-and-build.yml@video.qclinux.0.0
uses: qualcomm-linux-stg/video-driver/.github/workflows/sync-and-build.yml@video.qclinux.0.0
secrets: inherit
with:
docker_image: kmake-image:ver.1.0
build_matrix: ${{ needs.loading.outputs.build_matrix }}

lava-test:
needs: [loading, build]
uses: qualcomm-linux/video-driver/.github/workflows/test.yml@video.qclinux.0.0
uses: qualcomm-linux-stg/video-driver/.github/workflows/test.yml@video.qclinux.0.0
secrets: inherit
with:
docker_image: kmake-image:ver.1.0
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/pre_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@ on:

jobs:
loading:
uses: qualcomm-linux/video-driver/.github/workflows/loading.yml@video.qclinux.0.0
uses: qualcomm-linux-stg/video-driver/.github/workflows/loading.yml@video.qclinux.0.0
secrets: inherit

build:
needs: loading
uses: qualcomm-linux/video-driver/.github/workflows/sync-and-build.yml@video.qclinux.0.0
uses: qualcomm-linux-stg/video-driver/.github/workflows/sync-and-build.yml@video.qclinux.0.0
secrets: inherit
with:
docker_image: kmake-image:ver.1.0
build_matrix: ${{ needs.loading.outputs.build_matrix }}

lava-test:
needs: [loading, build]
uses: qualcomm-linux/video-driver/.github/workflows/test.yml@video.qclinux.0.0
uses: qualcomm-linux-stg/video-driver/.github/workflows/test.yml@video.qclinux.0.0
secrets: inherit
with:
docker_image: kmake-image:ver.1.0
build_matrix: ${{ needs.loading.outputs.build_matrix }}

full_matrix: ${{ needs.loading.outputs.full_matrix }}
Loading
Loading