build.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. name: Build Tauri App
  2. on:
  3. push:
  4. branches: [ "main" ]
  5. pull_request:
  6. branches: [ "main" ]
  7. env:
  8. CARGO_TERM_COLOR: always
  9. jobs:
  10. build_macos:
  11. runs-on: macos-latest
  12. steps:
  13. - uses: actions/checkout@v3
  14. - name: Install Rust
  15. run: |
  16. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  17. echo "$HOME/.cargo/bin" >> $GITHUB_PATH
  18. rustup target add x86_64-apple-darwin
  19. - name: Build Tauri App (x86_64)
  20. run: |
  21. cargo install tauri-cli
  22. cargo tauri build --target x86_64-apple-darwin
  23. - name: Upload build artifact
  24. uses: actions/upload-artifact@v3
  25. with:
  26. name: tauri-qwen_0.1.0_x64.dmg
  27. path: target/x86_64-apple-darwin/release/bundle/dmg/tauri-qwen_0.1.0_x64.dmg
  28. build_macos_m2:
  29. runs-on: macos-latest
  30. steps:
  31. - uses: actions/checkout@v3
  32. - name: Install Rust and target for ARM64
  33. run: |
  34. curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  35. echo "$HOME/.cargo/bin" >> $GITHUB_PATH
  36. rustup target add aarch64-apple-darwin
  37. - name: Build Tauri App (ARM64)
  38. run: |
  39. cargo install tauri-cli
  40. cargo tauri build --target aarch64-apple-darwin
  41. - name: Upload build artifact
  42. uses: actions/upload-artifact@v3
  43. with:
  44. name: tauri-qwen_0.1.0_aarch64.dmg
  45. path: target/aarch64-apple-darwin/release/bundle/dmg/tauri-qwen_0.1.0_aarch64.dmg
  46. # build_ubuntu:
  47. # runs-on: ubuntu-latest
  48. # steps:
  49. # - uses: actions/checkout@v3
  50. # - name: Install GTK+ 3
  51. # run: |
  52. # sudo apt-get update && sudo apt-get install -y libgtk-3-dev libsoup2.4-dev
  53. # - name: Install Rust
  54. # run: |
  55. # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  56. # echo "$HOME/.cargo/bin" >> $GITHUB_PATH
  57. # - name: Build Tauri App
  58. # run: |
  59. # cargo install tauri-cli
  60. # cargo tauri build
  61. # - name: Upload build artifact
  62. # uses: actions/upload-artifact@v3
  63. # with:
  64. # name: gemini-desktop-ubuntu
  65. # path: target/release/bundle
  66. build_windows:
  67. runs-on: windows-latest
  68. steps:
  69. - uses: actions/checkout@v3
  70. - name: Install Rust
  71. run: |
  72. choco install rustup.install
  73. echo "$HOME/.cargo/bin" >> $GITHUB_PATH
  74. echo "$USERPROFILE\\.cargo\\bin" >> $GITHUB_PATH
  75. - name: Build Tauri App
  76. run: |
  77. cargo install tauri-cli
  78. cargo tauri build
  79. - name: Upload build artifact
  80. uses: actions/upload-artifact@v3
  81. with:
  82. name: tauri-qwen_0.1.0_x64-setup.exe
  83. path: target/release/bundle/nsis/tauri-qwen_0.1.0_x64-setup.exe