- CPack DEB configuration (cmake/Packaging.cmake): dependencies from dpkg-shlibdeps, udisks2 recommended, strip. - AppStream metadata, installed with the desktop file and the icons; tools/release.sh adds each release to it. - tools/appimage.sh: AppImage of the GTK interface and openpu-cli with linuxdeploy and its GTK plugin (x86_64 and aarch64). - Release workflow: .deb, AppImage and openpu-cli tarball for x86_64 and arm64, attached to the release of a vX.Y.Z tag, or kept as artifacts on a manual run. tools/release.sh edits the release when the workflow created it first. - The GTK interface finds its translations next to the executable (../share/locale), for relocatable installs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WDASLCiN764v685boRVYar
84 lines
2.9 KiB
YAML
84 lines
2.9 KiB
YAML
# SPDX-License-Identifier: MIT
|
|
# Release binaries for Linux x86_64 and arm64: Debian package, AppImage and a tarball of the
|
|
# command-line tool. On a vX.Y.Z tag they are attached to the GitHub release (created here if
|
|
# tools/release.sh has not created it yet); a manual run keeps them as workflow artifacts.
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
linux:
|
|
name: Linux ${{ matrix.arch }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- arch: x86_64
|
|
runner: ubuntu-24.04
|
|
- arch: arm64
|
|
runner: ubuntu-24.04-arm
|
|
runs-on: ${{ matrix.runner }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0 # tags are needed for the version description
|
|
|
|
- name: Dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y --no-install-recommends \
|
|
build-essential cmake ninja-build pkg-config gettext file desktop-file-utils \
|
|
libcurl4-openssl-dev libarchive-dev nlohmann-json3-dev doctest-dev \
|
|
libglib2.0-dev libgtkmm-4.0-dev librsvg2-common
|
|
|
|
- name: Build and test
|
|
run: |
|
|
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DOPENPU_WERROR=ON -DOPENPU_UI_GTK=ON
|
|
cmake --build build
|
|
ctest --test-dir build --output-on-failure
|
|
|
|
- name: Debian package
|
|
run: |
|
|
cd build && cpack -G DEB
|
|
dpkg-deb -I openpu_*.deb
|
|
|
|
- name: Command-line tool
|
|
run: |
|
|
version=$(build/src/cli/openpu-cli --version | awk '{print $2}')
|
|
mkdir -p "dist/openpu-cli-$version-linux-${{ matrix.arch }}"
|
|
cp build/src/cli/openpu-cli LICENSE README.md "dist/openpu-cli-$version-linux-${{ matrix.arch }}/"
|
|
strip "dist/openpu-cli-$version-linux-${{ matrix.arch }}/openpu-cli"
|
|
tar -C dist -czf "openpu-cli-$version-linux-${{ matrix.arch }}.tar.gz" "openpu-cli-$version-linux-${{ matrix.arch }}"
|
|
|
|
- name: AppImage
|
|
run: tools/appimage.sh "$PWD/build-appimage"
|
|
|
|
- name: Collect
|
|
run: |
|
|
mkdir -p out
|
|
mv build/openpu_*.deb openpu-cli-*.tar.gz OpenPU-*.AppImage out/
|
|
(cd out && sha256sum * > SHA256SUMS-linux-${{ matrix.arch }}.txt && ls -l)
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: openpu-linux-${{ matrix.arch }}
|
|
path: out/*
|
|
|
|
- name: Attach to the release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
TAG: ${{ github.ref_name }}
|
|
run: |
|
|
gh release view "$TAG" >/dev/null 2>&1 ||
|
|
gh release create "$TAG" --verify-tag --title "OpenPU ${TAG#v}" --notes-from-tag ||
|
|
gh release view "$TAG" >/dev/null # the other architecture may have created it meanwhile
|
|
gh release upload "$TAG" out/* --clobber
|