feat: improve gas estimation and contract (#167) #112
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: run-publish-benchmarks | |
| on: | |
| push: | |
| branches: ["main"] | |
| # 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 | |
| builder_version: 23f42c8e78ba3abb45a8840df7037a27e196e601 | |
| basic-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: 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 | |
| go run benchmark/cmd/main.go \ | |
| --log.level info \ | |
| run \ | |
| --config ./configs/public/public-benchmark.yml \ | |
| --root-dir ${{ runner.temp }}/data-dir \ | |
| --output-dir ${{ runner.temp }}/output \ | |
| --reth-bin ${{ runner.temp }}/bin/reth \ | |
| --geth-bin ${{ runner.temp }}/bin/geth | |
| - name: Build Report | |
| run: | | |
| cp -r ${{ runner.temp }}/output/ ./output/ | |
| pushd report | |
| npm install | |
| npm run build | |
| popd | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1 | |
| with: | |
| path: report/dist/ | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: basic-benchmarks | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1 | |
| with: | |
| egress-policy: audit | |
| - name: Publish Report | |
| uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 |