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