cmake.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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: [F0, F1, F2, F3, F4, F7, G0, G4, H7, L0, L1, L4, L5]
  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. - name: Configure tests/cmsis
  30. shell: bash
  31. working-directory: ${{runner.workspace}}/tests/cmsis/build
  32. run: cmake -DTEST_FAMILIES=${{ matrix.family }} -DFETCH_ST_SOURCES=TRUE $GITHUB_WORKSPACE/tests/cmsis/
  33. - name: Build tests/cmsis
  34. working-directory: ${{runner.workspace}}/tests/cmsis/build
  35. shell: bash
  36. run: cmake --build . --config $BUILD_TYPE
  37. - name: Create build directory for tests/hal
  38. run: cmake -E make_directory ${{runner.workspace}}/tests/hal/build
  39. - name: Configure tests/hal
  40. shell: bash
  41. working-directory: ${{runner.workspace}}/tests/hal/build
  42. run: cmake -DTEST_FAMILIES=${{ matrix.family }} -DFETCH_ST_SOURCES=TRUE $GITHUB_WORKSPACE/tests/hal/
  43. - name: Build tests/hal
  44. working-directory: ${{runner.workspace}}/tests/hal/build
  45. shell: bash
  46. run: cmake --build . --config $BUILD_TYPE