tauri_ci.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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-20.04, windows-latest]
  17. platform: [ubuntu-20.04]
  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: ${{ matrix.platform }}
  35. - name: install dependencies (windows only)
  36. if: matrix.platform == 'windows-latest'
  37. working-directory: frontend
  38. run: |
  39. cargo install --force cargo-make
  40. cargo install --force duckscript_cli
  41. vcpkg integrate install
  42. cargo make appflowy-tauri-deps-tools
  43. npm install -g pnpm@${{ env.PNPM_VERSION }}
  44. - name: install dependencies (ubuntu only)
  45. if: matrix.platform == 'ubuntu-20.04'
  46. working-directory: frontend
  47. run: |
  48. sudo apt-get update
  49. sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
  50. cargo install --force cargo-make
  51. cargo make appflowy-tauri-deps-tools
  52. npm install -g pnpm@${{ env.PNPM_VERSION }}
  53. - name: install dependencies (macOS only)
  54. if: matrix.platform == 'macos-latest'
  55. working-directory: frontend
  56. run: |
  57. cargo install --force cargo-make
  58. cargo make appflowy-tauri-deps-tools
  59. npm install -g pnpm@${{ env.PNPM_VERSION }}
  60. - name: build
  61. working-directory: frontend/appflowy_tauri
  62. run: |
  63. mkdir dist
  64. pnpm install
  65. cargo make --cwd .. tauri_build
  66. pnpm test:errors
  67. - uses: tauri-apps/tauri-action@v0
  68. env:
  69. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}