forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (96 loc) · 3.02 KB
/
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Continuous Integration (Default Checks)
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
env:
TEST_PACKAGES: ./...
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
- name: run linter
run: go run build/ci.go lint
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
- name: build all binaries from cmd
run: make all
- name: build dev version of geth
run: make geth-dev
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
- name: run tests
run: go run build/ci.go test $TEST_PACKAGES
hive:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
- name: clone hive repository
run: git clone https://github.com/ethereum/hive
- name: install hive
working-directory: ./hive
run: go install .
- name: create hive-clients.yml configuration file based on $BRANCH_NAME
working-directory: .github/workflows
run: |
echo "
- client: go-ethereum
dockerfile: git
build_args:
github: Kava-Labs/go-ethereum
tag: $BRANCH_NAME" > hive-clients.yml
- name: print hive-clients.yml configuration file for debug purposes
working-directory: .github/workflows
run: cat hive-clients.yml
- name: run devp2p/discv4 simulation
working-directory: ./hive
run: hive --sim devp2p --sim.limit discv4 --client go-ethereum --client-file $GITHUB_WORKSPACE/.github/workflows/hive-clients.yml
- name: run ethereum/sync simulation
working-directory: ./hive
run: hive --sim ethereum/sync --client go-ethereum --client-file $GITHUB_WORKSPACE/.github/workflows/hive-clients.yml
- name: install simulation result parser
run: go install ./cmd/result_parser
- name: run simulation result parser
working-directory: ./hive
run: result_parser -path_to_results ./workspace/logs
precompile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.4'
- name: build geth docker image
run: make docker-build-dev
- name: run geth docker container
run: docker-compose up -d
- name: install hardhat
working-directory: ./contracts
run: npm install --save-dev hardhat
- name: run precompile tests
working-directory: ./contracts
run: npx hardhat test