From b246b5c272eecbb3cafc8a8c34d284e5960b3150 Mon Sep 17 00:00:00 2001 From: Ayrat Badykov Date: Wed, 22 Aug 2018 10:15:01 +0300 Subject: [PATCH] add bin/setup to circle ci --- .circleci/config.yml | 13 ++----------- bin/setup | 41 +++++++++++++++-------------------------- 2 files changed, 17 insertions(+), 37 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a89a36ae..a3eedb925 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,15 +11,7 @@ jobs: working_directory: ~/app steps: - - run: sudo apt-get update; sudo apt-get -y install libtool autoconf libgmp3-dev - checkout - - run: git submodule sync --recursive - - run: git submodule update --recursive --init - - run: curl https://sh.rustup.rs -sSf | sh -s -- -y - - run: echo 'export PATH=~/.cargo/bin:$PATH' >> $BASH_ENV - - - run: mix local.hex --force - - restore_cache: keys: - v1-env-cache-{{ arch }}-{{ .Branch }} @@ -37,9 +29,8 @@ jobs: - v1-build-cache-{{ .Branch }} - v1-build-cache - - run: - command: mix do deps.get, compile - no_output_timeout: 2400 + - run: ./bin/setup + no_output_timeout: 2400 - save_cache: key: v1-env-cache-{{ arch }}-{{ .Branch }} diff --git a/bin/setup b/bin/setup index 48a5e042d..312341ac2 100755 --- a/bin/setup +++ b/bin/setup @@ -25,7 +25,17 @@ install_linux_deps() { esac } -install_linux_rust() { +install_darwin_deps(){ + fancy_echo "Installing dependencies via brew" + brew bundle --file=- < /dev/null; then exit 1 fi -ELIXIR_PATCH_VERSION=`elixir -v |grep Elixir | sed -n 's/.*1\.6\.\([0-9]\).*$/\1/p'` +ELIXIR_PATCH_VERSION=`elixir -v |grep Elixir | sed -n 's/.*1\.7\.\([0-9]\).*$/\1/p'` if [ $ELIXIR_PATCH_VERSION -lt 5 ]; then - fancy_echo "Your elixir version must be ~> 1.6.5" + fancy_echo "Your elixir version must be ~> 1.7.2" fancy_echo "Your current version:" elixir -v exit 1 @@ -112,6 +100,7 @@ if ! command -v rustc > /dev/null; then fi fancy_echo "Installing elixir dependencies and compiling." +mix local.hex --force mix deps.get mix do deps.compile, compile