Skip to content

Instantly share code, notes, and snippets.

@DanSnow
Created December 22, 2016 05:32
Show Gist options
  • Save DanSnow/3d1a7351fb25ca33809e96786283f1ae to your computer and use it in GitHub Desktop.
Save DanSnow/3d1a7351fb25ca33809e96786283f1ae to your computer and use it in GitHub Desktop.
Use Crystal on CircleCI
machine:
environment:
CRYSTAL_VERSION: "0.20.1" # Replace version to which you're using
PATH: "${PATH}:${HOME}/.crystal/bin"
CRYSTAL_URL: "https://github.com/crystal-lang/crystal/releases/download/${CRYSTAL_VERSION}/crystal-${CRYSTAL_VERSION}-1-linux-x86_64.tar.gz"
dependencies:
cache_directories:
- ~/.crystal
- lib
- .shards
pre:
- |
if [[ ! -e "${HOME}/.crystal/bin/crystal" || $(crystal --version | grep -P -o '\d+\.\d+\.\d+') != "${CRYSTAL_VERSION}" ]]; then
mkdir "${HOME}/.crystal"
wget "${CRYSTAL_URL}" -O "${HOME}/crystal.tar.gz" &&\
tar -zxvf "${HOME}/crystal.tar.gz" -C "${HOME}/.crystal" --strip-components=1
fi
override:
- crystal deps
test:
override:
- crystal spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment