Improved CircleCI lint and cmake installation in mac

This commit is contained in:
Syrus 2019-01-18 11:33:25 -08:00
parent eb9f3fd274
commit e953308b0e

View File

@ -6,8 +6,27 @@ jobs:
- image: circleci/rust:latest
steps:
- checkout
- run: rustup component add rustfmt
- run: rustup component add clippy
- restore_cache:
keys:
- lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Install dependencies
command: |
sudo apt-get install -y cmake
sudo apt-get install texinfo
sudo apt-get install libclang-dev llvm-3.9-dev libclang-3.9-dev clang-3.9
- run:
name: Install lint deps
command: |
rustup component add rustfmt
rustup component add clippy
- save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- run:
name: Execute lints
command: make lint
@ -44,19 +63,19 @@ jobs:
keys:
- v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v4-cargo-cache-darwin-{{ arch }}-brew
- run:
name: Install CMAKE
command: |
curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
# - run:
# name: Install CMAKE
# command: |
# curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
# tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
- run:
name: Upgrade Brew
command: brew upgrade || true
- run:
name: Install libffi dependencies
name: Install crate dependencies
command: |
brew install autoconf automake libtool
brew install autoconf automake libtool cmake
- save_cache:
paths:
- /usr/local/Homebrew
@ -71,7 +90,7 @@ jobs:
- run:
name: Execute tests
command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
# We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000
@ -80,7 +99,7 @@ jobs:
- run:
name: Execute integration tests
command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
./integration_tests/nginx/test.sh
- save_cache:
@ -146,19 +165,19 @@ jobs:
keys:
- v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }}
- v4-cargo-cache-darwin-{{ arch }}-brew
- run:
name: Install CMAKE
command: |
curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
# - run:
# name: Install CMAKE
# command: |
# curl -O https://cmake.org/files/v3.4/cmake-3.4.1-Darwin-x86_64.tar.gz
# tar xf cmake-3.4.1-Darwin-x86_64.tar.gz
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
- run:
name: Upgrade Brew
command: brew upgrade || true
- run:
name: Install libffi dependencies
name: Install crate dependencies
command: |
brew install autoconf automake libtool
brew install autoconf automake libtool cmake
- save_cache:
paths:
- /usr/local/Homebrew
@ -173,7 +192,7 @@ jobs:
- run:
name: Execute tests
command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
# We increase the ulimit for fixing cargo unclosed files in mac
ulimit -n 8000
@ -182,7 +201,7 @@ jobs:
- run:
name: Make release build
command: |
export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
# export PATH="`pwd`/cmake-3.4.1-Darwin-x86_64/CMake.app/Contents/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
make release
mkdir -p artifacts