add ci
parent
6f7d55d2c6
commit
f452af725a
|
@ -0,0 +1,43 @@
|
|||
version: 2.1
|
||||
|
||||
jobs:
|
||||
build:
|
||||
machine: true
|
||||
parameters:
|
||||
arduino_version:
|
||||
description: "Arduino version"
|
||||
default: "1.8.11"
|
||||
type: string
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- arduino-<< parameters.arduino_version >>
|
||||
- run:
|
||||
name: Install Arduino
|
||||
command: |
|
||||
if [ ! -d "$HOME/arduino-<< parameters.arduino_version >>" ]
|
||||
then
|
||||
wget https://downloads.arduino.cc/arduino-<< parameters.arduino_version >>-linux64.tar.xz
|
||||
tar xf arduino-<< parameters.arduino_version >>-linux64.tar.xz -C $HOME
|
||||
fi
|
||||
- save_cache:
|
||||
key: arduino-<< parameters.arduino_version >>
|
||||
paths:
|
||||
- ~/arduino-<< parameters.arduino_version >>
|
||||
- run:
|
||||
name: Compile
|
||||
command: make
|
||||
- run:
|
||||
name: Check strings
|
||||
command: make strings_test
|
||||
- run:
|
||||
name: Check software version
|
||||
command: |
|
||||
export SOFTWARE_VERSION=$(cat src/Config.h | grep -w SOFTWARE_VERSION | cut -d'"' -f 2 | cut -d'\' -f 1)
|
||||
strings bin/arduino_firmware.hex.bin | grep $SOFTWARE_VERSION
|
||||
mkdir bin/$SOFTWARE_VERSION
|
||||
rm bin/*.bin
|
||||
mv bin/*.hex bin/$SOFTWARE_VERSION
|
||||
- store_artifacts:
|
||||
path: bin
|
Loading…
Reference in New Issue