arm: Fixed compiler path incorrect if compiled on Windows with CMake. #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test - Switch (QEMU, Arm Cortex-M0,3,4) | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- name: "Configure CMake (Board: STM32F0DISCOVERY, CPU: Arm Cortex-M0)" | |
cmake_flags: -DVENDOR_STM32=ON -DTARGET_CORTEX_M0=ON -DTARGET_CPU_FAMILY=STM32F051x8 | |
cpu: cortex-m0 | |
board: STM32F0-Discovery | |
- name: "Configure CMake (Board: NUCLEOF103RB, CPU: Arm Cortex-M3)" | |
cmake_flags: -DVENDOR_STM32=ON -DTARGET_CORTEX_M3=ON -DTARGET_CPU_FAMILY=STM32F103xB | |
cpu: cortex-m3 | |
board: NUCLEO-F103RB | |
- name: "Configure CMake (Board: STM32F407DISC1, CPU: Arm Cortex-M4)" | |
cmake_flags: -DVENDOR_STM32=ON -DTARGET_CORTEX_M4=ON -DTARGET_CPU_FAMILY=STM32F407xx | |
cpu: cortex-m4 | |
board: STM32F4-Discovery | |
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | |
# You can convert this to a matrix build if you need cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install GCC arm-none-eabi | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
- name: GCC version | |
run: arm-none-eabi-gcc --version | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: ${{matrix.name}} | |
run: cmake -G "Unix Makefiles" -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=build/cmake/toolchain/arm-none-eabi-gcc.cmake ${{matrix.cmake_flags}} -DENABLE_LTO=ON -DENABLE_SMALL=ON -DBUILD_LIB=ON -DBUILD_TESTS=ON -DTEST_GENERIC=OFF -DTEST_SWITCH=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Docker build | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: build/test/qemu/Dockerfile | |
tags: stk-qemu:latest | |
load: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Prepare | |
run: chmod +x build/test/qemu/stk-qemu.sh && chmod +x build/test/qemu/test.sh | |
- name: Test (Switch) | |
run: sh build/test/qemu/test.sh ${{matrix.cpu}} ${{matrix.board}} ${{github.workspace}}/build/test/switch test-switch.elf |