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