-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcircle.yml
64 lines (54 loc) · 2.47 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
machine:
environment:
# circleci has several folders in gopath so place our gopath first in gopath list to simplify copying code into
# gopath directories below
TEMP_GOPATH: ${HOME}/temp_gopath
GOPATH: $TEMP_GOPATH:$GOPATH
STRICT_CFLAGS: "-Wall -Wextra -Wstrict-aliasing -fstrict-aliasing -pedantic -fno-common -Wno-unused-result -fno-common -fwrapv -Wstrict-prototypes -std=c99"
dependencies:
pre:
- sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get -y install libssl-dev build-essential python-dev python3-dev python-setuptools python3-setuptools netcat cppcheck
- git clone https://github.com/cossacklabs/themis && cd themis && sudo make install
override:
- CFLAGS="$STRICT_CFLAGS" make
- sudo make install
- CFLAGS="-DREUSE_SOCKET $STRICT_CFLAGS" make examples
- sudo pip install tox
- pyenv global 2.7.12 3.3.6 3.4.4 3.5.3 3.6.2
- mkdir -p db/credential_store db/key_store db/data_store
- cp ./docs/examples/c/service_keys/* db/credential_store/
- cp ./docs/examples/test_keys/* db/credential_store/
# copy current code from commit to our gopath
- mkdir -p $TEMP_GOPATH/src/github.com/cossacklabs
# link current code to gopath to avoid fetching via go get
- ln -s ${HOME}/${CIRCLE_PROJECT_REPONAME} $TEMP_GOPATH/src/github.com/cossacklabs/${CIRCLE_PROJECT_REPONAME}
# fetch go example's dependencies
- go get -t -d ./docs/examples/go/...
# fetch dependencies of tests (gothemis)
- go get -t -d ./gohermes/...
- go build docs/examples/go/hermes_client.go
- cd pyhermes && python setup.py install
test:
override:
- make test
# test pyhermes
- ./tests/scripts/test_services.sh "cd pyhermes && tox -e py33,py34,py35,py36,py27 -- python -m unittest test.TestHermesTransport test.TestHermes.test_secure_midhermes";
# test golang tutorial
- ./tests/scripts/test_services.sh docs/examples/go/tests/go_test.sh;
# go unittests
- go test ./gohermes/...
# test python tutorial
- ./tests/scripts/test_services.sh docs/examples/python/tests/test.sh;
# test c tutorial
- ./tests/scripts/test_services.sh docs/examples/c/tests/test.sh;
# test c midhermes low level
- ./docs/examples/c/tests/test_mid_hermes_ll.sh;
- |
cppcheck \
--force \
--enable=warning,performance,portability,information,missingInclude \
--inconclusive \
--std=posix --std=c89 \
-I include \
--error-exitcode=1 \
./src