diff --git a/.circleci/config.yml b/.circleci/config.yml index aca4d3e96..d22bdf335 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,6 +22,39 @@ jobs: - target/debug/deps key: v4-test-cargo-cache-linux-{{ arch }}-{{ checksum "Cargo.lock" }} + test-macos: + macos: + xcode: "9.0" + + steps: + - checkout + - restore_cache: + keys: + - v4-cargo-cache-darwin-{{ arch }}-{{ checksum "Cargo.lock" }} + - 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 Rust + command: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + export PATH="$HOME/.cargo/bin:$PATH" + cargo --version + rustup component add rustfmt + - run: + name: Execute tests + command: | + 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 + sudo sysctl -w kern.maxfiles=655360 kern.maxfilesperproc=327680 + make test + make lint + test-and-build: docker: - image: circleci/rust:latest @@ -175,6 +208,10 @@ workflows: filters: branches: ignore: master + - test-macos: + filters: + branches: + ignore: master - test-and-build: filters: branches: