Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-pico
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-pico
Commits
fd4f7bbf
Unverified
Commit
fd4f7bbf
authored
May 23, 2021
by
Earle F. Philhower, III
Committed by
GitHub
May 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add TinyUSB examples to CI (#163)
parent
77eae66c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
86 additions
and
14 deletions
+86
-14
.github/workflows/pull-request.yml
.github/workflows/pull-request.yml
+33
-3
libraries/Adafruit_TinyUSB_Arduino
libraries/Adafruit_TinyUSB_Arduino
+1
-1
tests/build-tinyusb.sh
tests/build-tinyusb.sh
+36
-0
tests/build.sh
tests/build.sh
+1
-2
tests/common.sh
tests/common.sh
+11
-4
tests/run_CI_locally.sh
tests/run_CI_locally.sh
+4
-4
No files found.
.github/workflows/pull-request.yml
View file @
fd4f7bbf
...
...
@@ -9,6 +9,7 @@ on:
jobs
:
# Me no spell so good
code-spell
:
name
:
Check spelling
runs-on
:
ubuntu-latest
...
...
@@ -25,13 +26,13 @@ jobs:
skip
:
./pico-extras,./ArduinoCore-API,./libraries/SdFat,./libraries/Adafruit_TinyUSB_Arduino,./libraries/LittleFS/lib,./tools/pyserial,./pico-sdk,./.github,./docs/i2s.rst
ignore_words_list
:
ser,DOUT
# Build all examples on linux (core and Arduino IDE)
build-linux
:
name
:
Build ${{ matrix.chunk }}
runs-on
:
ubuntu-latest
strategy
:
matrix
:
chunk
:
[
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
]
chunk
:
[
0
,
1
,
2
,
3
]
steps
:
-
uses
:
actions/checkout@v2
with
:
...
...
@@ -50,7 +51,7 @@ jobs:
TRAVIS_BUILD_DIR
:
${{ github.workspace }}
TRAVIS_TAG
:
${{ github.ref }}
BUILD_PARITY
:
custom
mod
:
8
mod
:
4
rem
:
${{ matrix.chunk }}
run
:
|
cd pico-sdk
...
...
@@ -60,6 +61,35 @@ jobs:
cd ..
bash ./tests/build.sh
# Build TinyUSB examples, requires custom build command line
build-tinyusb
:
name
:
Build TinyUSB Examples
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v2
with
:
submodules
:
true
-
uses
:
actions/setup-python@v2
with
:
python-version
:
'
3.x'
-
name
:
Cache Linux toolchain
id
:
cache-linux
uses
:
actions/cache@v2
with
:
path
:
./tools/dist
key
:
${{ runner.os }}-${{ hashFiles('package/package_pico_index.template.json', 'tests/common.sh') }}
-
name
:
Build Sketches
env
:
TRAVIS_BUILD_DIR
:
${{ github.workspace }}
TRAVIS_TAG
:
${{ github.ref }}
BUILD_PARITY
:
custom
run
:
|
cd pico-sdk
git submodule update --init
cd ../pico-extras
git submodule update --init
cd ..
bash ./tests/build-tinyusb.sh
# Single build under Windows to ensure the Win toolchain is good.
build-windows
:
...
...
Adafruit_TinyUSB_Arduino
@
d26aa1bb
Subproject commit
1b8b9c9b071065235341d0e503f2d6d05de19524
Subproject commit
d26aa1bbd2c5563b3a96ab4a3acccecbd91bb690
tests/build-tinyusb.sh
0 → 100755
View file @
fd4f7bbf
#!/usr/bin/env bash
cache_dir
=
$(
mktemp
-d
)
source
"
$TRAVIS_BUILD_DIR
"
/tests/common.sh
install_arduino nodebug
# Replace the skip function to only build TinyUSB tests
function
skip_ino
()
{
local
ino
=
$1
local
skiplist
=
""
echo
$ino
|
grep
-q
Adafruit_TinyUSB_Arduino
if
[
$?
-eq
0
]
;
then
# Add items to the following list with "\n" netween them to skip running. No spaces, tabs, etc. allowed
read
-d
''
skiplist
<<
EOL
|| true
/mouse_external_flash/
/hid_keyboard/
/msc_external_flash/
/msc_external_flash_sdcard/
/msc_sdfat/
/msc_sd/
/midi_pizza_box_dj/
/hid_composite_joy_featherwing/
EOL
echo
$ino
|
grep
-q
-F
"
$skiplist
"
echo
$((
1
-
$?
))
else
echo
1
fi
}
build_sketches_with_arduino 1 0
"--usbstack tinyusb"
rm
-rf
"
$cache_dir
"
tests/build.sh
View file @
fd4f7bbf
...
...
@@ -16,7 +16,6 @@ elif [ "$BUILD_PARITY" = "odd" ]; then
fi
install_arduino nodebug
build_sketches_with_arduino
"
$mod
"
"
$rem
"
build_sketches_with_arduino
"
$mod
"
"
$rem
"
""
rm
-rf
"
$cache_dir
"
tests/common.sh
View file @
fd4f7bbf
...
...
@@ -65,6 +65,7 @@ function build_sketches()
local
build_dir
=
build.tmp
local
build_mod
=
$4
local
build_rem
=
$5
mkdir
-p
$build_dir
local
build_cmd
=
"python3 tools/build.py -b generic -v -w all -v -k --build_cache
$cache_dir
-p ./
$build_dir
$build_arg
"
if
[
"
$WINDOWS
"
=
"1"
]
;
then
...
...
@@ -149,8 +150,13 @@ function install_libraries()
pushd
$HOME
/Arduino/libraries
# install ArduinoJson library
{
test
-r
ArduinoJson-v6.11.0.zip
||
curl
--output
ArduinoJson-v6.11.0.zip
-L
https://github.com/bblanchon/ArduinoJson/releases/download/v6.11.0/ArduinoJson-v6.11.0.zip
;
}
&&
unzip
-q
ArduinoJson-v6.11.0.zip
{
test
-r
ArduinoJson-v6.11.0.zip
||
curl
-sS
--output
ArduinoJson-v6.11.0.zip
-L
https://github.com/bblanchon/ArduinoJson/releases/download/v6.11.0/ArduinoJson-v6.11.0.zip
;
}
&&
unzip
-qo
ArduinoJson-v6.11.0.zip
{
test
-r
Adafruit_SPIFlash-3.4.1.zip
||
curl
-sS
--output
Adafruit_SPIFlash-3.4.1.zip
-L
https://github.com/adafruit/Adafruit_SPIFlash/archive/refs/tags/3.4.1.zip
;
}
&&
unzip
-qo
Adafruit_SPIFlash-3.4.1.zip
{
test
-r
Adafruit_Seesaw-1.4.3.zip
||
curl
-sS
--output
Adafruit_Seesaw-1.4.3.zip
-L
https://github.com/adafruit/Adafruit_Seesaw/archive/refs/tags/1.4.3.zip
;
}
&&
unzip
-qo
Adafruit_Seesaw-1.4.3.zip
{
test
-r
Adafruit_BusIO-1.7.3.zip
||
curl
-sS
--output
Adafruit_BusIO-1.7.3.zip
-L
https://github.com/adafruit/Adafruit_BusIO/archive/refs/tags/1.7.3.zip
;
}
&&
unzip
-qo
Adafruit_BusIO-1.7.3.zip
{
test
-r
Adafruit_CircuitPlayground-1.11.3.zip
||
curl
-sS
--output
Adafruit_CircuitPlayground-1.11.3.zip
-L
https://github.com/adafruit/Adafruit_CircuitPlayground/archive/refs/tags/1.11.3.zip
;
}
&&
unzip
-qo
Adafruit_CircuitPlayground-1.11.3.zip
{
test
-r
Adafruit_NeoPixel-1.8.1.zip
||
curl
-sS
--output
Adafruit_NeoPixel-1.8.1.zip
-L
https://github.com/adafruit/Adafruit_NeoPixel/archive/refs/tags/1.8.1.zip
;
}
&&
unzip
-qo
Adafruit_NeoPixel-1.8.1.zip
{
test
-r
Arduino_MIDI_Library-5.0.2.zip
||
curl
-sS
--output
Arduino_MIDI_Library-5.0.2.zip
-L
https://github.com/FortySevenEffects/arduino_midi_library/archive/refs/tags/5.0.2.zip
;
}
&&
unzip
-qo
Arduino_MIDI_Library-5.0.2.zip
popd
}
...
...
@@ -236,11 +242,12 @@ function build_sketches_with_arduino()
{
local
build_mod
=
$1
local
build_rem
=
$2
local
build_extra
=
$3
# Compile sketches
echo
-e
"travis_fold:start:sketch_test"
build_sketches
$HOME
/arduino_ide
$HOME
/arduino_ide/examples
"-l
$HOME
/Arduino/libraries"
$build_mod
$build_rem
build_sketches
$HOME
/arduino_ide
$TRAVIS_BUILD_DIR
/libraries
"-l
$HOME
/Arduino/libraries"
$build_mod
$build_rem
build_sketches
$HOME
/arduino_ide
$HOME
/arduino_ide/examples
"-l
$HOME
/Arduino/libraries
${
build_extra
}
"
$build_mod
$build_rem
build_sketches
$HOME
/arduino_ide
$TRAVIS_BUILD_DIR
/libraries
"-l
$HOME
/Arduino/libraries
${
build_extra
}
"
$build_mod
$build_rem
echo
-e
"travis_fold:end:sketch_test"
# Generate size report
...
...
tests/run_CI_locally.sh
View file @
fd4f7bbf
...
...
@@ -53,7 +53,7 @@ while true; do
cat
<<
EOF
Which build?
1. main
2.
main + IPv6
2.
tinyusb
4. debug even
5. debug odd
6. platformio
...
...
@@ -67,7 +67,7 @@ EOF
BUILD_TYPE
=
""
case
"
$answer
"
in
1
)
BUILD_TYPE
=
build
;;
2
)
BUILD_TYPE
=
build
6
;;
2
)
BUILD_TYPE
=
build
_tinyusb
;;
4
)
BUILD_TYPE
=
debug_even
;;
5
)
BUILD_TYPE
=
debug_odd
;;
6
)
BUILD_TYPE
=
platformio
;;
...
...
@@ -99,8 +99,8 @@ elif [ "$BUILD_TYPE" = "debug_even" ]; then
elif
[
"
$BUILD_TYPE
"
=
"debug_odd"
]
;
then
BUILD_PARITY
=
odd tests/debug.sh
elif
[
"
$BUILD_TYPE
"
=
"build
6
"
]
;
then
tests/build
6
.sh
elif
[
"
$BUILD_TYPE
"
=
"build
_tinyusb
"
]
;
then
tests/build
-tinyusb
.sh
elif
[
"
$BUILD_TYPE
"
=
"build6_even"
]
;
then
BUILD_PARITY
=
even tests/build6.sh
elif
[
"
$BUILD_TYPE
"
=
"build6_odd"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment