tauri_ci.yaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: Tauri-CI
  2. on:
  3. pull_request:
  4. paths:
  5. - "frontend/rust-lib/**"
  6. - "frontend/appflowy_tauri/**"
  7. env:
  8. NODE_VERSION: "18.16.0"
  9. PNPM_VERSION: "8.5.0"
  10. RUST_TOOLCHAIN: "1.65"
  11. jobs:
  12. tauri-build:
  13. strategy:
  14. fail-fast: false
  15. matrix:
  16. # platform: [macos-latest, ubuntu-latest, windows-latest]
  17. platform: [ubuntu-latest]
  18. runs-on: ${{ matrix.platform }}
  19. steps:
  20. - uses: actions/checkout@v3
  21. - name: setup node
  22. uses: actions/setup-node@v3
  23. with:
  24. node-version: ${{ env.NODE_VERSION }}
  25. - name: Install Rust toolchain
  26. id: rust_toolchain
  27. uses: actions-rs/toolchain@v1
  28. with:
  29. toolchain: ${{ env.RUST_TOOLCHAIN }}
  30. override: true
  31. profile: minimal
  32. - uses: Swatinem/rust-cache@v2
  33. with:
  34. prefix-key: 'ubuntu-latest'
  35. workspaces: |
  36. frontend/rust-lib
  37. - name: install dependencies (windows only)
  38. if: matrix.platform == 'windows-latest'
  39. working-directory: frontend
  40. run: |
  41. cargo install --force cargo-make
  42. cargo install --force duckscript_cli
  43. vcpkg integrate install
  44. cargo make appflowy-tauri-deps-tools
  45. npm install -g pnpm@${{ env.PNPM_VERSION }}
  46. - name: install dependencies (ubuntu only)
  47. if: matrix.platform == 'ubuntu-20.04'
  48. working-directory: frontend
  49. run: |
  50. sudo apt-get update
  51. sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
  52. cargo install --force cargo-make
  53. cargo make appflowy-tauri-deps-tools
  54. npm install -g pnpm@${{ env.PNPM_VERSION }}
  55. - name: install dependencies (macOS only)
  56. if: matrix.platform == 'macos-latest'
  57. working-directory: frontend
  58. run: |
  59. cargo install --force cargo-make
  60. cargo make appflowy-tauri-deps-tools
  61. npm install -g pnpm@${{ env.PNPM_VERSION }}
  62. - name: build
  63. working-directory: frontend/appflowy_tauri
  64. run: |
  65. mkdir dist
  66. pnpm install
  67. cargo make --cwd .. tauri_build
  68. pnpm test:errors
  69. - uses: tauri-apps/tauri-action@v0
  70. env:
  71. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}