From e830fe0703dc45966df0bf66643c58ce0572c9f7 Mon Sep 17 00:00:00 2001 From: Vasiliy Doylov Date: Sat, 7 Jun 2025 18:35:59 +0300 Subject: [PATCH] CI: Update CI to use composite actions Signed-off-by: Vasiliy Doylov --- .forgejo/workflows/build-alpine.yaml | 32 +++++++++++++++++++++++----- misc/alpine/APKBUILD | 11 ++++------ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/.forgejo/workflows/build-alpine.yaml b/.forgejo/workflows/build-alpine.yaml index cccc46a5b..3ed85eb08 100644 --- a/.forgejo/workflows/build-alpine.yaml +++ b/.forgejo/workflows/build-alpine.yaml @@ -5,18 +5,26 @@ on: workflow_dispatch: jobs: - build: + prepare-aports: + name: Prepare pmaports runs-on: Pmbootstrap + steps: + - name: Remove libcamera aport + run: rm -rf ${{env.PMB_PMAPORTS}}/temp/libcamera + + build: + name: Build for ${{ matrix.info.arch }} + runs-on: Pmbootstrap + needs: prepare-aports strategy: matrix: info: - arch: x86_64 - arch: aarch64 - name: Build for ${{ matrix.info.arch }} steps: - name: Check out repository code uses: actions/checkout@v4 - - name: Build package + - name: Build packages id: build uses: actions/pmbootstrap-build@main with: @@ -24,5 +32,19 @@ jobs: aports: ${{github.workspace}}/misc/alpine arch: ${{ matrix.info.arch }} src: ${{github.workspace}} - - name: Print new packages - run: echo "${{steps.build.outputs.packages}}" + - name: "Upload packages" + uses: actions/upload-alpine-package@main + with: + files: ${{steps.build.outputs.packages}} + secret: ${{secrets.PACKAGE_TOKEN}} + + clean-aports: + name: Clean pmaports + runs-on: Pmbootstrap + if: always() + needs: + - prepare-aports + - build + steps: + - name: Reset pmaports changes + run: git -C ${{env.PMB_PMAPORTS}} reset --hard diff --git a/misc/alpine/APKBUILD b/misc/alpine/APKBUILD index fa9ea9b63..c2349ed9a 100644 --- a/misc/alpine/APKBUILD +++ b/misc/alpine/APKBUILD @@ -1,9 +1,6 @@ -# Forked from Alpine for temporary downstream patches - pkgname=libcamera -_pkgver=0.5.0 -pkgver=9999$_pkgver -pkgrel=1 +pkgver=0.5.0 +pkgrel=0 pkgdesc="Linux camera framework" url="https://libcamera.org/" arch="all" @@ -15,7 +12,7 @@ depends_dev=" gst-plugins-bad-dev qt6-qtbase-dev " -# upstream calls 'date' with a non-POSIX option so we pull in coreutils + makedepends="$depends_dev coreutils doxygen @@ -42,7 +39,7 @@ subpackages=" $pkgname-tools " source="" -builddir="$srcdir/$pkgname-v$_pkgver" +builddir="$srcdir/$pkgname" # gstreamer tests fail # manual strip because ipa .sign files depend on the file contents- have to re-sign after strip options="!strip !check"