forked from bitcoin-dev-tools/benchcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
35 lines (27 loc) · 1.57 KB
/
justfile
File metadata and controls
35 lines (27 loc) · 1.57 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
set shell := ["bash", "-uc"]
os := os()
default:
just --list
# Build base and head binaries for CI
[group('ci')]
build-assumeutxo-binaries-guix base_commit head_commit:
./bench-ci/build_binaries.sh {{ base_commit }} {{ head_commit }}
# Run uninstrumented benchmarks on mainnet
[group('ci')]
run-mainnet-ci base_commit head_commit TMP_DATADIR ORIGINAL_DATADIR results_file dbcache binaries_dir:
./bench-ci/run-benchmark.sh {{ base_commit }} {{ head_commit }} {{ TMP_DATADIR }} {{ ORIGINAL_DATADIR }} {{ results_file }} main 855000 "148.251.128.115:33333" {{ dbcache }} {{ binaries_dir }}
# Run instrumented benchmarks on mainnet
[group('ci')]
run-mainnet-ci-instrumented base_commit head_commit TMP_DATADIR ORIGINAL_DATADIR results_file dbcache png_dir binaries_dir:
./bench-ci/run-benchmark-instrumented.sh {{ base_commit }} {{ head_commit }} {{ TMP_DATADIR }} {{ ORIGINAL_DATADIR }} {{ results_file }} {{ png_dir }} main 855000 "148.251.128.115:33333" {{ dbcache }} {{ binaries_dir }}
# Cherry-pick commits from a bitcoin core PR onto this branch
[group('git')]
pick-pr pr_number:
#!/usr/bin/env bash
set -euxo pipefail
if ! git remote get-url upstream 2>/dev/null | grep -q "bitcoin/bitcoin"; then
echo "Error: 'upstream' remote not found or doesn't point to bitcoin/bitcoin"
echo "Please add it with: `git remote add upstream https://github.com/bitcoin/bitcoin.git`"
exit 1
fi
git fetch upstream pull/{{ pr_number }}/head:bench-{{ pr_number }} && git cherry-pick $(git rev-list --reverse bench-{{ pr_number }} --not upstream/master)