Repository navigation
153 lines (128 loc) · 4.52 KB
/
Copy pathbuild.yaml
File metadata and controls
153 lines (128 loc) · 4.52 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Go test workflow
name: test
on:
push:
branches: ["main"]
pull_request:
# Set minimal permissions for all jobs by default
permissions:
contents: read
jobs:
go-lint:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- name: Install project dependencies
run: |
go mod download
- name: Lint Go
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
with:
version: v2.13.2
go-test:
outputs:
COVERAGE: ${{ steps.unit.outputs.coverage }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- name: Install project dependencies
run: |
go mod download
- name: Run Unit Tests
id: unit
run: |
go test -v -coverprofile=coverage.out ./...
# Call the reusable workflow that builds all binaries in parallel
build-binaries:
permissions:
contents: read
actions: write # Required for reusable workflow to upload artifacts
uses: ./.github/workflows/_build-binaries.yaml
with:
optimism_version: 3019251e80aa248e91743addd3e833190acb26f1
geth_version: 6cbfcd5161083bcd4052edc3022d9f99c6fe40e0
base_reth_node_version: main
basic-benchmarks:
runs-on: ubuntu-latest
needs: build-binaries
permissions:
contents: read
actions: read # Required for artifact download
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Go
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- name: Install project dependencies
run: |
go mod download
- name: Download contract artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: contracts
path: contracts/out/
- name: Download reth binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: optimism
path: ${{ runner.temp }}/bin/
- name: Download geth binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: geth
path: ${{ runner.temp }}/bin/
- name: Download builder binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: builder
path: ${{ runner.temp }}/bin/
- name: Download base-reth-node binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: base-reth-node
path: ${{ runner.temp }}/bin/
- name: Download op-program binary
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: op-program
path: ${{ runner.temp }}/bin/
- name: Make binaries executable
run: |
chmod +x ${{ runner.temp }}/bin/*
echo "Downloaded binaries:"
ls -la ${{ runner.temp }}/bin
- name: Setup op-program directory
run: |
mkdir -p op-program/versions/v1.6.1-rc.1
cp ${{ runner.temp }}/bin/op-program op-program/versions/v1.6.1-rc.1/
du -h -d 2 .
- name: Run examples
run: |
./.github/scripts/run-example-benchmarks.sh ${{ runner.temp }}