fix: regenerate dependencies-cargo.json to match Cargo.lock (#160) #454
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] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-test: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: 11.0.6 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Test | |
| run: pnpm test | |
| - name: Build | |
| run: pnpm build | |
| standalone-smoketest: | |
| name: Standalone Smoketest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: 22 | |
| - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: 11.0.6 | |
| - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable | |
| - name: Install system dependencies | |
| # apt mirrors are flaky: a healthy run finishes in <1min, but a degraded | |
| # Azure mirror can dribble bytes for 15-80min, and retrying the SAME mirror | |
| # doesn't help. Wrap each apt call in `timeout` (turns "slow" into a failed | |
| # attempt) and rotate the mirror host between attempts so a sustained | |
| # single-mirror problem is escaped. Azure first (fast, same datacenter), | |
| # archive.ubuntu.com as fallback. --no-install-recommends trims the download. | |
| timeout-minutes: 10 | |
| run: | | |
| mirrors=(azure.archive.ubuntu.com archive.ubuntu.com) | |
| src_files=(/etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list) | |
| for i in 0 1 2; do | |
| host=${mirrors[$(( i % ${#mirrors[@]} ))]} | |
| for f in "${src_files[@]}"; do | |
| [ -f "$f" ] && sudo sed -i -E "s|https?://[a-z.]*archive\.ubuntu\.com/ubuntu|http://$host/ubuntu|g" "$f" | |
| done | |
| echo "::group::apt attempt $((i + 1)) via $host" | |
| if sudo timeout 120 apt-get update -q && \ | |
| sudo timeout 180 apt-get install -y -q --no-install-recommends \ | |
| libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev; then | |
| echo "::endgroup::"; exit 0 | |
| fi | |
| echo "::endgroup::" | |
| echo "::warning::apt via $host failed or timed out; rotating mirror, retrying in 15s" | |
| sleep 15 | |
| done | |
| echo "::error::apt failed after 3 attempts across mirrors" | |
| exit 1 | |
| - name: Install npm dependencies | |
| run: pnpm install | |
| working-directory: standalone | |
| - name: TypeScript check | |
| run: npx tsc --noEmit | |
| working-directory: standalone | |
| - name: Cargo check | |
| run: cargo check | |
| working-directory: standalone/src-tauri |