Skip to content

Commit 8854222

Browse files
authored
Merge pull request stm32duino#281 from angela-rph/CI
Implement travis CI build
2 parents 28d0aba + dbd75d7 commit 8854222

8 files changed

+1095
-0
lines changed

.travis.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
language: python
2+
python:
3+
- "3.6"
4+
os:
5+
- linux
6+
matrix:
7+
include:
8+
- env:
9+
- NAME= arduinoCI
10+
- IDE_VERSION=1.8.5
11+
# Use in CI/build/conf/path_config_travis.json
12+
- ARDUINO_IDE_PATH=$HOME/IDE/arduino
13+
install:
14+
# Install Arduino IDE
15+
- mkdir -p $ARDUINO_IDE_PATH
16+
- wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz
17+
- tar xf arduino-$IDE_VERSION-linux64.tar.xz --strip-components=1 -C $ARDUINO_IDE_PATH
18+
- rm arduino-$IDE_VERSION-linux64.tar.xz
19+
# Install STM32 core supported by ST
20+
- cd $ARDUINO_IDE_PATH
21+
# Add json packages url to the Arduino IDE
22+
- ./arduino --save-prefs --pref "boardsmanager.additional.urls=https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json"
23+
# Install the latest core version
24+
- ./arduino --install-boards STM32:stm32
25+
- rm -fr $HOME/.arduino15/packages/STM32/hardware/stm32/*
26+
# Replace default core with the one being built
27+
- sudo ln -s $TRAVIS_BUILD_DIR $HOME/.arduino15/packages/STM32/hardware/stm32/*
28+
before_script:
29+
- cd $TRAVIS_BUILD_DIR/CI/build/
30+
- cp ./conf/path_config_travis.json ./path_config.json
31+
script:
32+
- python arduino-builder.py --travis
33+
after_failure:
34+
- echo " The build is failed. If script return a non-zero return status , we suggest you to take the above logs into consideration. Otherwise, consult the TRAVIS CI documentation to learn more about build failure"
35+
notifications:
36+
email:
37+
on_success: always
38+
on_failure: always

CI/build/.flake8

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 88

CI/build/README.md

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# arduino-builder.py
2+
3+
This script manages _[arduino-builder](https://github.com/arduino/arduino-builder)_ command line tool for compiling Arduino sketch(es).
4+
5+
## Requirements
6+
- [Arduino IDE](https://www.arduino.cc/en/Main/Software) (_[arduino-builder](https://github.com/arduino/arduino-builder)_ is included)
7+
- Python version greater than or equal to 3.2 (due to `concurrent.futures` usage)
8+
9+
## Usage
10+
11+
```
12+
usage: arduino-builder.py [-h] [-l [{board,sketch}] | -a] [-b pattern] [-c]
13+
[--arch architecture]
14+
[--config <core configuration file>] [-v]
15+
[--bin | --travis]
16+
[-i <shetch filepath> | -f <sketches list filepath> | -s pattern | -e <excluded sketches list filepath>]
17+
18+
Manage arduino-builder command line tool for compiling Arduino sketch(es).
19+
20+
optional arguments:
21+
-h, --help show this help message and exit
22+
-l [{board,sketch}], --list [{board,sketch}]
23+
list available board(s) or sketch(es)
24+
-a, --all build all sketches found for all available boards
25+
-b pattern, --board pattern
26+
pattern to find one or more board(s) to build
27+
-c, --clean clean output directory
28+
<user patch config>/arduinoBuilderOutput
29+
--arch architecture core architecture to build. Default build architecture
30+
is stm32
31+
--config <core configuration file>
32+
JSON file containing the build configuration for one
33+
or more maintainer/architecture. Board options for
34+
build, applicability of sketches for boards or
35+
required options. If sketch is not listed then
36+
applicable to all board. Default core configuration is
37+
for 'stm32' architecture in: <user patch config>/arduino-
38+
builder/conf/cores_config.json
39+
-v, --verbose enable arduino-builder verbose mode
40+
--bin save binaries
41+
--travis Custom configuration for Travis CI build
42+
43+
Sketch(es) options:
44+
By default build <user patch config>/arduino/examples/01.Basics/Blink/Blink.ino
45+
46+
-i <shetch filepath>, --ino <shetch filepath>
47+
single ino file to build
48+
-f <sketches list filepath>, --file <sketches list filepath>
49+
file containing list of sketches to build
50+
-s pattern, --sketches pattern
51+
pattern to find one or more sketch to build
52+
-e <excluded sketches list filepath>, --exclude <excluded sketches list filepath>
53+
file containing pattern of sketches to ignore. Default
54+
path : <user patch config>/arduino-builder/conf/exclude_list.txt
55+
```
56+
57+
## Cores configuration files
58+
59+
ToDo
60+
61+
## Usage examples
62+
63+
ToDo
64+

0 commit comments

Comments
 (0)