Skip to content

ci: add test building to PPA #25

ci: add test building to PPA

ci: add test building to PPA #25

Workflow file for this run

name: Build Quickgui 🏗️
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
# TODO: arm64 runner
# https://github.blog/changelog/2024-06-03-actions-arm-based-linux-and-windows-runners-are-now-in-public-beta/
jobs:
test-build-linux-x64:
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
uses: actions/checkout@v4
- name: "Install Flutter 🦋"
uses: subosito/flutter-action@v2
with:
channel: stable
architecture: x64
flutter-version-file: pubspec.yaml
- name: "Install dependencies 💾"
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5
- name: Install Flutter dependencies 🦋
run: flutter pub get
- name: Enable Linux Desktop 🐧
run: flutter config --enable-linux-desktop
- name: Build artifacts 🏗️
run: flutter build linux --release
- name: Show artifacts 👀
run: tree build/linux/x64/release/bundle
- name: Upload artifacts ⤴️
uses: actions/upload-artifact@v4
with:
name: Quickgui-${{github.run_number}}-linux-x64
path: build/linux/x64/release/bundle
overwrite: true
test-build-ppa-x64:
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
uses: actions/checkout@v4
- name: "Install Flutter 🦋"
uses: subosito/flutter-action@v2
with:
channel: stable
architecture: x64
flutter-version-file: pubspec.yaml
- name: "Install dependencies 💾"
run: |
sudo apt-get -y install clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5
sudo apt-get -y install debhelper-compat distro-info dput devscripts rsync
- name: Install Flutter dependencies 🦋
run: flutter pub get
- name: Enable Linux Desktop 🐧
run: flutter config --enable-linux-desktop
- name: Build artifacts 🏗️
run: flutter build linux --release
- name: "Import gpg key 🔑"
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PPA_GPG_PASSPHRASE }}
- name: "Upload to PPA ⤴️"
env:
DEBEMAIL: ${{ secrets.DEBEMAIL }}
DEBFULLNAME: ${{ secrets.DEBFULLNAME }}
run: |
REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
STAMP=$(date +%y%j.%H%M)
mkdir -pv ppa/usr/share/quickgui
mkdir -pv ppa/usr/share/applications
cp -v assets/resources/quickgui.desktop ppa/usr/share/applications/
for SIZE in 16 32 48 64 128 256 512; do
mkdir -pv ppa/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps
cp -v assets/resources/quickgui_${SIZE}.png ppa/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/quickgui.png
done
rsync -av linux/packaging/debian/ ppa/debian/
rsync -av build/linux/x64/release/bundle/data/ ppa/usr/share/quickgui/data/
rsync -av build/linux/x64/release/bundle/lib/ ppa/usr/share/quickgui/lib/
cp -v build/linux/x64/release/bundle/quickgui ppa/usr/share/quickgui/
cd ppa
for CODENAME in $(distro-info --supported); do
rm debian/changelog
dch --package quickgui --newversion="${REL_VER}~${CODENAME}${STAMP}" --distribution=${CODENAME} "New upstream release." --create
dpkg-buildpackage -d -S -sa
dput ppa:flexiondotorg/zombie ../quickgui_${REL_VER}~${CODENAME}${STAMP}_source.changes
done
- name: Show artifacts 👀
run: tree ppa/
test-build-nix-x64:
runs-on: ubuntu-22.04
permissions:
id-token: "write"
contents: "read"
steps:
- name: "Checkout 🥡"
uses: "actions/checkout@v4"
- name: "Install Nix ❄️"
uses: "DeterminateSystems/nix-installer-action@v12"
- name: "Enable Magic Nix Cache 🪄"
uses: "DeterminateSystems/magic-nix-cache-action@v7"
- name: "Build with Nix ❄️"
run: |
nix build .#quickgui
tree ./result