* WIP.. : petite erreur de signe.. #119
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: Compile Firmware | |
on: | |
push: | |
branches: [ master, develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-18.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install dependencies | |
run: sudo apt-get update && sudo apt-get install cmake gcc-arm-none-eabi | |
- name: create build directory | |
run: mkdir build | |
- name: create build directory for release | |
run: mkdir build/release | |
- name: create build directory for debug | |
run: mkdir build/debug | |
# release build | |
- name: run cmake | |
run: cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/gcc-stm32f303xe.toolchain -DCMAKE_BUILD_TYPE=Release ../.. | |
working-directory: ./build/release | |
- name: run cmake build | |
run: cmake --build . | |
working-directory: ./build/release | |
# debug build | |
- name: run cmake | |
run: cmake -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/gcc-stm32f303xe.toolchain -DCMAKE_BUILD_TYPE=Debug ../.. | |
working-directory: ./build/debug | |
- name: run cmake build | |
run: cmake --build . | |
working-directory: ./build/debug | |
# upload artifacts for release | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: firmware.elf | |
path: build/release/firmware/firmware.elf | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: firmware.hex | |
path: build/release/firmware/firmware.hex | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: firmware.bin | |
path: build/release/firmware/firmware.bin | |
# upload artifacts for debug | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: debug_firmware.elf | |
path: build/debug/firmware/firmware.elf | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: debug_firmware.hex | |
path: build/debug/firmware/firmware.hex | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: debug_firmware.bin | |
path: build/debug/firmware/firmware.bin |