Skip to content
Merged
Show file tree
Hide file tree
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
36 changes: 28 additions & 8 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: alpine
on:
push:
branches: [main]
tags: ['*']
pull_request:
branches: [main]
workflow_dispatch: {}
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -17,14 +16,16 @@ permissions:

jobs:
alpine:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04${{ matrix.arch == 'aarch64' && '-arm' || '' }}
strategy:
matrix:
# aarch64 build is slooow - skip it in PR builds
arch: ${{ (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main') && fromJSON('["x86_64", "aarch64"]') || fromJSON('["x86_64"]') }}
arch:
- x86_64
- aarch64
steps:
- uses: actions/checkout@v4
- uses: jirutka/setup-alpine@v1
# Using fork (aarch64 branch from bgilbert/setup-alpine) until jirutka/setup-alpine#11 is resolved
- uses: samcday/setup-alpine@main
id: alpine
with:
arch: ${{ matrix.arch }}
Expand All @@ -41,15 +42,34 @@ jobs:
cp ~/.abuild/key.rsa.pub /etc/apk/keys/key.rsa.pub
abuild -F deps
shell: alpine.sh --root {0}
- name: update sha
if: github.event_name != 'release'
run: |
sed -i -e "s/^_gitrev=main$/_gitrev=$GITHUB_SHA/" APKBUILD
- name: release prep
if: github.event_name == 'release'
run: |
# Remove _git suffix to indicate the stable release.
# Assumes that the base (unsuffixed) pkgver was already updated to the new version in release commit.
sed -i -e 's/^\(pkgver=.*\)_git$/\1/' APKBUILD
# Delete _gitrev= var and rewrite usages to pkgver
sed -i -e '/^_gitrev=/d' -e 's/_gitrev/pkgver/g' APKBUILD
- name: build package
run: |
export PACKAGER_PRIVKEY=$HOME/.abuild/key.rsa
sed -i -e "s/_commit=main/_commit=$GITHUB_SHA/" APKBUILD
abuild -F checksum
abuild -F -P /packages
chmod -R 777 /packages
cp APKBUILD /packages/phrog/${{ matrix.arch }}
shell: alpine.sh --root {0}
- uses: actions/upload-artifact@v4
with:
name: packages-${{ matrix.arch }}
path: ${{ steps.alpine.outputs.root-path }}/packages/phrog/${{ matrix.arch }}/
- name: upload demo artifacts to release
uses: softprops/action-gh-release@v2
if: github.event_name == 'release'
with:
name: ${{ github.event.release.name }}
files: |
${{ steps.alpine.outputs.root-path }}/packages/phrog/${{ matrix.arch }}/*.apk
27 changes: 11 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: build
on:
push:
branches: [main]
tags: ['*']
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch: {}

concurrency:
Expand Down Expand Up @@ -116,6 +117,14 @@ jobs:
path: |
demo-video/demo.mp4
demo-video/demo.webp
- name: upload demo artifacts to release
uses: softprops/action-gh-release@v2
if: github.event_name == 'release'
with:
name: ${{ github.event.release.name }}
files: |
demo-video/demo.mp4
demo-video/demo.webp
- run: |
set -uexo pipefail
mkdir blob-upload/
Expand Down Expand Up @@ -158,23 +167,9 @@ jobs:
SOURCE_DIR: 'blob-upload'
DEST_DIR: ${{ github.run_id }}
- uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
header: ci-recordings
hide_and_recreate: true
hide_classify: OUTDATED
path: comment.txt
release:
needs: [build, demo]
runs-on: ubuntu-24.04
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: actions/download-artifact@v4
with:
name: demo-video
path: demo-video
- name: upload release artifacts
uses: softprops/action-gh-release@v2
with:
files: |
demo-video/demo.mp4
demo-video/demo.webp
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: release

name: Create release from tag
on:
push:
tags: ['*']
Expand All @@ -18,3 +17,4 @@ jobs:
with:
body_path: body.md
generate_release_notes: true
token: ${{ secrets.RELEASE_GITHUB_TOKEN }}
34 changes: 18 additions & 16 deletions APKBUILD
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# Maintainer: Sam Day <me@samcday.com>
pkgname=greetd-phrog
pkgver=0.43.0_git
_commit=main
pkgrel=0
pkgdesc="Mobile device greeter"
url="https://github.com/samcday/phrog"
# riscv64: blocked by greetd
url=https://github.com/samcday/phrog
# s390x: blocked by greetd & phosh
# ppc64le: blocked by phosh
# armhf: blocked by phosh
arch="all !s390x !riscv64 !armhf !ppc64le"
arch="all !s390x !armhf"
license="GPL-3.0-only"
depends="
phosh
Expand All @@ -22,14 +19,17 @@ makedepends="
libphosh-dev"
checkdepends="xvfb-run"

source="${url}/archive/$_commit/phrog-$_commit.tar.gz"
_gitrev=main
source="https://github.com/samcday/phrog/archive/$_gitrev/phrog-$_gitrev.tar.gz"
subpackages="$pkgname-schemas::noarch"
builddir="$srcdir/phrog-$_commit"
options="net" # cargo fetch
builddir="$srcdir/phrog-$_gitrev"
# net: cargo fetch
options="net"

export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$builddir=/build/"

prepare() {
default_prepare
cargo fetch --target="$CTARGET" --locked
}

Expand All @@ -42,14 +42,16 @@ package() {
install -Dm755 target/release/phrog -t "$pkgdir"/usr/bin/
}

# Tests are currently broken without a patched phoc due to https://gitlab.gnome.org/World/Phosh/phosh/-/issues/1161
# check() {
# export XDG_RUNTIME_DIR=/tmp
# dbus-run-session xvfb-run -a phoc -E "cargo test --release --frozen"
# }
check() {
export XDG_RUNTIME_DIR=/tmp
# TODO: trivial_flow test is failing in Alpine (and elsewhere):
# https://github.com/samcday/phrog/issues/89
rm tests/trivial_flow.rs
dbus-run-session xvfb-run -a phoc -E "cargo test --frozen"
}

schemas() {
pkgdesc="Phrog schema files"
depends=""
amove usr/share/glib-2.0/schemas
pkgdesc="Phrog schema files"
depends=""
amove usr/share/glib-2.0/schemas
}