test.yml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. - name: Install Node
  33. uses: actions/setup-node@v1
  34. with:
  35. node-version: 14
  36. - name: Install Dependencies (ubuntu only)
  37. if: github.event.inputs.os == 'ubuntu-latest'
  38. run: |
  39. sudo apt-get update
  40. 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
  41. - name: Get yarn cache dir path
  42. id: yarn-cache-dir-path
  43. run: echo "::set-output name=dir::$(yarn cache dir)"
  44. - name: Yarn Cache
  45. uses: actions/cache@v2
  46. id: yarn-cache
  47. with:
  48. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  49. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  50. restore-keys: |
  51. ${{ runner.os }}-yarn-
  52. - name: Yarn install and check
  53. run: |
  54. yarn install --network-timeout 1000000
  55. yarn run check --meta
  56. - name: Tauri build
  57. uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  58. env:
  59. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  60. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  61. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}