test.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Test CI
  2. on: workflow_dispatch
  3. env:
  4. CARGO_INCREMENTAL: 0
  5. RUST_BACKTRACE: short
  6. jobs:
  7. release:
  8. strategy:
  9. matrix:
  10. os: [windows-latest, ubuntu-latest, macos-latest]
  11. runs-on: ${{ matrix.os }}
  12. if: startsWith(github.repository, 'zzzgydi')
  13. steps:
  14. - name: Checkout repository
  15. uses: actions/checkout@v2
  16. - name: Install Rust
  17. uses: actions-rs/toolchain@v1
  18. with:
  19. toolchain: stable
  20. profile: minimal
  21. override: true
  22. - name: Install Node
  23. uses: actions/setup-node@v1
  24. with:
  25. node-version: 14
  26. - name: Install Dependencies (ubuntu only)
  27. if: matrix.os == 'ubuntu-latest'
  28. run: |
  29. sudo apt-get update
  30. sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev libayatana-appindicator-dev patchelf
  31. - name: Get yarn cache dir path
  32. id: yarn-cache-dir-path
  33. run: echo "::set-output name=dir::$(yarn cache dir)"
  34. - name: Yarn Cache
  35. uses: actions/cache@v2
  36. id: yarn-cache
  37. with:
  38. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  39. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  40. restore-keys: |
  41. ${{ runner.os }}-yarn-
  42. - name: Yarn install and check
  43. run: |
  44. yarn install --network-timeout 1000000
  45. yarn run check
  46. - name: Tauri build
  47. uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  48. # enable cache even though failed
  49. continue-on-error: true
  50. env:
  51. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  52. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  53. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}