mirror of
https://github.com/candle-usb/candleLight_fw.git
synced 2025-01-14 05:42:53 +08:00
add matrix build for separate artifacts
This commit is contained in:
parent
2a1e2943d9
commit
c03d01a2cb
38
.github/workflows/ci.yml
vendored
38
.github/workflows/ci.yml
vendored
@ -1,33 +1,53 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
schedule:
|
||||||
|
# build every day at 00:15 UTC
|
||||||
|
- cron: '15 0 * * *'
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: Release
|
BUILD_TYPE: Release
|
||||||
|
CMAKE_TOOLCHAIN_FILE: cmake/gcc-arm-none-eabi-8-2019-q3-update.cmake
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target:
|
||||||
|
- "cantact"
|
||||||
|
- "canalyze"
|
||||||
|
- "canable"
|
||||||
|
- "usb2can"
|
||||||
|
- "cannette"
|
||||||
|
- "candleLight"
|
||||||
|
- "STM32F4_DevBoard"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
run: sudo apt-get -y install gcc-arm-none-eabi
|
run: sudo apt-get -yq install gcc-arm-none-eabi
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cmake/gcc-arm-none-eabi-8-2019-q3-update.cmake
|
run: |
|
||||||
|
cmake -B ${{github.workspace}}/build \
|
||||||
|
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/${{env.CMAKE_TOOLCHAIN_FILE}}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
|
env:
|
||||||
|
MAKEFLAGS: "-j4"
|
||||||
|
run: |
|
||||||
|
cmake --build ${{github.workspace}}/build \
|
||||||
|
--config ${{env.BUILD_TYPE}} \
|
||||||
|
--target ${{matrix.target}}_fw
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload Build Artifacts
|
||||||
uses: actions/upload-artifact@v2.3.1
|
uses: actions/upload-artifact@v2.3.1
|
||||||
with:
|
with:
|
||||||
name: firmware
|
name: ${{matrix.target}}_firmware
|
||||||
path: ${{github.workspace}}/build/*_fw.bin
|
path: ${{github.workspace}}/build/${{matrix.target}}_fw.bin
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user