test.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. env:
  15. CARGO_INCREMENTAL: 0
  16. RUST_BACKTRACE: short
  17. jobs:
  18. release:
  19. runs-on: ${{ github.event.inputs.os }}
  20. if: startsWith(github.repository, 'zzzgydi')
  21. steps:
  22. - name: Checkout repository
  23. uses: actions/checkout@v2
  24. - name: Install Rust
  25. uses: actions-rs/toolchain@v1
  26. with:
  27. toolchain: stable
  28. profile: minimal
  29. override: true
  30. - name: Rust Cache
  31. uses: Swatinem/rust-cache@v1
  32. with:
  33. working-directory: src-tauri
  34. - name: Install Node
  35. uses: actions/setup-node@v1
  36. with:
  37. node-version: 14
  38. - name: Install Dependencies (ubuntu only)
  39. if: github.event.inputs.os == 'ubuntu-latest'
  40. run: |
  41. sudo apt-get update
  42. sudo apt-get install -y libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev libayatana-appindicator3-dev
  43. - name: Get yarn cache dir path
  44. id: yarn-cache-dir-path
  45. run: echo "::set-output name=dir::$(yarn cache dir)"
  46. - name: Yarn Cache
  47. uses: actions/cache@v2
  48. id: yarn-cache
  49. with:
  50. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  51. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  52. restore-keys: |
  53. ${{ runner.os }}-yarn-
  54. - name: Yarn install and check
  55. run: |
  56. yarn install --network-timeout 1000000
  57. yarn run check
  58. - name: Tauri build
  59. uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  60. env:
  61. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  62. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  63. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}