Skip to content

Commit 411cfa6

Browse files
committed
test metro_m0 build
1 parent 137c0bd commit 411cfa6

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/githubci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Build
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
build:
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
arduino-platform: ['metro_m0']
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Setup Python
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Checkout submodules
24+
shell: bash
25+
run: |
26+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
27+
git submodule sync --recursive
28+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive
29+
30+
- name: Install Arduino CLI and Tools
31+
run: |
32+
pip3 install adafruit-nrfutil
33+
# make all our directories we need for files and libraries
34+
mkdir $HOME/.arduino15
35+
mkdir $HOME/.arduino15/packages
36+
mkdir $HOME/Arduino
37+
mkdir $HOME/Arduino/libraries
38+
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
39+
echo "::add-path::$GITHUB_WORKSPACE/bin"
40+
41+
- name: Install BSP and Libraries
42+
env:
43+
BSP_URL: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
44+
BSP_PATH: .arduino15/packages/adafruit/hardware/samd
45+
run: |
46+
arduino-cli config init
47+
arduino-cli core update-index
48+
arduino-cli core update-index --additional-urls $BSP_URL
49+
arduino-cli core install arduino:samd --additional-urls $BSP_URL
50+
arduino-cli core install adafruit:samd --additional-urls $BSP_URL
51+
# Repalce release BSP with our code
52+
BSP_VERSION=`eval ls $HOME/$BSP_PATH`
53+
rm -r $HOME/$BSP_PATH/*
54+
ln -s $GITHUB_WORKSPACE $HOME/$BSP_PATH/$BSP_VERSION
55+
arduino-cli lib install "FlashStorage"
56+
57+
- name: Build examples
58+
run: python3 tools/build_all.py ${{ matrix.arduino-platform }}

libraries/USBHost/examples/USB_desc/USB_desc.ino

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,3 +382,4 @@ void printProgStr(const prog_char str[])
382382
if(!str) return;
383383
while((c = pgm_read_byte(str++)))
384384
SerialDebug.print(c);
385+
}

0 commit comments

Comments
 (0)