forked from eth-sri/zkay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
81 lines (70 loc) · 1.94 KB
/
.gitlab-ci.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
73
74
75
76
77
78
79
80
81
variables:
ZKAY_SKIP_REAL_ENC_TESTS: "1"
default:
# To run locally:
# $ sudo docker run -it -v=$(pwd):/zkay --workdir=/zkay --rm ethsrilab/zkay-prerequisites:version-1.3
image: ethsrilab/zkay-prerequisites:version-1.4
# BUILD
debug_stage:
stage: build
script:
- printenv
- cargo --version
- rustc --version
create_zkay_venv:
stage: build
script:
- virtualenv venv
- source venv/bin/activate
- pip3 install -r babygiant-lib/requirements.txt
- pip3 install ./babygiant-lib
- pip3 install -r install/requirements.txt # Use fixed version dependencies
- pip3 install -e .
artifacts:
paths:
- zkay/solidity_parser/generated/*.py
- zkay/jsnark_interface/run_snark
- venv/
expire_in: 1 hour
# TEST
test_compilation:
stage: test
dependencies:
- create_zkay_venv
script:
- virtualenv venv
- source venv/bin/activate
- python3 zkay/__main__.py update-solc
- python3 -m unittest discover --failfast --verbose zkay.tests.compiler
test_transactions:
stage: test
dependencies:
- create_zkay_venv
script:
- virtualenv venv
- source venv/bin/activate
- python3 zkay/__main__.py update-solc
- python3 -m unittest discover --failfast --verbose zkay.tests.transaction
test_other:
stage: test
dependencies:
- create_zkay_venv
script:
- virtualenv venv
- source venv/bin/activate
- python3 zkay/__main__.py update-solc
- python3 -m unittest discover --failfast --verbose zkay.tests.analysis
- python3 -m unittest discover --failfast --verbose zkay.tests.parser
- python3 -m unittest discover --failfast --verbose zkay.tests.type_checking
- python3 -m unittest discover --failfast --verbose zkay.tests.utils
- python3 -m unittest discover --failfast --verbose zkay.tests.zkay_ast
# DEPLOY
deploy_tag:
stage: deploy
only:
- tags
script:
- python3 setup.py sdist
artifacts:
paths:
- dist/zkay-*.tar.gz