-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (30 loc) · 1.09 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CI/CD - MCU
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
types:
- opened
- synchronize
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install tools
run: |
chmod +x .github/workflows/compiler.sh
.github/workflows/compiler.sh
- name: Compile code
run: |
arduino-cli compile -b esp32:esp32:esp32 -o output.bin
- name: Execute tests
run: |
if [ -e "./tests/test_main.cpp" ]; then make all; test_log=$(./build/PlanckUnit); echo "Test log:"; echo "$test_log"; [[ $test_log == *"FAILURE"* ]] && { echo "Test log contains FAILURE. Exiting with code 1."; exit 1; } || { echo "Test log does not contain FAILURE. Continuing."; exit 0; }; fi
- name: Send binary
run: |
curl --fail-with-body --location 'https://up-mongrel-upward.ngrok-free.app/github/binaries/' --form 'repository="${{ github.repository }}"' --form 'sha="${{ github.sha }}"' --form 'binary=@"./output.bin"'