64 lines
2.7 KiB
YAML
64 lines
2.7 KiB
YAML
name: Build
|
|
|
|
on: [pull_request, push]
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
arduino-platform: ['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
|
|
|
|
- name: Checkout submodules
|
|
shell: bash
|
|
run: |
|
|
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
git submodule sync --recursive
|
|
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive
|
|
|
|
- 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
|
|
# FIXME use arduino-cli 0.7.2 due to 0.9.0/IDE 1.8.2 precompiled hanlding broke nRFCypto
|
|
# https://github.com/arduino/arduino-builder/issues/353
|
|
#curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
|
|
wget https://github.com/arduino/arduino-cli/releases/download/0.7.2/arduino-cli_0.7.2_Linux_64bit.tar.gz
|
|
mkdir bin
|
|
tar -xf arduino-cli_0.7.2_Linux_64bit.tar.gz -C bin
|
|
echo "::add-path::$GITHUB_WORKSPACE/bin"
|
|
|
|
- name: Install BSP and Libraries
|
|
env:
|
|
BSP_URL: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
|
|
BSP_PATH: .arduino15/packages/adafruit/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 adafruit: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 BMP280 Library" "Adafruit Circuit Playground" "Adafruit EPD" "Adafruit GFX Library" "Adafruit HX8357 Library" "Adafruit ILI9341" "Adafruit LIS3MDL" "Adafruit LSM6DS" "Adafruit NeoPixel" "Adafruit NeoMatrix" "Adafruit nRFCrypto" "Adafruit Sensor Calibration" "Adafruit SHT31 Library" "Adafruit SSD1306" "Adafruit ST7735 and ST7789 Library" "Firmata" "MIDI Library" "SdFat - Adafruit Fork"
|
|
|
|
- name: Build examples
|
|
run: python3 tools/build_all.py ${{ matrix.arduino-platform }}
|