decent_ci

RuboCop Unit Tests Coverage Status Maintainability

Forked from https://github.com/lefticus/decent_ci, tailored to EnergyPlus specific needs. If you are using this fork of it for anything other than EnergyPlus, please be aware we are not guaranteeing anything stable here.

Decent CI is a decentralized continuous integration system for cmake based projects designed for use with github.

It queries a given repository for a the set of branches and pull requests. The project is written in ruby and requires:

  • ruby
    • octokit gem
    • activesupport gem
  • git

To configure your application for use with Decent CI, you need put appropriate .decent_ci*.yml files in the root of your project. Only branches which contain the required files will be tested.

Examples can be found in the confs folder.

Decent CI is tested on Windows, Linux and MacOS.

Windows Installation / Usage

TO BE UPDATED

  1. Install git bash http://git-scm.com/download/win
  2. Install python https://www.python.org/downloads/ add it to the path (needed for energyplus regressions)
  3. Install ruby 2.0+ http://rubyinstaller.org/downloads/ add it to the path
  4. Install cmake http://www.cmake.org/cmake/resources/software.html add it to the path
  5. Install mingw fortran if desired (for EnergyPlus) add it to the path
  6. Download the updated windows ssl certificate file and add SSL_CERT_FILE environment variable pointing to it. See here: https://gist.github.com/fnichol/867550
  7. gem install octokit activesupport
  8. Get gist from here https://gist.github.com/lefticus/10914850
  9. Create github token for the user
  10. Launch git bash, execute ruby ./run_ci.rb <build_folder> <true/false test mode> <token> <respository>

MacOS Installation / Usage

  1. Install ruby gems octokit and activesupport. You may need to follow these instructions http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul, then sudo gem install octokit activesupport
  2. Need to get-pip: curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py, then sudo python get-pip.py
  3. Install Python deps: sudo pip install boto beautifulsoup4 soupsieve
  4. Install CMake (download from web), install command line tools
  5. Install GFortran (download from https://github.com/fxcoudert/gfortran-for-macOS/releases)
  6. Install MacTeX (download from web)
  7. Install IFW (download from https://download.qt.io/official_releases/qt-installer-framework/)
  8. You'll then want to symlink the binarycreator somewhere on PATH so CMake picks it up
  9. Need to consider CCache
  10. Get gist from here https://gist.github.com/c51580a92556ef344216c22ec390aa31.git
  11. Create github token for the user
  12. Execute ruby ./run_ci.rb <build_folder> <true/false test mode> <token> <respository>

Linux Installation / Usage

sudo apt-get install git cmake g++ gfortran cmake-curses-gui curl ccache python-pip texlive-full valgrind lcov gcovr clang-format cppcheck
pip install boto beautifulsoup4 soupsieve
sudo gem install activesupport octokit
cd ~
mkdir ~/ci
git clone https://gist.github.com/c51580a92556ef344216c22ec390aa31.git ci_script
cd ci_script
ruby run_ci.rb ~/ci <AWS_STUFF> <true/false test mode> <GH_TOKEN> NREL/EnergyPlus

Documentation

Documentation is currently stubbed out, and needs to be fully fleshed out. In any case, the docs are built using Yard. To get started, gem install yard or bundle it from the doc section of the Gemfile. Then from the root of the repo, just run yardoc, and it will scan the lib directory, generating html docs and dropping them into the docs/ folder. GitHub then hosts the documentation on the GitHub page: https://myoldmopar.github.io/decent_ci/