From f452af725a89e76d9829363634077d18581f61d7 Mon Sep 17 00:00:00 2001 From: Gabriel Burnworth Date: Tue, 11 Feb 2020 10:40:45 -0800 Subject: [PATCH] add ci --- .circleci/config.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..bfa30c4 --- /dev/null +++ b/.circleci/config.yml @@ -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