Support for RISC-V. #89
Workflow file for this run
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 - Generic (QEMU, Arm Cortex-M4) | |
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: 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 -DBUILD_LIB=ON -DBUILD_TESTS=ON -DTEST_GENERIC=ON | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --parallel 4 | |
# note: Replaced with [Setup Docker Buildx] and [Docker build] below to benefit from GitHub caching (Docker image not built on every pass) | |
#- name: Docker build | |
#run: docker build --pull --rm -f "build/test/qemu/Dockerfile" -t stk-qemu:latest "build/test/qemu" | |
- 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 (Generic) | |
run: sh build/test/qemu/test.sh ${{matrix.cpu}} ${{matrix.board}} ${{github.workspace}}/build/test/generic test-generic.elf |