I have a few Github OSS hosted libraries aimed at running on multiple MCUs and I wish to set up Travis in order to have them built and tested (if possible) automatically. I have run multiple searches and found a couple o different approaches, but none seems satisfying.
I believe there should be a simple solution and I'm here asking for help and knowledge share.
One of the projects I'm going to apply the solution is going to be https://github.com/rlogiacco/MicroDebug , where you can find all my failing tries in the recent history changes.
Thanks!
Apparently Adafruit has got a solution published here which I expanded a bit further on the project I was pointing in my question.
You can get a full working example travis configuration file on my MicroDebug project.
This worked great for me. One suggested change:
I made a variable in what is essentially going to be executed as a bash script. The top of my script looks like this
language: c
before_install:
- ARD_VER="1.8.0"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16"
- sleep 5
- export DISPLAY=:1.0
- echo "Downloading version $ARD_VER of the Arduino IDE..."
- wget http://downloads.arduino.cc/arduino-$ARD_VER-linux64.tar.xz
- echo "Extracting the Arduino IDE..."
- tar xf arduino-$ARD_VER-linux64.tar.xz
- echo "Moving Arduino IDE..."
- sudo mv arduino-$ARD_VER /usr/local/share/arduino
- echo "Linking Arduino IDE..."
- sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino
- echo "Removing Arduino IDE ver $ARD_VER tar that was downloaded..."
- rm arduino-$ARD_VER-linux64.tar.xz
install:
# ....the rest of the .travis.yml file goes below here...
So, this way, I can simply modify the Arduino IDE version number put into the ARD_VER
variable and I can then test with the most recent version of Arduino! Yay!
Kind of a simple/stupid addition, but I thought it was worth mentioning.
Cheers!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.