mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds CircleCI config for macOS.
Does not run ipc and smt tests.
This commit is contained in:
parent
5cce2e552b
commit
743a714f21
113
circle.yml
113
circle.yml
@ -4,6 +4,32 @@ defaults:
|
|||||||
filters:
|
filters:
|
||||||
tags:
|
tags:
|
||||||
only: /.*/
|
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
|
version: 2
|
||||||
jobs:
|
jobs:
|
||||||
@ -87,7 +113,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
. /usr/local/nvm/nvm.sh
|
. /usr/local/nvm/nvm.sh
|
||||||
test/externalTests.sh /tmp/workspace/soljson.js || test/externalTests.sh /tmp/workspace/soljson.js
|
test/externalTests.sh /tmp/workspace/soljson.js || test/externalTests.sh /tmp/workspace/soljson.js
|
||||||
build_x86:
|
build_x86_linux:
|
||||||
docker:
|
docker:
|
||||||
- image: buildpack-deps:artful
|
- image: buildpack-deps:artful
|
||||||
steps:
|
steps:
|
||||||
@ -98,28 +124,38 @@ jobs:
|
|||||||
apt-get -qq update
|
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
|
apt-get -qy install cmake libboost-regex-dev libboost-filesystem-dev libboost-test-dev libboost-system-dev libboost-program-options-dev libz3-dev
|
||||||
- run:
|
- run:
|
||||||
name: Store commit hash and prerelease
|
<<: *run_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:
|
- run:
|
||||||
name: Build
|
<<: *run_build
|
||||||
command: |
|
|
||||||
mkdir -p build
|
|
||||||
cd build
|
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
||||||
make -j4
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: build/solc/solc
|
<<: *build_artifacts
|
||||||
destination: solc
|
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: build
|
<<: *test_artifacts
|
||||||
paths:
|
|
||||||
- solc/solc
|
|
||||||
- test/soltest
|
|
||||||
- test/tools/solfuzzer
|
|
||||||
|
|
||||||
test_x86:
|
build_x86_mac:
|
||||||
|
macos:
|
||||||
|
xcode: "9.0"
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: Install build dependencies
|
||||||
|
command: |
|
||||||
|
brew update
|
||||||
|
brew upgrade
|
||||||
|
brew unlink python
|
||||||
|
brew install z3
|
||||||
|
brew install boost
|
||||||
|
brew install cmake
|
||||||
|
- run:
|
||||||
|
<<: *run_prerelease
|
||||||
|
- run:
|
||||||
|
<<: *run_build
|
||||||
|
- store_artifacts:
|
||||||
|
<<: *build_artifacts
|
||||||
|
- persist_to_workspace:
|
||||||
|
<<: *test_artifacts
|
||||||
|
|
||||||
|
test_x86_linux:
|
||||||
docker:
|
docker:
|
||||||
- image: buildpack-deps:artful
|
- image: buildpack-deps:artful
|
||||||
steps:
|
steps:
|
||||||
@ -133,8 +169,27 @@ jobs:
|
|||||||
apt-get -qy install libz3-dev libleveldb1v5
|
apt-get -qy install libz3-dev libleveldb1v5
|
||||||
- run: mkdir -p test_results
|
- run: mkdir -p test_results
|
||||||
- run:
|
- run:
|
||||||
name: Tests
|
<<: *run_tests
|
||||||
command: scripts/tests.sh --junit_report test_results
|
- 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:
|
- store_test_results:
|
||||||
path: test_results/
|
path: test_results/
|
||||||
|
|
||||||
@ -149,10 +204,7 @@ jobs:
|
|||||||
apt-get -qq update
|
apt-get -qq update
|
||||||
apt-get -qy install python-sphinx
|
apt-get -qy install python-sphinx
|
||||||
- run:
|
- run:
|
||||||
name: Store commit hash and prerelease
|
<<: *run_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:
|
- run:
|
||||||
name: Build documentation
|
name: Build documentation
|
||||||
command: ./scripts/docs.sh
|
command: ./scripts/docs.sh
|
||||||
@ -173,9 +225,14 @@ workflows:
|
|||||||
<<: *build_on_tags
|
<<: *build_on_tags
|
||||||
requires:
|
requires:
|
||||||
- build_emscripten
|
- build_emscripten
|
||||||
- build_x86: *build_on_tags
|
- build_x86_linux: *build_on_tags
|
||||||
- test_x86:
|
- build_x86_mac: *build_on_tags
|
||||||
|
- test_x86_linux:
|
||||||
<<: *build_on_tags
|
<<: *build_on_tags
|
||||||
requires:
|
requires:
|
||||||
- build_x86
|
- build_x86_linux
|
||||||
|
- test_x86_mac:
|
||||||
|
<<: *build_on_tags
|
||||||
|
requires:
|
||||||
|
- build_x86_mac
|
||||||
- docs: *build_on_tags
|
- docs: *build_on_tags
|
||||||
|
@ -30,6 +30,17 @@ set -e
|
|||||||
|
|
||||||
REPO_ROOT="$(dirname "$0")"/..
|
REPO_ROOT="$(dirname "$0")"/..
|
||||||
|
|
||||||
|
IPC_ENABLED=true
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]
|
||||||
|
then
|
||||||
|
SMT_FLAGS="--no-smt"
|
||||||
|
if [ "$CIRCLECI" ]
|
||||||
|
then
|
||||||
|
IPC_ENABLED=false
|
||||||
|
IPC_FLAGS="--no-ipc"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$1" = --junit_report ]
|
if [ "$1" = --junit_report ]
|
||||||
then
|
then
|
||||||
if [ -z "$2" ]
|
if [ -z "$2" ]
|
||||||
@ -98,8 +109,11 @@ function run_eth()
|
|||||||
sleep 2
|
sleep 2
|
||||||
}
|
}
|
||||||
|
|
||||||
download_eth
|
if [ "$IPC_ENABLED" = true ];
|
||||||
ETH_PID=$(run_eth /tmp/test)
|
then
|
||||||
|
download_eth
|
||||||
|
ETH_PID=$(run_eth /tmp/test)
|
||||||
|
fi
|
||||||
|
|
||||||
progress="--show-progress"
|
progress="--show-progress"
|
||||||
if [ "$CIRCLECI" ]
|
if [ "$CIRCLECI" ]
|
||||||
@ -131,7 +145,7 @@ do
|
|||||||
log=--logger=JUNIT,test_suite,$log_directory/noopt_$vm.xml $testargs_no_opt
|
log=--logger=JUNIT,test_suite,$log_directory/noopt_$vm.xml $testargs_no_opt
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
"$REPO_ROOT"/build/test/soltest $progress $log -- --testpath "$REPO_ROOT"/test "$optimize" --evm-version "$vm" --ipcpath /tmp/test/geth.ipc
|
"$REPO_ROOT"/build/test/soltest $progress $log -- --testpath "$REPO_ROOT"/test "$optimize" --evm-version "$vm" $SMT_FLAGS $IPC_FLAGS --ipcpath /tmp/test/geth.ipc
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -141,6 +155,9 @@ then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkill "$ETH_PID" || true
|
if [ "$IPC_ENABLED" = true ]
|
||||||
sleep 4
|
then
|
||||||
pgrep "$ETH_PID" && pkill -9 "$ETH_PID" || true
|
pkill "$ETH_PID" || true
|
||||||
|
sleep 4
|
||||||
|
pgrep "$ETH_PID" && pkill -9 "$ETH_PID" || true
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user