|
5 | 5 | push: |
6 | 6 | branches: [ "main" ] |
7 | 7 | pull_request: |
8 | | - branches: [ "main" ] |
9 | 8 |
|
10 | 9 | jobs: |
11 | 10 | go-lint: |
@@ -47,43 +46,65 @@ jobs: |
47 | 46 | run: | |
48 | 47 | go test -v -coverprofile=coverage.out ./... |
49 | 48 | |
50 | | - # basic-benchmarks: |
51 | | - # runs-on: ubuntu-latest |
52 | | - # steps: |
53 | | - # - uses: actions/checkout@v3 |
54 | | - |
55 | | - # - name: Set up Go |
56 | | - # uses: actions/setup-go@v3 |
57 | | - # with: |
58 | | - # go-version: 1.24 |
59 | | - |
60 | | - # - name: Install project dependencies |
61 | | - # run: | |
62 | | - # go mod download |
63 | | - |
64 | | - # - name: Download geth and reth |
65 | | - # run: | |
66 | | - # # https://github.com/paradigmxyz/reth/releases/download/v1.3.4/reth-v1.3.4-x86_64-unknown-linux-gnu.tar.gz |
67 | | - # # 62e5e435d1e981f97fff76f638fdf7cc4b9dbcbed66fcb10c4be6bd9d0dfd0ba /Users/meyer9/Downloads/reth-v1.3.4-x86_64-unknown-linux-gnu.tar.gz.asc |
68 | | - # # Install from github.com/ethereum-optimism/op-geth |
69 | | - |
70 | | - # wget https://github.com/paradigmxyz/reth/releases/download/v1.3.4/reth-v1.3.4-x86_64-unknown-linux-gnu.tar.gz |
71 | | - # echo "62e5e435d1e981f97fff76f638fdf7cc4b9dbcbed66fcb10c4be6bd9d0dfd0ba reth-v1.3.4-x86_64-unknown-linux-gnu.tar.gz" | shasum -a 256 -c |
72 | | - # tar -xvf reth-v1.3.4-x86_64-unknown-linux-gnu.tar.gz # contains ./reth |
73 | | - # chmod +x ./reth |
74 | | - |
75 | | - # git clone https://github.com/ethereum-optimism/op-geth |
76 | | - # cd op-geth |
77 | | - # git checkout --force 4bc345b22fbee14d3162becd197373a9565b7c6d |
78 | | - # make geth |
79 | | - # cp ./build/bin/geth .. |
80 | | - # cd .. |
81 | | - # chmod +x ./geth |
82 | | - |
83 | | - # ls -la |
84 | | - |
85 | | - # - name: Run Basic Benchmarks |
86 | | - # id: unit |
87 | | - # run: | |
88 | | - # mkdir ./data-dir |
89 | | - # go run benchmark/cmd/main.go --log.level debug run --config ./configs/basic.yml --root-dir ./data-dir --reth-bin ./reth --geth-bin ./geth |
| 49 | + basic-benchmarks: |
| 50 | + runs-on: ubuntu-latest |
| 51 | + steps: |
| 52 | + - uses: actions/checkout@v3 |
| 53 | + |
| 54 | + - name: Set up Go |
| 55 | + uses: actions/setup-go@v3 |
| 56 | + with: |
| 57 | + go-version: 1.24 |
| 58 | + |
| 59 | + - name: Set up Rust |
| 60 | + uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0 |
| 61 | + |
| 62 | + - name: Install project dependencies |
| 63 | + run: | |
| 64 | + go mod download |
| 65 | +
|
| 66 | + - name: Cache binaries |
| 67 | + uses: actions/cache@v3 |
| 68 | + id: cache-bin |
| 69 | + with: |
| 70 | + path: ${{ runner.temp }}/bin |
| 71 | + key: ${{ runner.os }}-binaries |
| 72 | + |
| 73 | + - name: Download geth and reth |
| 74 | + if: steps.cache-bin.outputs.cache-hit != 'true' |
| 75 | + run: | |
| 76 | + mkdir -p ${{ runner.temp }}/bin |
| 77 | +
|
| 78 | + git clone https://github.com/paradigmxyz/reth |
| 79 | + git -C reth checkout --force fad870e3508adcc150faa4554111368e0e16f43b |
| 80 | + |
| 81 | + pushd reth |
| 82 | + cargo build --features asm-keccak --profile release --bin op-reth --manifest-path crates/optimism/bin/Cargo.toml |
| 83 | + cp ./target/release/op-reth ${{ runner.temp }}/bin/reth |
| 84 | + popd |
| 85 | + chmod +x ${{ runner.temp }}/bin/reth |
| 86 | +
|
| 87 | + git clone https://github.com/ethereum-optimism/op-geth |
| 88 | + git -C op-geth checkout --force 4bc345b22fbee14d3162becd197373a9565b7c6d |
| 89 | +
|
| 90 | + pushd op-geth |
| 91 | + make geth |
| 92 | + cp ./build/bin/geth ${{ runner.temp }}/bin/geth |
| 93 | + chmod +x ${{ runner.temp }}/bin/geth |
| 94 | + popd |
| 95 | +
|
| 96 | + echo "binaries compiled:" |
| 97 | + ls -la ${{ runner.temp }}/bin |
| 98 | +
|
| 99 | + - name: Run Basic Benchmarks |
| 100 | + id: unit |
| 101 | + run: | |
| 102 | + mkdir ${{ runner.temp }}/data-dir |
| 103 | + mkdir ${{ runner.temp }}/output |
| 104 | + go run benchmark/cmd/main.go \ |
| 105 | + --log.level debug \ |
| 106 | + run \ |
| 107 | + --config ./configs/basic-reth.yml \ |
| 108 | + --root-dir ${{ runner.temp }}/data-dir \ |
| 109 | + --reth-bin ${{ runner.temp }}/bin/reth \ |
| 110 | + --geth-bin ${{ runner.temp }}/bin/geth |
0 commit comments