ci.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: CI
  2. on:
  3. push:
  4. branches: [main]
  5. pull_request:
  6. branches: [main]
  7. jobs:
  8. check:
  9. strategy:
  10. fail-fast: false
  11. matrix:
  12. include:
  13. - platform: macos-latest
  14. - platform: ubuntu-22.04
  15. - platform: windows-latest
  16. runs-on: ${{ matrix.platform }}
  17. steps:
  18. - name: Checkout
  19. uses: actions/checkout@v5
  20. - name: Install Rust stable
  21. uses: dtolnay/rust-toolchain@stable
  22. - name: Install protoc (macOS)
  23. if: matrix.platform == 'macos-latest'
  24. run: |
  25. brew untap aws/tap || true
  26. brew install protobuf
  27. - name: Install dependencies (Ubuntu)
  28. if: matrix.platform == 'ubuntu-22.04'
  29. run: |
  30. sudo apt-get update
  31. sudo apt-get install -y curl libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf protobuf-compiler
  32. - name: Install protoc (Windows)
  33. if: matrix.platform == 'windows-latest'
  34. uses: arduino/setup-protoc@v3
  35. with:
  36. repo-token: ${{ secrets.GITHUB_TOKEN }}
  37. - name: Rust cache
  38. uses: Swatinem/rust-cache@v2
  39. with:
  40. workspaces: src-tauri
  41. - name: Setup Node.js
  42. uses: actions/setup-node@v5
  43. with:
  44. node-version: 24
  45. - name: Install frontend dependencies
  46. run: npm install
  47. - name: Check frontend build
  48. run: npx vite build
  49. - name: Check Rust build
  50. working-directory: src-tauri
  51. run: cargo build