test.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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 libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libappindicator3-dev librsvg2-dev libayatana-appindicator3-dev
  51. - name: Install ARM64 toolchain (windows only)
  52. if: startsWith(github.event.inputs.os, 'windows-')
  53. run: |
  54. rustup target add aarch64-pc-windows-msvc
  55. rustup target list
  56. - name: Get yarn cache dir path
  57. id: yarn-cache-dir-path
  58. run: echo "::set-output name=dir::$(yarn cache dir)"
  59. - name: Yarn Cache
  60. uses: actions/cache@v2
  61. id: yarn-cache
  62. with:
  63. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  64. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  65. restore-keys: |
  66. ${{ runner.os }}-yarn-
  67. - name: Yarn install and check
  68. run: |
  69. yarn install --network-timeout 1000000
  70. yarn run check
  71. # - name: Tauri build
  72. # uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  73. # env:
  74. # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  75. # TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  76. # TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  77. - name: Tauri build arm64 (windows only)
  78. if: startsWith(github.event.inputs.os, 'windows-')
  79. uses: tauri-apps/tauri-action@0e558392ccadcb49bcc89e7df15a400e8f0c954d
  80. env:
  81. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  82. TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
  83. TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
  84. with:
  85. args: --target aarch64-pc-windows-msvc