Skip to content

Commit

Permalink
Add Travis CI
Browse files Browse the repository at this point in the history
Run Travis each time we push.
  • Loading branch information
david-christiansen committed Jan 24, 2018
1 parent d9c62fe commit 9ee6fe1
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .travis.yml
@@ -0,0 +1,64 @@
language: c

# Based from: https://github.com/greghendershott/travis-racket

# Optional: Remove to use Travis CI's older infrastructure.
sudo: false

env:
global:
# Supply a global RACKET_DIR environment variable. This is where
# Racket will be installed. A good idea is to use ~/racket because
# that doesn't require sudo to install and is therefore compatible
# with Travis CI's newer container infrastructure.
- RACKET_DIR=~/racket
matrix:
# Supply at least one RACKET_VERSION environment variable. This is
# used by the install-racket.sh script (run at before_install,
# below) to select the version of Racket to download and install.
#
# Supply more than one RACKET_VERSION (as in the example below) to
# create a Travis-CI build matrix to test against multiple Racket
# versions.
- RACKET_VERSION=6.5
- RACKET_VERSION=6.6
- RACKET_VERSION=6.7
- RACKET_VERSION=6.8
- RACKET_VERSION=6.9
- RACKET_VERSION=6.10
- RACKET_VERSION=6.11
- RACKET_VERSION=HEAD

matrix:
allow_failures:
env: RACKET_VERSION=HEAD
fast_finish: true

before_install:
- git clone https://github.com/greghendershott/travis-racket.git
- cat travis-racket/install-racket.sh | bash # pipe to bash not sh!
- export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us

install:
- raco pkg install --deps search-auto cover
- raco pkg install --auto --name pie --link $TRAVIS_BUILD_DIR

before_script:
# Set up an X server, so GTK doesn't fail to initialize for GUI tests
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start

# Here supply steps such as raco make, raco test, etc. Note that you
# need to supply /usr/racket/bin/ -- it's not in PATH. You can run
# `raco pkg install --deps search-auto pie` to install any required
# packages without it getting stuck on a confirmation prompt.
script:
- raco test -ep pie

after_success:
- raco setup --check-deps pie
- raco pkg install --deps search-auto cover-coveralls
- raco pkg install --deps search-auto
- raco cover -b -f coveralls -d $TRAVIS_BUILD_DIR/coverage -p pie

0 comments on commit 9ee6fe1

Please sign in to comment.