forked from mnaza/themis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcircle.yml
72 lines (70 loc) · 4.2 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
machine:
environment:
ANDROID_NDK_ROOT: $ANDROID_NDK
GOTHEMIS_IMPORT: github.com/cossacklabs/themis/gothemis
GOROOT: $HOME/go
GOPATH: $HOME/gopath
PATH: $GOROOT/bin:$PATH
# to avoid OOM killer (https://circleci.com/docs/1.0/oom/#out-of-memory-errors-in-android-builds)
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
## Customize dependencies
dependencies:
pre:
- sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install php5 cmake libssl-dev python3 python3-setuptools ruby ninja-build lcov build-essential valgrind
- sudo ln -sf /usr/bin/gcov-4.9 /usr/bin/gcov
- cd $HOME && wget https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz && tar xf go1.6.2.linux-amd64.tar.gz
- gem install coveralls-lcov
- go get github.com/mattn/goveralls
override:
- make
- make JAVA_HOME=/usr/lib/jvm/default-java themis_jni
- sudo make install
- sudo make themispp_install
- sudo make pythemis_install
- sudo make rubythemis_install
- sudo make phpthemis_install
- cd $HOME && git clone https://boringssl.googlesource.com/boringssl && cd boringssl && git checkout chromium-stable && mkdir build && cd build && cmake .. && make && cp decrepit/libdecrepit.a crypto/
- cd $HOME/boringssl && mkdir build-armeabi-v7a && cd build-armeabi-v7a && cmake -DANDROID_ABI=armeabi-v7a -DCMAKE_TOOLCHAIN_FILE=../third_party/android-cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=16 -GNinja .. && ninja -j 20
- cd $HOME/boringssl && mkdir build-arm64-v8a && cd build-arm64-v8a && cmake -DANDROID_ABI=arm64-v8a -DCMAKE_TOOLCHAIN_FILE=../third_party/android-cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=16 -GNinja .. && ninja -j 20
- cd $HOME/boringssl && mkdir build-x86 && cd build-x86 && cmake -DANDROID_ABI=x86 -DCMAKE_TOOLCHAIN_FILE=../third_party/android-cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=16 -GNinja .. && ninja -j 20
- make ENGINE=boringssl ENGINE_INCLUDE_PATH=$HOME/boringssl/include ENGINE_LIB_PATH=$HOME/boringssl/build/crypto BUILD_PATH=build_with_boringssl test
- make BUILD_PATH=cover_build COVERAGE=y test
- make test
- make themispp_test
- make test_all
- mkdir -p $HOME/gopath/src/$GOTHEMIS_IMPORT
- rsync -auv gothemis/ $HOME/gopath/src/$GOTHEMIS_IMPORT/
- lcov --directory . --zerocounters
## Customize test commands
test:
override:
# run only if CIRCLE_PR_NUMBER variable is not set (it's not pull request and COVERALLS_TOKEN will be set via circleCI for non-PR build) and COVERALLS_TOKEN is set
# we should calculate coverage for gothemis and send report before sending coverage of main C part
- '[ -z "$CIRCLE_PR_NUMBER" ] && ! [ -z "$COVERALLS_TOKEN" ] && cd $HOME/gopath/src/$GOTHEMIS_IMPORT && $HOME/gopath/bin/goveralls -v -service=circle-ci -repotoken=$COVERALLS_TOKEN || true'
- build/tests/soter_test
- build/tests/themis_test
- valgrind build/tests/soter_test 2>&1 | grep "ERROR SUMMARY\|definitely lost\|indirectly lost\|possibly lost" | awk '{sum += $4} END {exit sum}'
- valgrind build/tests/themis_test 2>&1 | grep "ERROR SUMMARY\|definitely lost\|indirectly lost\|possibly lost" | awk '{sum += $4} END {exit sum}'
- cover_build/tests/soter_test
- cover_build/tests/themis_test
- lcov --directory . --capture --output-file coverage.info
- lcov --remove coverage.info 'tests/*' 'src/soter/openssl/*' '/usr/*' --output-file coverage.info
- lcov --list coverage.info
- coveralls-lcov -v --repo-token $COVERALLS_TOKEN coverage.info || true
- build_with_boringssl/tests/soter_test
- build_with_boringssl/tests/themis_test
- build/tests/themispp_test
- sudo /sbin/ldconfig
- build/tests/pythemis_test.sh
- sudo build/tests/rubythemis_test.sh
- build/tests/phpthemis_test.sh
- go test -v $GOTHEMIS_IMPORT/...
- build/tests/node.sh
# - tests/check_ios_test.sh `tests/start_ios_test.sh`
# start Android emulator
- emulator -avd circleci-android22 -no-audio -no-window:
background: true
# wait for it to have booted
- circle-android wait-for-boot
# run Android tests
- ./gradlew --info -Pboringssl_path=$HOME/boringssl connectedAndroidTest