99 lines
3.2 KiB
YAML
99 lines
3.2 KiB
YAML
name: Citizen Launcher CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
code: read
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '1.23.x'
|
|
cache: false
|
|
- name: Install verification dependencies
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
SUDO=""
|
|
command -v sudo >/dev/null 2>&1 && SUDO=sudo
|
|
$SUDO apt-get update
|
|
$SUDO apt-get install -y --no-install-recommends python3 python3-yaml dpkg-dev zstd
|
|
- name: Full regression suite
|
|
run: bash ./tests/full-verify.sh
|
|
|
|
rpm-package:
|
|
runs-on: ubuntu-latest
|
|
container: fedora:44
|
|
env:
|
|
WORKSPACE: ${{ gitea.workspace }}
|
|
steps:
|
|
- name: Bootstrap minimal checkout dependency
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
mkdir -p "$WORKSPACE/.dnf-cache"
|
|
dnf -y \
|
|
--setopt=system_cachedir="$WORKSPACE/.dnf-cache" \
|
|
--setopt=install_weak_deps=False \
|
|
--setopt=tsflags=nodocs \
|
|
install git-core
|
|
find "$WORKSPACE/.dnf-cache" -type f -name '*.rpm' -delete 2>/dev/null || true
|
|
df -h /
|
|
- uses: actions/checkout@v4
|
|
- name: Build backend with minimal Go toolchain
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
dnf -y \
|
|
--setopt=system_cachedir="$WORKSPACE/.dnf-cache" \
|
|
--setopt=install_weak_deps=False \
|
|
--setopt=tsflags=nodocs \
|
|
install golang-bin
|
|
find "$WORKSPACE/.dnf-cache" -type f -name '*.rpm' -delete 2>/dev/null || true
|
|
bash ./build.sh
|
|
# The backend is fully static; release the compiler before bringing in rpmbuild.
|
|
dnf -y --setopt=system_cachedir="$WORKSPACE/.dnf-cache" remove golang-bin || true
|
|
find "$WORKSPACE/.dnf-cache" -type f -name '*.rpm' -delete 2>/dev/null || true
|
|
df -h /
|
|
- name: Build RPM in low-disk mode
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
dnf -y \
|
|
--setopt=system_cachedir="$WORKSPACE/.dnf-cache" \
|
|
--setopt=install_weak_deps=False \
|
|
--setopt=tsflags=nodocs \
|
|
install rpm-build
|
|
find "$WORKSPACE/.dnf-cache" -type f -name '*.rpm' -delete 2>/dev/null || true
|
|
bash ./packaging/build-rpm.sh
|
|
VERSION="$(tr -d '[:space:]' < VERSION)"
|
|
rpm -qpi "dist/citizen-launcher-${VERSION}-1.linux.x86_64.rpm"
|
|
df -h /
|
|
|
|
arch-package:
|
|
runs-on: ubuntu-latest
|
|
container: archlinux:base-devel
|
|
env:
|
|
WORKSPACE: ${{ gitea.workspace }}
|
|
steps:
|
|
- name: Build dependencies
|
|
run: pacman -Syu --noconfirm --needed git go zstd curl python nodejs
|
|
- uses: actions/checkout@v4
|
|
- name: Build backend
|
|
run: bash ./build.sh
|
|
- name: Build pacman package as unprivileged user
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
VERSION="$(tr -d '[:space:]' < VERSION)"
|
|
useradd -m builder
|
|
chown -R builder:builder "$WORKSPACE"
|
|
su builder -s /bin/bash -c "cd '$WORKSPACE' && bash ./packaging/build-arch.sh"
|
|
test -s "dist/citizen-launcher-${VERSION}-1-x86_64.pkg.tar.zst"
|