test.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: Test CI
  2. on:
  3. workflow_dispatch:
  4. inputs:
  5. os:
  6. description: "Runs on OS"
  7. required: true
  8. default: windows-latest
  9. type: choice
  10. options:
  11. - windows-latest
  12. - ubuntu-latest
  13. - macos-latest
  14. - ubuntu-18.04
  15. - ubuntu-20.04
  16. - ubuntu-22.04
  17. - macos-10.15
  18. - macos-11
  19. - macos-12
  20. - windows-2019
  21. - windows-2022
  22. env:
  23. CARGO_INCREMENTAL: 0
  24. RUST_BACKTRACE: short
  25. jobs:
  26. release:
  27. runs-on: ${{ github.event.inputs.os }}
  28. if: startsWith(github.repository, 'zzzgydi')
  29. steps:
  30. - name: Checkout repository
  31. uses: actions/checkout@v2
  32. - name: Install Rust
  33. uses: actions-rs/toolchain@v1
  34. with:
  35. toolchain: stable
  36. profile: minimal
  37. override: true
  38. - name: Rust Cache
  39. uses: Swatinem/rust-cache@v1
  40. with:
  41. working-directory: src-tauri
  42. - name: Install Node
  43. uses: actions/setup-node@v1
  44. with:
  45. node-version: 14
  46. - name: Install Dependencies (ubuntu only)
  47. if: startsWith(github.event.inputs.os, 'ubuntu-')
  48. run: |
  49. sudo apt-get update
  50. sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf
  51. - name: Get yarn cache dir path
  52. id: yarn-cache-dir-path
  53. run: echo "::set-output name=dir::$(yarn cache dir)"
  54. - name: Yarn Cache
  55. uses: actions/cache@v2
  56. id: yarn-cache
  57. with:
  58. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  59. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  60. restore-keys: |
  61. ${{ runner.os }}-yarn-
  62. - name: Yarn install and check
  63. run: |
  64. yarn install --network-timeout 1000000
  65. yarn run check
  66. - name: Tauri build
  67. uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  68. env:
  69. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  70. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  71. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}