Command Center 0.6.0: merge imports, crash recovery, concurrent jobs, wider distro support #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Linux packages | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: linux-packages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Rust tests run as a normal user; containers run as root, which masks permission checks. | |
| tests: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 35 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.23.2" | |
| cache: npm | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Install build dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev build-essential libssl-dev libayatana-appindicator3-dev librsvg2-dev | |
| - name: Install checksum-pinned Restic for restore integration tests | |
| run: | | |
| curl -fsSL https://github.com/restic/restic/releases/download/v0.19.1/restic_0.19.1_linux_amd64.bz2 -o /tmp/restic-ci.bz2 | |
| echo 'f415415624dcc452f2a02b8c33641791a8c6d6d3b65bbb3543fcf9a25151585c /tmp/restic-ci.bz2' | sha256sum -c - | |
| bzip2 -dk /tmp/restic-ci.bz2 | |
| sudo install -m755 /tmp/restic-ci /usr/local/bin/restic | |
| restic version | |
| - run: npm ci | |
| - run: npm run check && npm test && npm run test:rust | |
| - run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings | |
| # Build once on the oldest supported base so one binary serves every distribution. | |
| # Ubuntu 22.04 provides glibc 2.35, the floor declared in tauri.conf.json. | |
| build: | |
| runs-on: ubuntu-24.04 | |
| container: ubuntu:22.04 | |
| timeout-minutes: 40 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - name: Install build tools | |
| run: apt-get update && apt-get install -y curl ca-certificates git build-essential pkg-config file libssl-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf python3 binutils libarchive-tools | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.23.2" | |
| - uses: dtolnay/rust-toolchain@stable | |
| - run: npm ci && npm run check && npm test | |
| - run: npm run desktop:package | |
| - run: python3 scripts/verify-packages.py | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: packages | |
| path: artifacts/release/* | |
| if-no-files-found: error | |
| # Install the same packages on each supported family and launch them as a normal user. | |
| install-deb: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| image: ["ubuntu:22.04", "debian:12", "ubuntu:24.04"] | |
| container: ${{ matrix.image }} | |
| timeout-minutes: 20 | |
| env: | |
| DEBIAN_FRONTEND: noninteractive | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: packages | |
| path: packages | |
| - name: Verify checksums | |
| run: cd packages && sha256sum --check SHA256SUMS | |
| - name: Install package and launch-test tools | |
| run: apt-get update && apt-get install -y ./packages/*.deb xvfb xauth dbus dbus-x11 libnotify-bin | |
| - name: Launch installed application as a normal user | |
| run: useradd -m smoke && runuser -u smoke -- bash scripts/smoke-desktop.sh /usr/bin/command-center | |
| install-rpm: | |
| needs: build | |
| runs-on: ubuntu-24.04 | |
| container: fedora:43 | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: packages | |
| path: packages | |
| - name: Verify checksums | |
| run: cd packages && sha256sum --check SHA256SUMS | |
| - name: Install package and launch-test tools | |
| run: dnf install -y ./packages/*.rpm xorg-x11-server-Xvfb xorg-x11-xauth dbus-daemon shadow-utils libnotify | |
| - name: Launch installed application as a normal user | |
| run: useradd -m smoke && runuser -u smoke -- bash scripts/smoke-desktop.sh /usr/bin/command-center | |
| # Build the Arch recipe from this commit in a clean container, lint it, install it and launch it. | |
| arch: | |
| runs-on: ubuntu-24.04 | |
| container: archlinux:base-devel | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Install build, lint and launch-test tools | |
| run: pacman -Syu --noconfirm --needed git nodejs npm rust webkit2gtk-4.1 gtk3 libappindicator-gtk3 namcap xorg-server-xvfb xorg-xauth dbus | |
| - uses: actions/checkout@v4 | |
| - name: Build package from the checked-out commit | |
| run: | | |
| useradd -m builder | |
| git config --system --add safe.directory '*' | |
| mkdir /build && cp packaging/aur/PKGBUILD /build/ | |
| # The published recipe builds a release tag; CI builds this commit instead. | |
| sed -i "s|^source=.*|source=(\"command-center::git+file://$GITHUB_WORKSPACE#commit=$GITHUB_SHA\")|" /build/PKGBUILD | |
| chown -R builder /build | |
| cd /build && runuser -u builder -- makepkg --noconfirm | |
| - name: Lint recipe and package | |
| run: cd /build && namcap PKGBUILD && namcap ./*.pkg.tar.zst | |
| - name: Install package and launch as a normal user | |
| run: pacman -U --noconfirm /build/*.pkg.tar.zst && runuser -u builder -- bash scripts/smoke-desktop.sh /usr/bin/command-center |