Skip to content

feat: add smoke test fir ui app on CI #21

feat: add smoke test fir ui app on CI

feat: add smoke test fir ui app on CI #21

Workflow file for this run

name: Build & Release
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build-appimage:
strategy:
matrix:
include:
- arch: x86_64-linux
runner: ubuntu-latest
- arch: aarch64-linux
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build bin-appimage
run: nix build .#bin-appimage
- name: Smoke test (Linux)
run: |
nix build '.#app'
set +e
timeout 10 ./result/bin/LogosApp -platform offscreen 2>&1 | tee /tmp/logos-launch.log
CODE=${PIPESTATUS[0]}
set -e
if grep -qE "failed to load|is not installed|Cannot assign|No such file" /tmp/logos-launch.log; then
echo "❌ Critical QML errors"
exit 1
fi
[ "$CODE" -eq 124 ] || [ "$CODE" -eq 0 ] || exit 1
echo "✅ Smoke test passed"
- name: Rename AppImage with architecture
run: |
arch="${{ matrix.arch }}"
arch_short="${arch%%-*}"
src=$(find result/ -name '*.AppImage' -print -quit)
cp "$src" "logos-app-${arch_short}.AppImage"
- uses: actions/upload-artifact@v4
with:
name: appimage-${{ matrix.arch }}
path: logos-app-*.AppImage
build-macos-app:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- name: Build bin-macos-app
run: nix build .#bin-macos-app
- name: Smoke test
run: |
nix build '.#app'
set +e
timeout 10 ./result/bin/LogosApp -platform offscreen 2>&1 | tee /tmp/logos-launch.log
CODE=${PIPESTATUS[0]}
set -e
if grep -qE "failed to load|is not installed|Cannot assign|No such file" /tmp/logos-launch.log; then
echo "❌ Critical QML errors detected"
cat /tmp/logos-launch.log
exit 1
fi
if [ "$CODE" -ne 124 ] && [ "$CODE" -ne 0 ]; then
echo "❌ App crashed with exit code $CODE"
cat /tmp/logos-launch.log
exit 1
fi
echo "✅ Smoke test passed"
- name: Package app bundle as tarball
run: |
app=$(find result/ -name '*.app' -maxdepth 1 -print -quit)
tar -czf logos-app-aarch64-unsigned.app.tar.gz -C result "$(basename "$app")"
- uses: actions/upload-artifact@v4
with:
name: macos-app-aarch64-darwin
path: logos-app-aarch64-unsigned.app.tar.gz
release:
if: github.event_name == 'push'
needs: [build-appimage, build-macos-app]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: appimage-x86_64-linux
path: artifacts/
- uses: actions/download-artifact@v4
with:
name: appimage-aarch64-linux
path: artifacts/
- uses: actions/download-artifact@v4
with:
name: macos-app-aarch64-darwin
path: artifacts/
- name: Generate tag
id: tag
run: echo "tag=pre-release-${GITHUB_SHA::7}-${GITHUB_RUN_NUMBER}" >> "$GITHUB_OUTPUT"
- uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: Pre-release ${{ steps.tag.outputs.tag }}
prerelease: true
files: |
artifacts/*.AppImage
artifacts/*.app.tar.gz