File tree Expand file tree Collapse file tree 2 files changed +46
-38
lines changed
Expand file tree Collapse file tree 2 files changed +46
-38
lines changed Original file line number Diff line number Diff line change 1+ name : CI Checks - Benchmarks
2+
3+ on : [push, pull_request]
4+
5+ concurrency :
6+ group : ${{ github.workflow }}-${{ github.ref }}
7+ cancel-in-progress : true
8+
9+ jobs :
10+ benchmark :
11+ runs-on : ubuntu-latest
12+ env :
13+ TOOLCHAIN : stable
14+ steps :
15+ - name : Checkout source code
16+ uses : actions/checkout@v3
17+ - name : Install Rust toolchain
18+ run : |
19+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
20+ rustup override set stable
21+ - name : Enable caching for bitcoind
22+ id : cache-bitcoind
23+ uses : actions/cache@v4
24+ with :
25+ path : bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
26+ key : bitcoind-${{ runner.os }}-${{ runner.arch }}
27+ - name : Enable caching for electrs
28+ id : cache-electrs
29+ uses : actions/cache@v4
30+ with :
31+ path : bin/electrs-${{ runner.os }}-${{ runner.arch }}
32+ key : electrs-${{ runner.os }}-${{ runner.arch }}
33+ - name : Download bitcoind/electrs
34+ if : " (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
35+ run : |
36+ source ./scripts/download_bitcoind_electrs.sh
37+ mkdir bin
38+ mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
39+ mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
40+ - name : Set bitcoind/electrs environment variables
41+ run : |
42+ echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
43+ echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
44+ - name : Run benchmarks
45+ run : |
46+ cargo bench
Original file line number Diff line number Diff line change 9090 if : " matrix.platform != 'windows-latest' && matrix.build-uniffi"
9191 run : |
9292 RUSTFLAGS="--cfg no_download" cargo test --features uniffi
93-
94- benchmark :
95- runs-on : ubuntu-latest
96- env :
97- TOOLCHAIN : stable
98- steps :
99- - name : Checkout source code
100- uses : actions/checkout@v3
101- - name : Install Rust toolchain
102- run : |
103- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain stable
104- rustup override set stable
105- - name : Enable caching for bitcoind
106- id : cache-bitcoind
107- uses : actions/cache@v4
108- with :
109- path : bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
110- key : bitcoind-${{ runner.os }}-${{ runner.arch }}
111- - name : Enable caching for electrs
112- id : cache-electrs
113- uses : actions/cache@v4
114- with :
115- path : bin/electrs-${{ runner.os }}-${{ runner.arch }}
116- key : electrs-${{ runner.os }}-${{ runner.arch }}
117- - name : Download bitcoind/electrs
118- if : " (steps.cache-bitcoind.outputs.cache-hit != 'true' || steps.cache-electrs.outputs.cache-hit != 'true')"
119- run : |
120- source ./scripts/download_bitcoind_electrs.sh
121- mkdir bin
122- mv "$BITCOIND_EXE" bin/bitcoind-${{ runner.os }}-${{ runner.arch }}
123- mv "$ELECTRS_EXE" bin/electrs-${{ runner.os }}-${{ runner.arch }}
124- - name : Set bitcoind/electrs environment variables
125- run : |
126- echo "BITCOIND_EXE=$( pwd )/bin/bitcoind-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
127- echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
128- - name : Run benchmarks
129- run : |
130- cargo bench
You can’t perform that action at this time.
0 commit comments