create macros in circle

This commit is contained in:
Mackenzie Clark 2019-03-23 16:50:09 -07:00
parent e986ec13fa
commit 2d8ae0ce15

View File

@ -1,4 +1,6 @@
install_sodium: &install_sodium run_install_sodium: &run_install_sodium
run:
name: install sodium
command: | command: |
curl -O https://download.libsodium.org/libsodium/releases/libsodium-1.0.17.tar.gz curl -O https://download.libsodium.org/libsodium/releases/libsodium-1.0.17.tar.gz
tar xf libsodium-1.0.17.tar.gz tar xf libsodium-1.0.17.tar.gz
@ -8,26 +10,43 @@ install_sodium: &install_sodium
sudo make install sudo make install
cd .. cd ..
run_with_build_env_vars: &run_with_build_env_vars
environment:
LLVM_SYS_70_PREFIX: "`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
SODIUM_LIB_DIR: /usr/local/lib
SODIUM_STATIC: true
run_install_dependencies: &run_install_dependencies
run:
name: install dependencies
command: |
sudo apt-get install -y cmake
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
save_cargo_cache: &save_cargo_cache
save_cache:
paths:
- /usr/local/cargo/registry
- target/debug/.fingerprint
- target/debug/build
- target/debug/deps
key: v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
version: 2 version: 2
jobs: jobs:
# Job used for testing # Job used for testing
lint: lint:
docker: docker:
- image: circleci/rust:latest - image: circleci/rust:latest
<<: *run_with_build_env_vars
steps: steps:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }} - v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }}
- run: - <<: *run_install_dependencies
name: Install dependencies - <<: *run_install_sodium
command: |
sudo apt-get install -y cmake
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
- run:
name: Install sodium
<<: *install_sodium
- run: - run:
name: Install lint deps name: Install lint deps
command: | command: |
@ -38,9 +57,6 @@ jobs:
- run: - run:
name: Execute lints name: Execute lints
command: | command: |
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"
export SODIUM_LIB_DIR=/usr/local/lib
export SODIUM_STATIC=true
make lint make lint
- save_cache: - save_cache:
paths: paths:
@ -48,7 +64,8 @@ jobs:
- target/debug/.fingerprint - target/debug/.fingerprint
- target/debug/build - target/debug/build
- target/debug/deps - target/debug/deps
key: v6-lint-{{ arch }}-{{ checksum "Cargo.lock" }} key: v6-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }}
test: test:
docker: docker:
- image: circleci/rust:latest - image: circleci/rust:latest
@ -63,9 +80,7 @@ jobs:
sudo apt-get install -y cmake sudo apt-get install -y cmake
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
- run: - <<: *run_install_sodium
name: Install sodium
<<: *install_sodium
- run: - run:
name: Tests name: Tests
command: | command: |
@ -109,9 +124,7 @@ jobs:
# Installing LLVM outside of brew # Installing LLVM outside of brew
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
tar xf clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz tar xf clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
- run: - <<: *run_install_sodium
name: Install sodium
<<: *install_sodium
- run: - run:
name: Install Rust name: Install Rust
command: | command: |
@ -177,9 +190,7 @@ jobs:
sudo apt-get install -y cmake sudo apt-get install -y cmake
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
- run: - <<: *run_install_sodium
name: Install sodium
<<: *install_sodium
- run: - run:
name: Tests name: Tests
command: | command: |
@ -244,9 +255,7 @@ jobs:
# Installing LLVM outside of brew # Installing LLVM outside of brew
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
tar xf clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz tar xf clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz
- run: - <<: *run_install_sodium
name: Install sodium
<<: *install_sodium
- run: - run:
name: Install Rust name: Install Rust
command: | command: |
@ -319,9 +328,7 @@ jobs:
sudo apt-get install -y cmake sudo apt-get install -y cmake
curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz curl -O https://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz tar xf clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
- run: - <<: *run_install_sodium
name: Install sodium
<<: *install_sodium
- run: rustup default nightly - run: rustup default nightly
- run: | - run: |
export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/" export LLVM_SYS_70_PREFIX="`pwd`/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/"