cmake.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. name: Tests
  2. on: [push, pull_request]
  3. env:
  4. # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
  5. BUILD_TYPE: Release
  6. jobs:
  7. RetrieveTargetsMatrix:
  8. uses: ./.github/workflows/create-matrix.yml
  9. test-ubuntu:
  10. runs-on: ubuntu-20.04
  11. needs: RetrieveTargetsMatrix
  12. strategy:
  13. matrix: ${{ fromJSON(needs.RetrieveTargetsMatrix.outputs.matrix) }}
  14. fail-fast: false
  15. steps:
  16. - uses: actions/checkout@v4
  17. - name: Install ARM toolchain
  18. run: sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
  19. - name: Create build directory for tests/fetch
  20. run: cmake -E make_directory ${{runner.workspace}}/tests/fetch/build
  21. - name: Configure tests/fetch
  22. shell: bash
  23. working-directory: ${{runner.workspace}}/tests/fetch/build
  24. run: cmake -DTEST_FAMILIES=${{ matrix.family }} $GITHUB_WORKSPACE/tests/fetch/
  25. - name: Build tests/fetch
  26. working-directory: ${{runner.workspace}}/tests/fetch/build
  27. shell: bash
  28. run: cmake --build . --config $BUILD_TYPE
  29. - name: Create build directory for tests/cmsis
  30. run: cmake -E make_directory ${{runner.workspace}}/tests/cmsis/build
  31. if: ${{ matrix.family != 'MP1' }}
  32. - name: Configure tests/cmsis
  33. shell: bash
  34. working-directory: ${{runner.workspace}}/tests/cmsis/build
  35. run: cmake -DTEST_FAMILIES=${{ matrix.family }} -DFETCH_ST_SOURCES=TRUE $GITHUB_WORKSPACE/tests/cmsis/
  36. if: ${{ matrix.family != 'MP1' }}
  37. - name: Build tests/cmsis
  38. working-directory: ${{runner.workspace}}/tests/cmsis/build
  39. shell: bash
  40. run: cmake --build . --config $BUILD_TYPE
  41. if: ${{ matrix.family != 'MP1' }}
  42. - name: Create build directory for tests/hal
  43. run: cmake -E make_directory ${{runner.workspace}}/tests/hal/build
  44. - name: Configure tests/hal
  45. shell: bash
  46. working-directory: ${{runner.workspace}}/tests/hal/build
  47. run: cmake -DTEST_FAMILIES=${{ matrix.family }} -DFETCH_ST_SOURCES=TRUE $GITHUB_WORKSPACE/tests/hal/
  48. - name: Build tests/hal
  49. working-directory: ${{runner.workspace}}/tests/hal/build
  50. shell: bash
  51. run: cmake --build . --config $BUILD_TYPE