Skip to content

Commit

Permalink
Add more Elixir/Erlang versions to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth committed Feb 16, 2019
1 parent 8f596fc commit 4821e00
Showing 1 changed file with 101 additions and 12 deletions.
113 changes: 101 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,115 @@
# Elixir CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-elixir/ for more details
version: 2

install_elixir: &install_elixir
run:
name: Install Elixir
command: |
wget https://repo.hex.pm/builds/elixir/v$ELIXIR_VERSION.zip
unzip -d /usr/local/elixir v$ELIXIR_VERSION.zip
echo 'export PATH=/usr/local/elixir/bin:$PATH' >> $BASH_ENV
install_hex_rebar: &install_hex_rebar
run:
name: Install hex and rebar
command: |
mix local.hex --force
mix local.rebar --force
install_system_deps: &install_system_deps
run:
name: Install system dependencies
command: |
apt update
apt install -y unzip
defaults: &defaults
working_directory: ~/repo

jobs:
build:
build_elixir_1_8_otp_21:
docker:
- image: circleci/elixir:1.7.3
working_directory: ~/repo
- image: erlang:21.2
environment:
ELIXIR_VERSION: 1.8.1-otp-21
LC_ALL: C.UTF-8
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_hex_rebar
- restore_cache:
keys:
- v1-dependency-cache-{{ checksum "mix.lock" }}
- run: mix local.hex --force
- run: mix deps.get --only test
- run: mix test
- v1-mix-cache-{{ checksum "mix.lock" }}
- run: mix deps.get
- run: mix format --check-formatted
- run: mix hex.build
- run: mix compile
- run: mix test
- run: mix docs
- run: mix dialyzer --halt-exit-status
- run: mix format --check-formatted
- save_cache:
key: v1-dependency-cache-{{ checksum "mix.lock" }}
key: v1-mix-cache-{{ checksum "mix.lock" }}
paths:
- _build
- deps

build_elixir_1_7_otp_21:
docker:
- image: erlang:21.1
environment:
ELIXIR_VERSION: 1.7.4-otp-21
LC_ALL: C.UTF-8
SUDO: true
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_hex_rebar
- run: mix deps.get
- run: mix compile
- run: mix test

build_elixir_1_6_otp_21:
docker:
- image: erlang:21.1
environment:
ELIXIR_VERSION: 1.6.6-otp-21
LC_ALL: C.UTF-8
SUDO: true
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_hex_rebar
- run: mix deps.get
- run: mix compile
- run: mix test

build_elixir_1_6_otp_20:
docker:
- image: erlang:20.3.8
environment:
ELIXIR_VERSION: 1.6.6
LC_ALL: C.UTF-8
SUDO: true
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_hex_rebar
- run: mix deps.get
- run: mix compile
- run: mix test

workflows:
version: 2
build_test:
jobs:
- build_elixir_1_8_otp_21
- build_elixir_1_7_otp_21
- build_elixir_1_6_otp_21
- build_elixir_1_6_otp_20

0 comments on commit 4821e00

Please sign in to comment.