dev.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. name: Development Test
  2. on:
  3. workflow_dispatch:
  4. permissions: write-all
  5. env:
  6. CARGO_INCREMENTAL: 0
  7. RUST_BACKTRACE: short
  8. concurrency:
  9. # only allow per workflow per commit (and not pr) to run at a time
  10. group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}"
  11. cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
  12. jobs:
  13. dev:
  14. strategy:
  15. fail-fast: false
  16. matrix:
  17. include:
  18. - os: windows-latest
  19. target: x86_64-pc-windows-msvc
  20. bundle: nsis
  21. - os: macos-latest
  22. target: aarch64-apple-darwin
  23. bundle: dmg
  24. - os: macos-latest
  25. target: x86_64-apple-darwin
  26. bundle: dmg
  27. runs-on: ${{ matrix.os }}
  28. steps:
  29. - name: Checkout Repository
  30. uses: actions/checkout@v4
  31. - name: Install Rust Stable
  32. uses: dtolnay/rust-toolchain@1.77.0
  33. - name: Add Rust Target
  34. run: rustup target add ${{ matrix.target }}
  35. - name: Rust Cache
  36. uses: Swatinem/rust-cache@v2
  37. with:
  38. workspaces: src-tauri
  39. cache-all-crates: true
  40. cache-on-failure: true
  41. - name: Install Node
  42. uses: actions/setup-node@v4
  43. with:
  44. node-version: "20"
  45. - uses: pnpm/action-setup@v4
  46. name: Install pnpm
  47. with:
  48. run_install: false
  49. - name: Pnpm install and check
  50. run: |
  51. pnpm i
  52. pnpm check ${{ matrix.target }}
  53. - name: Tauri build
  54. uses: tauri-apps/tauri-action@v0
  55. env:
  56. NODE_OPTIONS: "--max_old_space_size=4096"
  57. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  58. with:
  59. tauriScript: pnpm
  60. args: --target ${{ matrix.target }} -b ${{ matrix.bundle }}
  61. - name: Upload Artifacts
  62. if: matrix.os == 'macos-latest'
  63. uses: actions/upload-artifact@v4
  64. with:
  65. name: ${{ matrix.target }}
  66. path: src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg
  67. if-no-files-found: error
  68. - name: Upload Artifacts
  69. if: matrix.os == 'windows-latest'
  70. uses: actions/upload-artifact@v4
  71. with:
  72. name: ${{ matrix.target }}
  73. path: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe
  74. if-no-files-found: error