cmake.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. test-ubuntu:
  8. runs-on: ubuntu-20.04
  9. strategy:
  10. matrix:
  11. family: [C0, F0, F1, F2, F3, F4, F7, G0, G4, H5, H7, L0, L1, L4, L5, U0, U5, WB, WL, MP1]
  12. fail-fast: false
  13. steps:
  14. - uses: actions/checkout@v2
  15. - name: Install ARM toolchain
  16. run: sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi
  17. - name: Create build directory for tests/fetch
  18. run: cmake -E make_directory ${{runner.workspace}}/tests/fetch/build
  19. - name: Configure tests/fetch
  20. shell: bash
  21. working-directory: ${{runner.workspace}}/tests/fetch/build
  22. run: cmake -DTEST_FAMILIES=${{ matrix.family }} $GITHUB_WORKSPACE/tests/fetch/
  23. - name: Build tests/fetch
  24. working-directory: ${{runner.workspace}}/tests/fetch/build
  25. shell: bash
  26. run: cmake --build . --config $BUILD_TYPE
  27. - name: Create build directory for tests/cmsis
  28. run: cmake -E make_directory ${{runner.workspace}}/tests/cmsis/build
  29. if: ${{ matrix.family != 'MP1' }}
  30. - name: Configure tests/cmsis
  31. shell: bash
  32. working-directory: ${{runner.workspace}}/tests/cmsis/build
  33. run: cmake -DTEST_FAMILIES=${{ matrix.family }} -DFETCH_ST_SOURCES=TRUE $GITHUB_WORKSPACE/tests/cmsis/
  34. if: ${{ matrix.family != 'MP1' }}
  35. - name: Build tests/cmsis
  36. working-directory: ${{runner.workspace}}/tests/cmsis/build
  37. shell: bash
  38. run: cmake --build . --config $BUILD_TYPE
  39. if: ${{ matrix.family != 'MP1' }}
  40. - name: Create build directory for tests/hal
  41. run: cmake -E make_directory ${{runner.workspace}}/tests/hal/build
  42. - name: Configure tests/hal
  43. shell: bash
  44. working-directory: ${{runner.workspace}}/tests/hal/build
  45. run: cmake -DTEST_FAMILIES=${{ matrix.family }} -DFETCH_ST_SOURCES=TRUE $GITHUB_WORKSPACE/tests/hal/
  46. - name: Build tests/hal
  47. working-directory: ${{runner.workspace}}/tests/hal/build
  48. shell: bash
  49. run: cmake --build . --config $BUILD_TYPE