jdbruijn / mplabx_travis-ci_example.x Goto Github PK
View Code? Open in Web Editor NEWExample MPLABX project with automated build on Travis CI
License: MIT License
Example MPLABX project with automated build on Travis CI
License: MIT License
When building on the Travis CI server the travis-install-dependencies.sh
script is called. This downloads and installs the MPLAB X IDE and compiler, where the IDE is around 550 MB and takes about a minute to install (strongly depending on the workload of the servers).
It would be nice to make shorten the time needed to download and install this IDE. To clarify, from the downloaded IDE only Java, the prjMakefilesGenerator.sh
script and the config file are used. This is about 200 MB and it would be quicker to install just the files that are needed for the build.
#!/bin/sh
export here=`dirname $0`
export mplabx_dir=$here/..
export netbeans_dir=$mplabx_dir
export development_netbeans_dir=$mplabx_dir/mplabide-nb-platform/nbbuild/netbeans
if [ -d $development_netbeans_dir ];
then export netbeans_dir=$development_netbeans_dir
fi
export gen_jar=$mplabx_dir/lib/PrjMakefilesGenerator.jar
export os=`uname`
# the file ../mplab_ide.conf contains the jdkhome. Extract this value.
# if you are using bash you can simply do:
# source ../etc/mplab_ide.conf
# instead of the following line
export eval `cat $here/../etc/mplab_ide.conf | sed -n /^jdkhome/p | sed -e 's/\"//g' -e 's/\/$//'`
export jvm=$jdkhome/bin/java
$jvm -jar $gen_jar "$@"
In this make file script the following variables are used.
Variable | Path (in my example build) | Additional information |
---|---|---|
here |
/opt/microchip/mplabx/v3.15/mplab_ide/bin |
|
mplabx_dir |
/opt/microchip/mplabx/v3.15/mplab_ide |
|
netbeans_dir |
/opt/microchip/mplabx/v3.15/mplab_ide |
|
development_netbeans_dir |
/opt/microchip/mplabx/v3.15/mplab_ide/mplabide-nb-platform/nbbuild/netbeans |
non existing directory |
gen_jar |
opt/microchip/mplabx/v3.15/mplab_ide/lib/PrjMakefilesGenerator.jar |
|
os |
Linux |
|
jdkhome |
/opt/microchip/mplabx/v3.15/sys/java/jre1.8.0_60 |
|
jvm |
/opt/microchip/mplabx/v3.15/sys/java/jre1.8.0_60/bin/java |
So at least the following files/folders would be needed to run this script.
File/folder | Path | Used for |
---|---|---|
mplab_ide.conf |
/opt/microchip/mplabx/v3.15/mplab_ide/etc/mplab_ide.conf |
extracting the jdkhome variable |
JDK home | /opt/microchip/mplabx/v3.15/sys/java/jre1.8.0_60 |
maby running the JVM |
jvm |
/opt/microchip/mplabx/v3.15/sys/java/jre1.8.0_60/bin/java |
running the JVM |
Which would result in a size of around 200 MB.
In order to reduce the time needed for downloading and installing this IDE a custom package for the IDE would need to be made. This package needs to contain at least the files and folders listed in the table above Along with the files of that script obviously. This would result in the following files and folders.
/opt/microchip/mplabx/v3.15/mplab_ide/bin/prjMakefilesGenerator.sh
/opt/microchip/mplabx/v3.15/mplab_ide/lib/PrjMakefilesGenerator.jar
/opt/microchip/mplabx/v3.15/mplab_ide/mplabide-nb-platform/nbbuild/netbeans *if it exists*
/opt/microchip/mplabx/v3.15/mplab_ide/etc/mplab_ide.conf
/opt/microchip/mplabx/v3.15/sys/java/jre1.8.0_60 *or maybe just the bin/java folder which is listed below*
/opt/microchip/mplabx/v3.15/sys/java/jre1.8.0_60/bin/java
It those files and folders could be placed in a .tar.gz
archive which would only need to be extracted it could result in reducing the time needed for the build with about 80 seconds, which would be about 40 % (based on a build time of 3 minutes).
prjMakefilesGenerator.sh
script still works;.tar.gz
archive containing the files and folders listed above;.tar.gz
archive on the new clean Linux VM and extract it;prjMakefilesGenerator.sh
script works;prjMakefilesGenerator.sh
script if needed and test again;.tar.gz
archive on a Travis CI build and measure the time needed for downloading and extracting the archive to see if the time is improved;.tar.gz
archive and create instructions on how to use it.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.