swift-api-test.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: swift-api-test
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - '.github/workflows/swift-api-test.yaml'
  8. - '.github/scripts/swift-api-test.sh'
  9. - 'CMakeLists.txt'
  10. - 'cmake/**'
  11. - 'sherpa-ncnn/csrc/*'
  12. - 'sherpa-ncnn/swift-api-examples/*'
  13. - 'build-swift-macos.sh'
  14. pull_request:
  15. branches:
  16. - master
  17. paths:
  18. - '.github/workflows/swift-api-test.yaml'
  19. - '.github/scripts/swift-api-test.sh'
  20. - 'CMakeLists.txt'
  21. - 'cmake/**'
  22. - 'sherpa-ncnn/csrc/*'
  23. - 'sherpa-ncnn/swift-api-examples/*'
  24. - 'build-swift-macos.sh'
  25. workflow_dispatch:
  26. concurrency:
  27. group: swift-api-test-${{ github.ref }}
  28. cancel-in-progress: true
  29. permissions:
  30. contents: read
  31. jobs:
  32. swift-api-test:
  33. runs-on: ${{ matrix.os }}
  34. strategy:
  35. fail-fast: false
  36. matrix:
  37. os: [macos-latest]
  38. steps:
  39. - uses: actions/checkout@v2
  40. with:
  41. fetch-depth: 0
  42. - name: ccache
  43. uses: hendrikmuhs/ccache-action@v1.2
  44. with:
  45. key: ${{ matrix.os }}-swift
  46. - name: Run swift-api-test
  47. shell: bash
  48. run: |
  49. export CMAKE_CXX_COMPILER_LAUNCHER=ccache
  50. export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
  51. .github/scripts/swift-api-test.sh