Publish installs glib headers via the shared apt setup #169
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: Build Demo | |
| on: | |
| pull_request: | |
| push: | |
| branches: ['**'] | |
| jobs: | |
| # Build the example app on every desktop OS. Catches platform-specific | |
| # regressions. | |
| desktop: | |
| name: build-demo (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| # Installed straight from apt rather than through a caching action: a | |
| # restored cache doesn't reliably carry the pkg-config `.pc` files, so | |
| # the `*-sys` build scripts fail to locate glib/gio/gobject. The dev | |
| # packages pull glib in transitively; it's listed for clarity. | |
| - name: Install Tauri system deps | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libglib2.0-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libxdo-dev \ | |
| libssl-dev \ | |
| patchelf | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| . | |
| examples/tauri-app/src-tauri | |
| # No root `package.json`, so both the pnpm version (v6 dropped its | |
| # built-in default) and the lockfile hash come from the demo app. | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| run_install: false | |
| package_json_file: examples/tauri-app/package.json | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| cache-dependency-path: examples/tauri-app/pnpm-lock.yaml | |
| - name: Install demo deps | |
| working-directory: examples/tauri-app | |
| run: pnpm install | |
| # `--no-bundle` skips creating .deb/.dmg/.msi installers — we only | |
| # care that the app compiles & links on each OS, not that bundlers | |
| # work. `--debug` skips release-mode codegen to keep CI fast. | |
| - name: Build demo | |
| working-directory: examples/tauri-app | |
| run: pnpm tauri build --debug --no-bundle | |
| android: | |
| name: build-demo (android) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - uses: android-actions/setup-android@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-linux-android | |
| - uses: Swatinem/rust-cache@v2 | |
| # No root `package.json`, so both the pnpm version (v6 dropped its | |
| # built-in default) and the lockfile hash come from the demo app. | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| run_install: false | |
| package_json_file: examples/tauri-app/package.json | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| cache-dependency-path: examples/tauri-app/pnpm-lock.yaml | |
| - working-directory: examples/tauri-app | |
| run: pnpm install | |
| # `cargo-ndk` (used internally by `tauri android build`) needs | |
| # `NDK_HOME` / `ANDROID_NDK_HOME`. The runner image exposes | |
| # `ANDROID_NDK_LATEST_HOME` only as a shell variable (not in the | |
| # Actions expression context), so forward it at runtime. | |
| - working-directory: examples/tauri-app | |
| run: | | |
| export NDK_HOME="$ANDROID_NDK_LATEST_HOME" | |
| export ANDROID_NDK_HOME="$ANDROID_NDK_LATEST_HOME" | |
| pnpm tauri android build --debug --apk --target aarch64 | |
| ios: | |
| name: build-demo (ios) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Select Xcode 26.5 | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: "26.5" | |
| - name: Remove MetalToolchain (Tauri + Xcode 26 fix) | |
| run: | | |
| for i in 1 2 3; do | |
| sudo xcodebuild -downloadComponent MetalToolchain && break | |
| echo "Attempt $i failed; sleeping 15s and retrying" | |
| sleep 15 | |
| done || echo "MetalToolchain catalog fetch still failing; continuing in case the asset is already on disk" | |
| sudo xcodebuild -deleteComponent MetalToolchain | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-ios-sim | |
| - uses: Swatinem/rust-cache@v2 | |
| # No root `package.json`, so both the pnpm version (v6 dropped its | |
| # built-in default) and the lockfile hash come from the demo app. | |
| - uses: pnpm/action-setup@v6 | |
| with: | |
| run_install: false | |
| package_json_file: examples/tauri-app/package.json | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| cache-dependency-path: examples/tauri-app/pnpm-lock.yaml | |
| - working-directory: examples/tauri-app | |
| run: pnpm install | |
| # iOS Simulator target skips Apple code signing. | |
| - working-directory: examples/tauri-app | |
| run: pnpm tauri ios build --debug --target aarch64-sim |