diff --git a/.github/workflows/greentea_cmake.yml b/.github/workflows/greentea_cmake.yml index 4a90a886e20a..fc0b7a8d316c 100644 --- a/.github/workflows/greentea_cmake.yml +++ b/.github/workflows/greentea_cmake.yml @@ -1,11 +1,137 @@ -name: test building greentea tests with cmake - +name: Test that Mbed and Greentea tests compile for each MCU family. on: [pull_request] jobs: build-greentea-cmake: runs-on: ubuntu-latest container: ghcr.io/armmbed/mbed-os-env:master-latest + + strategy: + matrix: + include: + ## For this matrix, we choose one target from each MCU target family that Mbed supports. + ## The target families can be seen here: + ## https://mbed-ce.github.io/mbed-ce-test-tools/targets/index.html + ## Generally we want to get the most feature-filled MCU of each type so that as much stuff + ## compiles as possible -- e.g. prefer a board with ethernet to one without so that we + ## can compile the netsocket tests. + + # NXP MCUs + - target: LPC1768 + baremetal: 0 + # - target: LPC546XX + # baremetal: 0 + # - target: MIMXRT1060_EVK + # baremetal: 0 + # - target: MIMXRT1170_EVK + # baremetal: 0 + + # # Freescale MCUs + - target: K64F + baremetal: 0 + # - target: KL43Z + # baremetal: 0 + # - target: KW41Z + # baremetal: 0 + + # # STM32 MCUs + # - target: NUCLEO_F091RC + # baremetal: 0 + # - target: NUCLEO_F103RB + # baremetal: 1 + # - target: NUCLEO_F207ZG + # baremetal: 0 + # - target: NUCLEO_F303RE + # baremetal: 0 + # - target: NUCLEO_F429ZI + # baremetal: 0 + # - target: NUCLEO_F767ZI + # baremetal: 0 + # - target: NUCLEO_G031K8 + # baremetal: 1 + # - target: NUCLEO_G431RB + # baremetal: 0 + # - target: NUCLEO_H563ZI + # baremetal: 0 + # - target: NUCLEO_H745ZI_Q_CM7 + # baremetal: 0 + # - target: DISCO_L072CZ_LRWAN1 + # baremetal: 1 + # - target: XDOT_L151CC + # baremetal: 0 + # - target: DISCO_L4R9I + # baremetal: 0 + # - target: DISCO_L562QE + # baremetal: 0 + # - target: B_U585I_IOT02A + # baremetal: 0 + # - target: NUCLEO_WB55RG + # baremetal: 0 + # - target: NUCLEO_WL55JC + # baremetal: 0 + + # # Maxim MCUs + - target: MAX32625MBED + baremetal: 0 + # - target: XDOT_MAX32670 + # baremetal: 0 + + # # Nuvoton MCUs + # - target: NUMAKER_PFM_NANO130 + # baremetal: 1 + # - target: NUMAKER_PFM_M487 + # baremetal: 0 + # - target: NU_M2354 + # baremetal: 0 + + # # Samsung MCUs + # - target: S1SBP6A + # baremetal: 0 + + # # nRF MCUs + # - target: NRF52840_DK + # baremetal: 0 + # - target: ARDUINO_NICLA_SENSE_ME + # baremetal: 0 + + # # Toshiba MCUs + # - target: TMPM4NR + # baremetal: 0 + + # # Renesas MCUs + # - target: GR_MANGO + # baremetal: 0 + # - target: RZ_A1H + # baremetal: 0 + + # # Ambiq MCUs + # - target: SFE_ARTEMIS_DK + # baremetal: 0 + + # # Infineon/Cypress MCUs + # - target: CY8CKIT_062S2_43012 + # baremetal: 0 + # - target: CYTFM_064B0S2_4343W + # baremetal: 0 + + # # Analog Devices MCUs + # - target: EV_COG_AD4050LZ + # baremetal: 0 + + # # GigaDevices MCUs + # - target: GD32_F307VG + # baremetal: 0 + # - target: GD32_F450ZI + # baremetal: 0 + + # # SiLabs MCUs + # - target: EFM32GG11_STK3701 + # baremetal: 0 + + # # Raspberry Pi MCUs + # - target: RASPBERRY_PI_PICO + # baremetal: 0 + steps: - name: Checkout uses: actions/checkout@v3 @@ -15,14 +141,16 @@ jobs: apt-get update apt-get install -y python3-venv - - name: Build NUCLEO_G031K8 with baremetal profile + - name: Build ${{ matrix.target }} with baremetal profile + #if: ${{ maxtrix.baremetal == 1 }} run: | rm -rf __build - cmake -S . -B __build -GNinja -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_TEST_BAREMETAL=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=NUCLEO_G031K8 -DMBED_APP_JSON_PATH=TESTS/configs/baremetal.json + cmake -S . -B __build -GNinja -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_TEST_BAREMETAL=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }} -DMBED_APP_JSON_PATH=TESTS/configs/baremetal.json cmake --build __build - - name: Build ARM_MUSCA_S1 with full profile + - name: Build ${{ matrix.target }} with full profile + #if: ${{ maxtrix.baremetal == 0 }} run: | rm -rf __build - cmake -S . -B __build -GNinja -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=ARM_MUSCA_S1 + cmake -S . -B __build -GNinja -DCMAKE_CTEST_ARGUMENTS="--output-on-failure;-V" -DMBED_BUILD_GREENTEA_TESTS=ON -DMBED_GREENTEA_SERIAL_PORT=/dev/ttyDUMMY -DMBED_TARGET=${{ matrix.target }} cmake --build __build