Skip to content

Commit

Permalink
CI: use hex.pm images; bump Erlang&Elixir
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth committed Mar 8, 2021
1 parent 2221eaa commit 1b135c6
Showing 1 changed file with 19 additions and 51 deletions.
70 changes: 19 additions & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
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
defaults: &defaults
working_directory: ~/repo
environment:
LC_ALL: C.UTF-8

install_hex_rebar: &install_hex_rebar
run:
Expand All @@ -15,45 +12,31 @@ install_hex_rebar: &install_hex_rebar
mix local.hex --force
mix local.rebar --force
install_fwup: &install_fwup
run:
name: Install fwup
command: |
wget https://github.com/fhunleth/fwup/releases/download/v1.8.0/fwup_1.8.0_amd64.deb
dpkg -i ./fwup_1.8.0_amd64.deb
install_system_deps: &install_system_deps
run:
name: Install system dependencies
command: |
apt update
apt install -y unzip
defaults: &defaults
working_directory: ~/repo
apk add fwup --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
jobs:
build_elixir_1_10_otp_23:
build_elixir_1_11_otp_23:
docker:
- image: erlang:23.0.3
environment:
ELIXIR_VERSION: 1.10.4-otp-23
LC_ALL: C.UTF-8
- image: hexpm/elixir:1.11.3-erlang-23.2.7-alpine-3.13.2
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_fwup
- <<: *install_hex_rebar
- <<: *install_system_deps
- restore_cache:
keys:
- v1-mix-cache-{{ checksum "mix.lock" }}
- run: mix deps.get
- run: mix format --check-formatted
- run: mix test
- run: mix deps.unlock --check-unused
- run: mix compile --warnings-as-errors
- run: mix docs
- run: mix hex.build
- run: mix test
- run: mix dialyzer
- run: mix credo -a --strict
- save_cache:
Expand All @@ -62,53 +45,38 @@ jobs:
- _build
- deps

build_elixir_1_10_otp_22:
build_elixir_1_10_otp_23:
docker:
- image: erlang:22.3.4.1
environment:
ELIXIR_VERSION: 1.10.3-otp-22
LC_ALL: C.UTF-8
- image: hexpm/elixir:1.10.4-erlang-23.1.2-alpine-3.12.1
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_fwup
- <<: *install_hex_rebar
- <<: *install_system_deps
- run: mix deps.get
- run: mix compile
- run: mix test

build_elixir_1_9_otp_22:
docker:
- image: erlang:22.2
environment:
ELIXIR_VERSION: 1.9.4-otp-22
LC_ALL: C.UTF-8
- image: hexpm/elixir:1.9.4-erlang-22.3.4.9-alpine-3.12.0
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_fwup
- <<: *install_hex_rebar
- <<: *install_system_deps
- run: mix deps.get
- run: mix compile
- run: mix test

build_elixir_1_8_otp_22:
docker:
- image: erlang:22.0
environment:
ELIXIR_VERSION: 1.8.2-otp-22
LC_ALL: C.UTF-8
- image: hexpm/elixir:1.8.2-erlang-22.3.4.9-alpine-3.12.0
<<: *defaults
steps:
- checkout
- <<: *install_system_deps
- <<: *install_elixir
- <<: *install_fwup
- <<: *install_hex_rebar
- <<: *install_system_deps
- run: mix deps.get
- run: mix compile
- run: mix test
Expand All @@ -117,7 +85,7 @@ workflows:
version: 2
build_test:
jobs:
- build_elixir_1_11_otp_23
- build_elixir_1_10_otp_23
- build_elixir_1_10_otp_22
- build_elixir_1_9_otp_22
- build_elixir_1_8_otp_22

0 comments on commit 1b135c6

Please sign in to comment.