CI: Add forgejo CI
Some checks failed
PostmarketOS build / build (push) Failing after 5s

Signed-off-by: Vasiliy Doylov <nekocwd@mainlining.org>
This commit is contained in:
Vasiliy Doylov 2025-06-07 02:22:30 +03:00
parent 17fb415a08
commit c7df1ab03a
Signed by: NekoCWD
GPG key ID: B7BE22D44474A582
2 changed files with 170 additions and 0 deletions

View file

@ -0,0 +1,34 @@
name: PostmarketOS build
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: Pmbootstrap
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Make temp package dir
run: mkdir -p /data/pmaports/temp/libcamera
- name: Copy APKBUILD to this dir
run: cp ${{ github.workspace }}/misc/APKBUILD /data/pmaports/temp/pipetap
- name: Clear local-built packages
run: pmbootstrap -y zap -p
- name: Run PostmarketOS build
run: pmbootstrap build --force libcamera --src ${{ github.workspace }} --arch aarch64
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: build-files
path: /data/work/packages/edge/aarch64/*.apk
- name: Upload to package registry
run: >
for apk in /data/work/packages/edge/aarch64/*.apk ; do
echo -- Uploading $apk
curl -H "Authorization: token ${{secrets.PACKAGE_TOKEN}}" \
--upload-file $apk \
${{github.server_url}}/api/packages/${{github.repository_owner}}/alpine/edge/nightly
done
- name: Clean up
run: pmbootstrap -y zap -p

136
misc/APKBUILD Normal file
View file

@ -0,0 +1,136 @@
# Forked from Alpine for temporary downstream patches
pkgname=libcamera
_pkgver=0.5.0
pkgver=9999$_pkgver
pkgrel=1
pkgdesc="Linux camera framework"
url="https://libcamera.org/"
arch="all"
license="LGPL-2.1-or-later AND GPL-2.0-or-later"
depends_dev="
eudev-dev
glib-dev
gnutls-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
graphviz
gtest-dev
libevent-dev
libpisp-dev
libunwind-dev
libyuv-dev
linux-headers
meson
py3-jinja2
py3-ply
py3-sphinx
py3-yaml
qt6-qttools-dev
yaml-dev
"
subpackages="
$pkgname-dbg
$pkgname-dev
$pkgname-doc
$pkgname-gstreamer
$pkgname-tools
"
source=""
builddir="$srcdir/$pkgname-v$_pkgver"
# gstreamer tests fail
# manual strip because ipa .sign files depend on the file contents- have to re-sign after strip
options="!strip !check"
case "$CARCH" in
arm*|aarch64)
subpackages="$subpackages"
;;
esac
case "$CARCH" in
ppc64le|s390x|riscv64|loongarch64)
# doesn't install any ipa
;;
*)
depends="$pkgname-ipa"
subpackages="$subpackages $pkgname-ipa"
;;
esac
build() {
abuild-meson \
-Dtest=false \
-Dv4l2=false \
-Dwerror=false \
-Dpipelines=simple \
-Dipas=simple \
. output
meson compile -C output
}
check() {
meson test -C output --print-errorlogs
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
install -Dm644 -t "$pkgdir"/usr/share/applications "$srcdir"/qcam.desktop
# manual strip first..
scanelf --recursive \
--nobanner \
--etype "ET_DYN,ET_EXEC" \
--format "%F" \
"$pkgdir" \
| while read -r file; do
strip "$file"
done
}
ipa() {
depends=""
amove usr/lib/libcamera
# then sign ipa's
local ipa
for ipa in "$subpkgdir"/usr/lib/libcamera/ipa/ipa*.so; do
msg "signing $ipa"
"$builddir"/src/ipa/ipa-sign.sh \
"$(find "$builddir"/output -type f -iname "*ipa-priv-key.pem")" \
"$ipa" \
"$ipa".sign
done
}
gstreamer() {
depends=""
amove usr/lib/gstreamer-1.0
}
tools() {
depends=""
amove usr/bin/cam
amove usr/bin/lc-compliance
}
sha512sums="
afc196cc693ba9fedd352f3a31dbe0f4dd1c28f50e7d5198d0c87fd0b8920eb497f51facd80960a96204c1e2803f8bf15ceadca7a7aa2d1aa38e51171befcc21 libcamera-v0.5.0.tar.gz
0a93293b141f47ea9296f87bcd596e3625f4d609ea4c6c8f0381ef30230f5ded0f92d3bb7ec18406cca4b7c437a44628375d8d65b4761d78ddf3c5245e166467 0001-libcamera-simple-Enable-softwareISP-for-the-librem5.patch
e024d325ec088b89b22033e10090b6a9c895e212660f5c71c774d2833a1873bf8594285aaf7ce3277cc51bf03a7493be29b657d1e7c9a299c864be9b64933d0b 0002-libcamera-simple-Force-disable-softwareISP-for-milli.patch
add6bd7e641dc085921133bba7302740b1cf71c18a26f13e2c2c7bbbfb830cdee92e7e4603141cd720bac4e49d9b04874f262d36a764e79d4e2f4f38c3b6ec92 0003-libcamera-simple-Enable-softISP-for-the-Pinephone.patch
37aa7c96c04267240171f5a137baa9d41993428b1adead068cc7c7a3ed693824447a7cfa9aa2b6b591aa60b302a47e89499fed46f99ee2128c2d6e0540b52f8f 0004-libcamera-simple-Skip-hwISP-formats-if-swISP-is-acti.patch
3728068b572793db6342e105f6745d3a042818502883f10f44d2f2741498ec0bd431608c531f9e515b62adaa1f50d6354829d64ef31121b71774f3095b36d63f 0005-pipeline-simple-Consider-output-sizes-when-choosing-.patch
8d517419183e63b689422ba04bc4d5f6f59c7a05db67ff2548e7195169891f876bda7f15e5274765e0730f62abd3a1ab278fad27ff7669683e8e40164d2a5788 0006-pipeline-simple-Increase-internal-buffer-count-to-fo.patch
4242a4c4934edcb14a7c23020be3c5ea9596f241eb4c44910388489113102931d6d36c1ba9a3eb4676c0981b641e227087709eda3bf831b3b127add35b87fdd6 0007-ipa-simple-Add-tuning-file-for-IMX355.patch
a803793ed16eca2563bbbae84713dab6a5f3090ae6ae5f755393c0b2203bf4471f4f37b6fc69991894ced60a8607d671262a51a49f02730931e43c6a4a3e9635 0008-ipa-simple-Add-tuning-file-for-IMX363.patch
374366eeb471f2034319caa02df182d363187e4f1a0a8ec1dedfe39b3765cc19602c62df7881b99005b004395314e3f737c67a494d44a305e4afb2d0f0085115 0009-ipa-simple-Add-tuning-file-for-s5k3l6xx.patch
6ac1989989fbc7d560948d66f59f62a4f28c8b398398d204cf4323c5db5f1eb45d5caa0f287f4f95956a1346e1346d5e1cf2d3577d46c2588b38a15bdcdb3b76 0010-ipa-simple-Add-tuning-file-for-hi846.patch
7bdc0d5f8904d827ad62e16f4ea5d8bf72262bbbf3260634d59884060b4b8592262fc443bd380383bbf4f1eeb4f9da1bcd7080f04a964cc008ad570bedca81c4 0011-ipa-simple-Add-tuning-file-for-IMX371.patch
0e51325a3216dea7fabdcd329b03d2c6493f3e2665e2937e48d94e3fe28d8d01f3077417e8bf08748259aa07b7550eaa484811d17e08edf1817c5bc5c673baf5 0012-ipa-simple-Add-tuning-file-for-IMX376.patch
22167a4eceb6d1b40b0b7c45fdf116c71684f5340de7f767535cb8e160ad9d2ae0f00cb3d461f73a344520a48a4641cf46226841d78bee06bfbfd2a91337f754 qcam.desktop
"