Skip to content

Running Boot on CI systems

Donald Ball edited this page Oct 13, 2016 · 15 revisions

CircleCI

Challenges

  • Circle saves the cache after dependencies step so files downloaded in test step are not cached
    • Solution: Run tests in dependencies step
  • Boot sometimes uses over 4G memory when downloading deps
    • Set _JAVA_OPTIONS

circle.yml

machine:
  java:
    version: oraclejdk8
  environment:
    # Boot sometimes uses over 4G when dowloading deps
    # Limit could be higher probably, 2-3G?
    _JAVA_OPTIONS: "-Xms512m -Xmx1024m"
dependencies:
  pre:
    # Could use `latest` tag instead of version number
    - curl -L https://github.com/boot-clj/boot-bin/releases/download/2.5.2/boot.sh -o ~/bin/boot
    - chmod +x ~/bin/boot
  override:
    # Run tests here so everything loaded by test task is cached
    - boot run-tests
  cache_directories:
    - "~/bin"
    - "~/.m2"
    - "~/.boot/cache"
test:
  override:
    # Nothing to run here
    - echo 1

Travis

sudo: false
language: java
script: boot run-tests
install:
  - mkdir -p ~/bin
  - export PATH=~/bin:$PATH
  # Could use `latest` tag instead of version number
  - curl -L https://github.com/boot-clj/boot-bin/releases/download/2.5.2/boot.sh -o ~/bin/boot
  - chmod +x ~/bin/boot
env:
  matrix:
    # Runs tests twice, using Clj 1.7 and 1.8
    - BOOT_CLOJURE_VERSION=1.7.0
    - BOOT_CLOJURE_VERSION=1.8.0
jdk:
  - oraclejdk8
cache:
  directories:
  - $HOME/.m2
  - $HOME/.boot/cache/bin
  - $HOME/.boot/cache/lib
  - $HOME/bin
Clone this wiki locally