-
Notifications
You must be signed in to change notification settings - Fork 126
/
.drone.yml
126 lines (112 loc) · 3.44 KB
/
.drone.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
---
kind: pipeline
type: docker
name: 'Tests'
clone:
disable: true
environment:
DEPLOYER_PK: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
DEPLOYER_ADDRESS: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
ENTRY_POINT_ADDRESS: '0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789'
KERNEL_ECDSA_VALIDATOR_ADDRESS: '0xe7f1725e7734ce288f8367e1bb143e90bb3f0512'
KERNEL_ADDRESS: '0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0'
KERNEL_FACTORY_ADDRESS: '0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9'
SESSION_KEY_VALIDATOR_ADDRESS: '0x5fc8d32690cc91d4c39d9d3abcbd16989f875707'
services:
- name: eth_node
image: quay.io/openware/geth:v0.2.5-amd64
- name: bundler
image: quay.io/openware/bundler:c7dd933
entrypoint:
- /bin/sh
- -c
commands:
- cd /app
- while ! nc -z eth_node 8545; do sleep 1; done; sleep 1
- pnpm start --port 3000 --networkName mainnet --entryPoint $${ENTRY_POINT_ADDRESS} --signerPrivateKeys 0x$${DEPLOYER_PK} --utilityPrivateKey 0x$${DEPLOYER_PK} --minBalance 1000000000000000000 --rpcUrl http://eth_node:8545 --logLevel info --noEthCallOverrideSupport true --useUserOperationGasLimitsForSubmission true
- name: paymaster
image: quay.io/openware/paymaster:v0.1.0-mock-amd64
environment:
ALTO_RPC: http://bundler:3000
ANVIL_RPC: http://eth_node:8545
PORT: 3001
steps:
- name: Clone
image: alpine/git
commands:
- git clone https://github.com/$DRONE_REPO .
- git checkout ${DRONE_SOURCE_BRANCH:-${DRONE_BRANCH}}
- name: Test Go packages
image: golang:1.21
pull: if-not-exists
environment:
GETH_NODE_RPC_URL: ws://eth_node:8545
BUNDLER_USE_HARDCODED_CONTRACTS: true
BUNDLER_RPC_URL: http://bundler:3000
PAYMASTER_RPC_URL: http://paymaster:3001
commands:
- go vet ./...
- go test -race ./...
when:
event:
- pull_request
trigger:
event:
- pull_request
branch:
- master
---
kind: pipeline
type: docker
name: 'Bindings'
clone:
disable: true
steps:
- name: Clone
image: alpine/git
commands:
- git clone https://github.com/$DRONE_REPO .
- git checkout ${DRONE_SOURCE_BRANCH:-${DRONE_BRANCH}}
- name: GRPC
image: golang:1.21
pull: if-not-exists
commands:
- apt update && apt install -y zip
- make proto
- name: Hardhat compile
image: node:18.15
pull: if-not-exists
commands:
- make -C contracts compile
- name: SC
image: golang:1.21
pull: if-not-exists
commands:
- make -C contracts bindings
- name: Publish
image: alpine/git:v2.32.0
pull: if-not-exists
environment:
GITHUB_API_KEY:
from_secret: github_api_key
GITHUB_API_USER:
from_secret: github_api_user
commands:
- git diff --exit-code --quiet && exit 78 # Skip if no changes
- git remote add authenticated-origin https://$GITHUB_API_USER:[email protected]/$DRONE_REPO
- git fetch --tags authenticated-origin
- git tag --sort=-committerdate | head -n 1 | awk -F. '{OFS="."; $NF+=1; print $0}' > .tags
- git add .
- git commit -m "Update bindings to $$(cat .tags)" --author "Kite Bot <[email protected]>"
- git tag $$(cat .tags)
- git push authenticated-origin HEAD:${DRONE_SOURCE_BRANCH:-${DRONE_BRANCH}}
- git push authenticated-origin --tags
when:
event:
- push
trigger:
event:
- pull_request
- push
branch:
- master