ci.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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@v4
  20. - name: Install Rust stable
  21. uses: dtolnay/rust-toolchain@stable
  22. - name: Install protoc (macOS)
  23. if: matrix.platform == 'macos-latest'
  24. run: brew install protobuf
  25. - name: Install dependencies (Ubuntu)
  26. if: matrix.platform == 'ubuntu-22.04'
  27. run: |
  28. sudo apt-get update
  29. sudo apt-get install -y curl libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf protobuf-compiler
  30. - name: Install protoc (Windows)
  31. if: matrix.platform == 'windows-latest'
  32. run: choco install protoc -y
  33. - name: Rust cache
  34. uses: Swatinem/rust-cache@v2
  35. with:
  36. workspaces: src-tauri
  37. - name: Setup Node.js
  38. uses: actions/setup-node@v4
  39. with:
  40. node-version: 24
  41. - name: Install frontend dependencies
  42. run: npm install
  43. - name: Check frontend build
  44. run: npx vite build
  45. - name: Check Rust build
  46. working-directory: src-tauri
  47. run: cargo build