Files
trail-mate/.github/workflows/cardputer-zero-linux.yml
T

113 lines
4.2 KiB
YAML

name: Cardputer Zero Linux
on:
workflow_call:
inputs:
smoke_only:
type: boolean
default: false
workflow_dispatch:
push:
paths:
- "apps/linux_cardputer_zero/**"
- "builds/linux_cmake/**"
- "cmake/**"
- "modules/**"
- "platform/linux/**"
- ".github/workflows/cardputer-zero-linux.yml"
pull_request:
paths:
- "apps/linux_cardputer_zero/**"
- "builds/linux_cmake/**"
- "cmake/**"
- "modules/**"
- "platform/linux/**"
- ".github/workflows/cardputer-zero-linux.yml"
jobs:
cardputer-zero:
name: Cardputer Zero shell
# Package on the target architecture; release smoke calls also cover x86.
runs-on: ${{ inputs.smoke_only && 'ubuntu-latest' || 'ubuntu-24.04-arm' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Verify shared/platform UI boundaries
run: python3 scripts/check_platform_ui_boundaries.py
- name: Verify repository root has no build artifacts
run: python3 scripts/check_root_build_artifacts.py
- name: Verify APPLaunch backend selection
run: python3 apps/linux_cardputer_zero/tests/launcher_backend_test.py apps/linux_cardputer_zero/packaging/trailmate-cardputer-zero-applaunch
- name: Verify Store release publication gates
run: python3 apps/linux_cardputer_zero/tests/store_release_gate_test.py
- name: Verify Store multiarch package layout
run: python3 apps/linux_cardputer_zero/tests/store_package_layout_test.py
- name: Verify UI translation coverage and source parser
run: |
python3 tools/validate_locale_packs.py
python3 -m unittest discover -s tests/ui_localization
- name: Install Cardputer Zero build dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build dpkg-dev libsqlite3-dev libcurl4-openssl-dev libssl-dev libmbedtls-dev libjpeg-dev libpng-dev libarchive-dev libfreetype6-dev libsdl2-dev libwayland-bin libwayland-dev libxkbcommon-dev wayland-protocols
- name: Prepare isolated Linux font tools
run: |
python3 -m venv "$RUNNER_TEMP/trailmate-font-tools"
"$RUNNER_TEMP/trailmate-font-tools/bin/python" -m pip install -r tools/fonts/linux/requirements.txt
- name: Configure Cardputer Zero Linux shell
env:
TRAIL_MATE_FONT_TOOLS_PYTHON: ${{ runner.temp }}/trailmate-font-tools/bin/python
working-directory: builds/linux_cmake
run: cmake --preset linux-cardputer-zero-debug
- name: Build Cardputer Zero Linux shell
working-directory: builds/linux_cmake
run: cmake --build --preset linux-cardputer-zero-debug-build
- name: Run Cardputer Zero smoke tests
id: smoke
working-directory: builds/linux_cmake
run: ctest --preset linux-cardputer-zero-debug-test
- name: Diagnose failed map keyboard regression
if: ${{ failure() && steps.smoke.outcome == 'failure' }}
run: |
sudo apt-get install -y gdb
gdb --batch --return-child-result -ex run -ex 'thread apply all bt' --args \
builds/linux_cmake/build/linux-cardputer-zero-debug/apps/linux_cardputer_zero/trailmate_cardputer_zero_tmap_keyboard_test
- name: Verify build stayed out of repository root
run: python3 scripts/check_root_build_artifacts.py
- name: Configure Cardputer Zero Debian package
if: ${{ !inputs.smoke_only }}
working-directory: builds/linux_cmake
run: cmake --preset linux-cardputer-zero-release
- name: Set up QEMU for arm64 Docker package build
if: ${{ !inputs.smoke_only }}
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Build Cardputer Zero Debian package
if: ${{ !inputs.smoke_only }}
run: bash apps/linux_cardputer_zero/tools/build_cardputer_zero_deb.sh
- name: Upload Cardputer Zero Debian package
if: ${{ !inputs.smoke_only }}
uses: actions/upload-artifact@v4
with:
name: trailmate-cardputer-zero-deb
path: build/cardputer-zero-deb/*.deb
if-no-files-found: error