test-cli-rs.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 2019-2024 Tauri Programme within The Commons Conservancy
  2. # SPDX-License-Identifier: Apache-2.0
  3. # SPDX-License-Identifier: MIT
  4. name: test `tauri-cli`
  5. on:
  6. push:
  7. branches:
  8. - dev
  9. - 1.x
  10. pull_request:
  11. paths:
  12. - '.github/workflows/test-cli-rs.yml'
  13. - 'core/tauri-utils/**'
  14. - 'tooling/bundler/**'
  15. - 'tooling/cli/**'
  16. env:
  17. RUST_BACKTRACE: 1
  18. CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
  19. concurrency:
  20. group: ${{ github.workflow }}-${{ github.ref }}
  21. cancel-in-progress: true
  22. jobs:
  23. test:
  24. runs-on: ${{ matrix.platform.os }}
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. platform:
  29. - {
  30. target: x86_64-pc-windows-msvc,
  31. os: windows-latest
  32. }
  33. - {
  34. target: aarch64-pc-windows-msvc,
  35. os: windows-latest,
  36. args: --no-default-features --features native-tls-vendored
  37. }
  38. - {
  39. target: x86_64-unknown-linux-gnu,
  40. os: ubuntu-latest
  41. }
  42. - {
  43. target: x86_64-apple-darwin,
  44. os: macos-latest
  45. }
  46. steps:
  47. - uses: actions/checkout@v4
  48. - name: 'Setup Rust'
  49. uses: dtolnay/rust-toolchain@stable
  50. with:
  51. targets: ${{ matrix.platform.target }}
  52. - name: install Linux dependencies
  53. if: matrix.platform.os == 'ubuntu-latest'
  54. run: |
  55. sudo apt-get update
  56. sudo apt-get install -y libgtk-3-dev
  57. - uses: Swatinem/rust-cache@v2
  58. with:
  59. workspaces: tooling/cli
  60. - name: test CLI
  61. run: cargo test --manifest-path ./tooling/cli/Cargo.toml ${{ matrix.platform.args }}