chore: fix wrong order of project()
and cmake_minimum_required()
#126
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: Firmware Checks And Builds | |
on: | |
# run for all pull requests | |
# Run for all commits on feature branches | |
push: | |
paths: | |
- 'firmware/**' | |
- 'dsp/**' | |
- 'lib/**' | |
- '.github/workflows/**' | |
pull_request: | |
paths: | |
- 'firmware/**' | |
- 'dsp/**' | |
- 'lib/**' | |
- '.github/workflows/**' | |
jobs: | |
############################################################################### | |
# builds the firmware on arm-none-eabi-gcc | |
firmware-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install arm-none-eabi-gcc | |
uses: fiam/arm-none-eabi-gcc@v1 | |
with: | |
release: '10-2020-q4' # The arm-none-eabi-gcc release to use. | |
- name: Setup cmake | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '3.30.x' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Configure | |
run: cmake -S firmware -B firmware/build -G "Unix Makefiles" -D CMAKE_TOOLCHAIN_FILE="$(pwd)/lib/libDaisy/cmake/toolchains/stm32h750xx.cmake" -D CMAKE_BUILD_TYPE=RelWithDebInfo -D TOOLCHAIN_PREFIX=$(which arm-none-eabi-gcc | sed -e "s/bin\/arm-none-eabi-gcc//") | |
- name: Build | |
run: cmake --build firmware/build | |
- name: Upload Firmware hex | |
uses: actions/upload-artifact@v2 | |
with: | |
name: TapeLooper.hex | |
path: firmware/build/TapeLooper.hex | |
- name: Upload Firmware bin | |
uses: actions/upload-artifact@v2 | |
with: | |
name: TapeLooper.bin | |
path: firmware/build/TapeLooper.bin | |
############################################################################### | |
# builds the automated tests with clang; runs tests and exports results | |
firmware-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Build | |
run: | | |
cd firmware/tests | |
make release | |
- name: Run Tests | |
run: | | |
cd firmware/tests/build/bin | |
./TapeLooper_gtest --gtest_output=xml:gtestresults.xml | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
files: firmware/tests/build/bin/**/*.xml | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |