54 lines
1.2 KiB
YAML
Raw Normal View History

name: CI
on:
schedule:
# build every day at 00:15 UTC
- cron: '15 0 * * *'
push:
pull_request:
branches: [ master ]
env:
BUILD_TYPE: Release
CMAKE_TOOLCHAIN_FILE: cmake/gcc-arm-none-eabi-8-2019-q3-update.cmake
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- "cantact"
- "canalyze"
- "canable"
- "usb2can"
- "cannette"
- "candleLight"
- "STM32F4_DevBoard"
steps:
- uses: actions/checkout@v2
- name: Install toolchain
run: sudo apt-get -yq install gcc-arm-none-eabi
- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/${{env.CMAKE_TOOLCHAIN_FILE}}
- name: Build
env:
MAKEFLAGS: "-j"
run: |
cmake --build ${{github.workspace}}/build \
--config ${{env.BUILD_TYPE}} \
--target ${{matrix.target}}_fw
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2.3.1
with:
name: ${{matrix.target}}_firmware
path: ${{github.workspace}}/build/${{matrix.target}}_fw.bin