Skip to content
Open
Changes from all commits
Commits
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
59 changes: 57 additions & 2 deletions .github/workflows/qcom-build-pkg-reusable-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,25 @@ on:
type: boolean
default: false

srcpkg-artifact:
description: |
Name of a GitHub Actions artifact containing a pre-prepared source tree
to use as srcpkg/. When set, the debian-ref checkout is skipped and the
artifact is downloaded instead. Used for packages like pkg-linux-qcom
where the source tree is assembled at CI time rather than managed in a
single git repository.
type: string
default: ""

assemble-orig:
description: |
When true, generate-source-package creates the .orig.tar.gz directly
from the source tree and invokes dpkg-buildpackage -S, bypassing gbp.
Use for packages whose source tree is assembled at CI time with no
upstream tarball available via gbp or pristine-tar.
type: boolean
default: false

secrets:
DEBUSINE_USER:
required: false
Expand Down Expand Up @@ -95,7 +114,8 @@ permissions:
packages: read

env:
DEBUSINE_ACTION_REF: main
# TODO: update to main once feat/generate-source-package-non-gbp-quilt is merged.
DEBUSINE_ACTION_REF: feat/generate-source-package-non-gbp-quilt

jobs:
resolve:
Expand Down Expand Up @@ -252,13 +272,33 @@ jobs:
lib

- name: Checkout Repository
if: ${{ inputs.srcpkg-artifact == '' }}
uses: actions/checkout@v5
with:
ref: ${{ inputs.debian-ref }}
path: srcpkg
fetch-depth: 0
fetch-tags: true

- name: Download pre-prepared source tree
if: ${{ inputs.srcpkg-artifact != '' }}
uses: actions/download-artifact@v8
with:
name: ${{ inputs.srcpkg-artifact }}
path: /tmp/srcpkg-artifact

- name: Extract pre-prepared source tree
if: ${{ inputs.srcpkg-artifact != '' }}
run: |
# The artifact is a tar.gz archive created by the caller to preserve
# Unix execute permissions on kernel build scripts. zip format (used
# by actions/upload-artifact) strips execute bits; tar does not.
# --strip-components=1 extracts the top-level directory directly into
# srcpkg/ without depending on its name inside the archive.
mkdir srcpkg
tar xzf /tmp/srcpkg-artifact/kernel-srcpkg.tar.gz \
-C srcpkg --strip-components=1

- name: Prepare release
if: ${{ inputs.release }}
env:
Expand All @@ -273,6 +313,7 @@ jobs:
id: generate-source-package
env:
SUITE_INPUT: ${{ needs.resolve.outputs.target_suite }}
DEBUSINE_ASSEMBLE_ORIG: ${{ inputs.assemble-orig }}
run: |
set -ex
SUITE="$SUITE_INPUT" debusine-action/lib/generate-source-package
Expand Down Expand Up @@ -354,13 +395,27 @@ jobs:
lib

- name: Checkout Repository
if: ${{ needs.resolve.outputs.family == 'debian' && needs.resolve.outputs.force_docker_build != 'true' }}
if: ${{ needs.resolve.outputs.family == 'debian' && needs.resolve.outputs.force_docker_build != 'true' && inputs.srcpkg-artifact == '' }}
uses: actions/checkout@v5
with:
ref: ${{ inputs.debian-ref }}
path: srcpkg
fetch-depth: 1

- name: Download pre-prepared source tree
if: ${{ needs.resolve.outputs.family == 'debian' && inputs.srcpkg-artifact != '' }}
uses: actions/download-artifact@v8
with:
name: ${{ inputs.srcpkg-artifact }}
path: /tmp/srcpkg-artifact

- name: Extract pre-prepared source tree
if: ${{ needs.resolve.outputs.family == 'debian' && inputs.srcpkg-artifact != '' }}
run: |
mkdir srcpkg
tar xzf /tmp/srcpkg-artifact/kernel-srcpkg.tar.gz \
-C srcpkg --strip-components=1

- name: Validate installability from Debusine CI workspace
if: ${{ needs.resolve.outputs.family == 'debian' && needs.resolve.outputs.force_docker_build != 'true' }}
env:
Expand Down
Loading