ci: refine macos diagnostic #24
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: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: short | |
| jobs: | |
| check: | |
| name: ${{ matrix.platform.label }} | |
| runs-on: ${{ matrix.platform.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Windows omitted (Unix-only trigger.rs). macOS temporarily re-added to | |
| # diagnose the deps-not-linked build failure. | |
| platform: | |
| - { os: ubuntu-latest, label: ubuntu } | |
| - { os: macos-latest, label: macos } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # ──────────────── system deps ──────────────── | |
| - name: Install Linux system deps | |
| if: matrix.platform.label == 'ubuntu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf \ | |
| libgtk-3-dev \ | |
| libsoup-3.0-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| libxdo-dev \ | |
| libasound2-dev \ | |
| libssl-dev \ | |
| pkg-config | |
| # ──────────────── toolchains ──────────────── | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Cargo cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: ./src-tauri -> target | |
| shared-key: ${{ matrix.platform.label }} | |
| # ──────────────── frontend (needed for tauri::generate_context!) ──────────────── | |
| - name: Install deps | |
| run: pnpm install --frozen-lockfile | |
| - name: Build frontend | |
| run: pnpm run build | |
| # TEMP diagnostic: capture the exact rustc invocation for the qol bin on | |
| # macOS to see whether cargo omits the --extern flags for its deps. | |
| - name: macos verbose diagnostic | |
| if: matrix.platform.label == 'macos' | |
| working-directory: src-tauri | |
| run: | | |
| cargo clean | |
| cargo build -v > /tmp/b.log 2>&1 || true | |
| echo "=== qol rustc line present? ===" | |
| grep -c -- "--crate-name qol " /tmp/b.log || true | |
| echo "=== unique --extern flags on the qol invocation ===" | |
| grep -- "--crate-name qol " /tmp/b.log | grep -oE -- "--extern [a-z_0-9]+" | sort -u || true | |
| echo "=== rustc/cargo versions ===" | |
| rustc -V; cargo -V; which rustc cargo | |
| echo "=== serde crates in tree ===" | |
| grep -oE "Compiling serde[a-z_]* v[0-9.]+" /tmp/b.log | sort -u || true | |
| # ──────────────── checks ──────────────── | |
| - name: Rustfmt | |
| working-directory: src-tauri | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| working-directory: src-tauri | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Tests | |
| working-directory: src-tauri | |
| run: cargo test --all-targets | |
| - name: Build (debug) | |
| working-directory: src-tauri | |
| run: cargo build |