From 743a714f21c76c0c2a026b4ceb61c7cf94130540 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Thu, 26 Apr 2018 13:38:20 +0200 Subject: Adds CircleCI config for macOS. Does not run ipc and smt tests. --- circle.yml | 111 ++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 84 insertions(+), 27 deletions(-) (limited to 'circle.yml') diff --git a/circle.yml b/circle.yml index f97b619a..49418c4b 100644 --- a/circle.yml +++ b/circle.yml @@ -4,6 +4,32 @@ defaults: filters: tags: only: /.*/ + - run_prerelease: &run_prerelease + name: Store commit hash and prerelease + command: | + if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi + echo -n "$CIRCLE_SHA1" > commit_hash.txt + - run_build: &run_build + name: Build + command: | + mkdir -p build + cd build + cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo + make -j4 + - run_tests: &run_tests + name: Tests + command: scripts/tests.sh --junit_report test_results + environment: + TERM: dumb + - build_artifacts: &build_artifacts + path: build/solc/solc + destination: solc + - test_artifacts: &test_artifacts + root: build + paths: + - solc/solc + - test/soltest + - test/tools/solfuzzer version: 2 jobs: @@ -87,7 +113,7 @@ jobs: command: | . /usr/local/nvm/nvm.sh test/externalTests.sh /tmp/workspace/soljson.js || test/externalTests.sh /tmp/workspace/soljson.js - build_x86: + build_x86_linux: docker: - image: buildpack-deps:artful steps: @@ -98,28 +124,38 @@ jobs: apt-get -qq update apt-get -qy install cmake libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev libboost-program-options-dev libz3-dev - run: - name: Store commit hash and prerelease - command: | - if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi - echo -n "$CIRCLE_SHA1" > commit_hash.txt + <<: *run_prerelease - run: - name: Build + <<: *run_build + - store_artifacts: + <<: *build_artifacts + - persist_to_workspace: + <<: *test_artifacts + + build_x86_mac: + macos: + xcode: "9.0" + steps: + - checkout + - run: + name: Install build dependencies command: | - mkdir -p build - cd build - cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo - make -j4 + brew update + brew upgrade + brew unlink python + brew install z3 + brew install boost + brew install cmake + - run: + <<: *run_prerelease + - run: + <<: *run_build - store_artifacts: - path: build/solc/solc - destination: solc + <<: *build_artifacts - persist_to_workspace: - root: build - paths: - - solc/solc - - test/soltest - - test/tools/solfuzzer + <<: *test_artifacts - test_x86: + test_x86_linux: docker: - image: buildpack-deps:artful steps: @@ -133,8 +169,27 @@ jobs: apt-get -qy install libz3-dev libleveldb1v5 - run: mkdir -p test_results - run: - name: Tests - command: scripts/tests.sh --junit_report test_results + <<: *run_tests + - store_test_results: + path: test_results/ + + test_x86_mac: + macos: + xcode: "9.0" + steps: + - checkout + - attach_workspace: + at: build + - run: + name: Install dependencies + command: | + brew update + brew upgrade + brew unlink python + brew install z3 + - run: mkdir -p test_results + - run: + <<: *run_tests - store_test_results: path: test_results/ @@ -149,10 +204,7 @@ jobs: apt-get -qq update apt-get -qy install python-sphinx - run: - name: Store commit hash and prerelease - command: | - if [ "$CIRCLE_BRANCH" = release -o -n "$CIRCLE_TAG" ]; then echo -n > prerelease.txt; else date -u +"nightly.%Y.%-m.%-d" > prerelease.txt; fi - echo -n "$CIRCLE_SHA1" > commit_hash.txt + <<: *run_prerelease - run: name: Build documentation command: ./scripts/docs.sh @@ -173,9 +225,14 @@ workflows: <<: *build_on_tags requires: - build_emscripten - - build_x86: *build_on_tags - - test_x86: + - build_x86_linux: *build_on_tags + - build_x86_mac: *build_on_tags + - test_x86_linux: + <<: *build_on_tags + requires: + - build_x86_linux + - test_x86_mac: <<: *build_on_tags requires: - - build_x86 + - build_x86_mac - docs: *build_on_tags -- cgit