-
Notifications
You must be signed in to change notification settings - Fork 572
/
.gitlab-ci.yml
92 lines (86 loc) · 3.21 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
82
83
84
85
86
87
88
89
90
91
92
stages:
- checks
- prepare
- publish
variables:
IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}
lint:
stage: checks
tags:
- aave-build-runner
before_script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml build
script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml run contracts-env npm run prettier:check
after_script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml run contracts-env npm run ci:clean
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml down
test:
stage: checks
tags:
- aave-build-runner
before_script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml build
script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml run contracts-env npm run ci:test
after_script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml run contracts-env npm run ci:clean
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml down
only:
- master
- merge_requests
deploy-mainnet-fork:
tags:
- aave-build-runner
stage: checks
before_script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml build
script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml run contracts-env npm run aave:fork:main
after_script:
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml run contracts-env npm run ci:clean
- docker-compose -p ${CI_JOB_ID} -f docker-compose.test.yml down
only:
- master
- merge_requests
certora-test:
stage: checks
image: python:latest
before_script:
- apt-get update || apt-get update
- apt-get install -y software-properties-common
- pip3 install certora-cli
- wget https://github.com/ethereum/solidity/releases/download/v0.6.12/solc-static-linux
- chmod +x solc-static-linux
- mv solc-static-linux /usr/bin/solc
- export PATH=$PATH:/usr/bin/solc/solc-static-linux
script:
- certoraRun specs/harness/StableDebtTokenHarness.sol:StableDebtTokenHarness --solc_args "['--optimize']" --verify StableDebtTokenHarness:specs/StableDebtToken.spec --settings -assumeUnwindCond,-b=4 --cache StableDebtToken --cloud
- certoraRun specs/harness/UserConfigurationHarness.sol --verify UserConfigurationHarness:specs/UserConfiguration.spec --solc_args "['--optimize']" --settings -useBitVectorTheory --cache UserConfiguration --cloud
- certoraRun contracts/protocol/tokenization/VariableDebtToken.sol:VariableDebtToken specs/harness/PoolHarnessForVariableDebtToken.sol --solc_args "['--optimize']" --link VariableDebtToken:POOL=PoolHarnessForVariableDebtToken --verify VariableDebtToken:specs/VariableDebtToken.spec --settings -assumeUnwindCond,-useNonLinearArithmetic,-b=4 --cache VariableDebtToken --cloud
only:
- master
- merge_requests
prepare:
stage: prepare
tags:
- docker-builder
script:
- docker build -t ${IMAGE} .
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker push ${IMAGE}
only:
- master
publish:
image: ${IMAGE}
tags:
- docker
stage: publish
script:
- npm ci
- echo //registry.npmjs.org/:_authToken=${NPM_V2_PACKAGES_TOKEN} > .npmrc
- npm run compile
- ${VERSION}
- npm publish --access public
only:
- master