-
Notifications
You must be signed in to change notification settings - Fork 51
109 lines (91 loc) · 3.21 KB
/
examples.yaml
File metadata and controls
109 lines (91 loc) · 3.21 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
name: run-publish-benchmarks
on:
push:
branches: ["*"]
# Set minimal permissions for all jobs by default
permissions:
contents: read
jobs:
# 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
example-benchmarks:
runs-on: ubuntu-latest
needs: build-binaries
permissions:
contents: read
actions: write # Required for artifact download and upload
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
- 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: Make binaries executable
run: |
chmod +x ${{ runner.temp }}/bin/*
echo "Downloaded binaries:"
ls -la ${{ runner.temp }}/bin
- name: Run Basic Benchmarks
id: unit
run: |
mkdir ${{ runner.temp }}/data-dir
mkdir ${{ runner.temp }}/output
./.github/scripts/run-example-benchmarks.sh ${{ runner.temp }}
- name: Build Report
run: |
cp -r ${{ runner.temp }}/output/ ./output/
pushd report
npm install
npm run build
popd
- name: Upload Output
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
if: always()
with:
name: output
path: ${{ runner.temp }}/output/
# upload to github actions artifact
- name: Upload Report
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: report
path: report/dist/