GithubHelp home page GithubHelp logo

rs-13-11 / gravis-ci Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danysk/gravis-ci

0.0 0.0 0.0 32 KB

Set of scripts for running Java / Gradle / Maven builds on Travis CI on Windows, Linux, and MacOS (via Jabba)

Shell 100.00%

gravis-ci's Introduction

I am frankly tired of Travis CI's Java builds to fail continuously due to errors in downloading and installing the JDK. As @sormuras pointed out, they are abusing the great install-jdk.sh tool.

The consequences are low reliability for Java builds, which defeat the point of having the continuous integration in place. Plus, currently Java is not supported under Windows.

Time to end this. This project is meant to provide a number of script to be used in Java builds on Travis CI for running Java. The project is focused on Gradle, as it's my favourite tool, but could be of use for Maven, Ant, and SBT users as well.

We rely on Jabba to install the JDK, kudos to them!

Usage

Base idea: download the scripts from GitHub and run them. Here is the relevant part of your .travis.yml. Code comments contain relevant details, please read them.

# Java is not yet supported on Windows, so the build would block.
# You do not need any setup from Travis, use a plain bash build
language: bash
# Enable them all, if you need them.
os:
  - linux
  - osx
  - windows
env:
    # This is a convenience variable for shortening download commands
    - GRAVIS="https://raw.githubusercontent.com/DanySK/Gravis-CI/master/"
  matrix:
    # List any JDK you want to build your software with.
    # You can see the list of supported environments by installing Jabba and using ls-remote:
    # https://github.com/shyiko/jabba#usage
    - JDK="[email protected]"
    - JDK="[email protected]"
before_install:
  # Download the script
  - curl "${GRAVIS}.install-jdk-travis.sh" --output .install-jdk-travis.sh
  # Download, install, configue the JDK, and export the configuration to the current shell
  - source ~/.install-jdk-travis.sh
# This is your main script
script:
  # Just an example. Do what you deem useful
  - ./gradlew clean check --scan --parallel
# If you use Gradle, cleanup the build cache from lock/temporary files
before_cache:
  - curl "${GRAVIS}.clean_gradle_cache.sh" --output .clean_gradle_cache.sh
  - bash .clean_gradle_cache.sh
cache:
  directories:
    # This avoids re-downloading the JDK every time, but Travis recommends not to do it
    # - $HOME/.jabba/
    # If you use Gradle, you may want to save some time with caching
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

Contributing to the project

I gladly review pull requests and I'm happy to improve the work. If the software was useful to you, please consider supporting my development activity paypal

gravis-ci's People

Contributors

danysk avatar w4bo avatar

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.