Skip to content

Merge pull request #112 from adafruit/samd-1.7.15-nrf-1.6.1 #172

Merge pull request #112 from adafruit/samd-1.7.15-nrf-1.6.1

Merge pull request #112 from adafruit/samd-1.7.15-nrf-1.6.1 #172

Workflow file for this run

name: Build
on:
pull_request:
paths: 'package_adafruit_index.json'
push:
paths: 'package_adafruit_index.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Checkout code
uses: actions/checkout@v3
- 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
run: |
# Replace url with localhost
sed -i 's/https:\/\/adafruit.github.io\/arduino-board-index/http:\/\/localhost:8000/g' package_adafruit_index.json
# Run local test server
python3 -m http.server & BSP_URL=`echo http://localhost:8000/package_adafruit_index.json`
echo $BSP_URL
arduino-cli config init
arduino-cli core update-index
arduino-cli core update-index --additional-urls $BSP_URL
arduino-cli core install adafruit:samd --additional-urls $BSP_URL
arduino-cli core install arduino:avr --additional-urls $BSP_URL
arduino-cli core install adafruit:avr --additional-urls $BSP_URL
arduino-cli core install adafruit:nrf52 --additional-urls $BSP_URL
- name: Build examples
run: python3 examples/build_all.py