Giter Site home page Giter Site logo

mplabx_travis-ci_example.x's Introduction

Hi there ๐Ÿ‘‹

mplabx_travis-ci_example.x's People

Contributors

jdbruijn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mplabx_travis-ci_example.x's Issues

Faster build time

Info

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.

Generate make files script

#!/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.

Possible solution

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).

Steps

  • Create a clean Linux VM with the MPLAB X IDE installed and this MPLAB X project to test the make files generator script;
  • Find out whether the list above is complete by removing all the other files on the Linux machine and checking whether the prjMakefilesGenerator.sh script still works;
  • Create a custom .tar.gz archive containing the files and folders listed above;
  • Create a new clean Linux VM and clone this MPLAB X project on it;
  • Put the previously made .tar.gz archive on the new clean Linux VM and extract it;
  • Check whether the prjMakefilesGenerator.sh script works;
  • Adjust the prjMakefilesGenerator.sh script if needed and test again;
  • Test the created .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;
  • Release the .tar.gz archive and create instructions on how to use it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.