-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (60 loc) · 2.72 KB
/
githubci.yml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build
on: [pull_request, push]
jobs:
build:
strategy:
fail-fast: false
matrix:
arduino-platform:
# Alphabetical order
- 'cluenrf52840'
- 'cplaynrf52840'
- 'feather52832'
- 'feather52840'
- 'feather52840sense'
- 'itsybitsy52840'
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: 'true'
- name: Install Arduino CLI and Tools
run: |
pip3 install adafruit-nrfutil
# make all our directories we need for files and libraries
mkdir $HOME/.arduino15
mkdir $HOME/.arduino15/packages
mkdir $HOME/Arduino
mkdir $HOME/Arduino/libraries
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
- name: Install BSP and Libraries
env:
BSP_URL: https://soburi.github.io/openthread_nrf52_arduino/package_soburi_otnrf52_index.json
BSP_PATH: .arduino15/packages/soburi/hardware/nrf52
run: |
arduino-cli config init
arduino-cli core update-index
arduino-cli core update-index --additional-urls $BSP_URL
arduino-cli core install soburi:nrf52 --additional-urls $BSP_URL
# Repalce release BSP with our code
BSP_VERSION=`eval ls $HOME/$BSP_PATH`
rm -r $HOME/$BSP_PATH/*
ln -s $GITHUB_WORKSPACE $HOME/$BSP_PATH/$BSP_VERSION
# Install library dependency
arduino-cli lib install "Adafruit AHRS" "Adafruit APDS9960 Library" "Adafruit Arcada Library" "Adafruit BMP280 Library" "Adafruit Circuit Playground" "Adafruit EPD" "Adafruit GFX Library" "Adafruit HX8357 Library" "Adafruit ILI9341" "Adafruit LIS3MDL" "Adafruit LSM6DS" "Adafruit NeoPixel" "Adafruit NeoMatrix" "Adafruit Sensor Calibration" "Adafruit SHT31 Library" "Adafruit SSD1306" "Adafruit ST7735 and ST7789 Library" "SdFat - Adafruit Fork"
arduino-cli lib install "Arduino_TensorFlowLite" "MIDI Library"
# TODO use firmata master to prevent build error with gcc v9 (should be remove after 2.5.9 is released)
# https://github.com/firmata/arduino/pull/438
git clone --depth 1 https://github.com/firmata/arduino.git $HOME/Arduino/libraries/firmata
# TODO temporarily remove TinyUSB pre-1.0.0 version install by arduino-cli
rm -r $HOME/Arduino/libraries/Adafruit_TinyUSB_Library
# Library summary
arduino-cli lib list
- name: Build examples
run: python3 tools/build_all.py ${{ matrix.arduino-platform }}