Skip to content

Commit 454e01d

Browse files
committed
Fetch network graph cache and run benchmarks on CI
1 parent 2ae6b3f commit 454e01d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,39 @@ jobs:
126126
token: f421b687-4dc2-4387-ac3d-dc3b2528af57
127127
fail_ci_if_error: true
128128

129+
benchmark:
130+
runs-on: ubuntu-latest
131+
env:
132+
TOOLCHAIN: nightly
133+
steps:
134+
- name: Checkout source code
135+
uses: actions/checkout@v2
136+
- name: Install Rust ${{ env.TOOLCHAIN }} toolchain
137+
uses: actions-rs/toolchain@v1
138+
with:
139+
toolchain: ${{ env.TOOLCHAIN }}
140+
override: true
141+
profile: minimal
142+
- name: Cache routing graph snapshot
143+
id: cache-graph
144+
uses: actions/cache@v2
145+
with:
146+
path: lightning/net_graph-2021-02-12.bin
147+
key: net_graph-2021-02-12
148+
- name: Fetch routing graph snapshot
149+
if: steps.cache-graph.outputs.cache-hit != 'true'
150+
run: |
151+
wget -O lightning/net_graph-2021-02-12.bin https://bitcoin.ninja/ldk-net_graph-879e309c128-2020-02-12.bin
152+
if [ "$(sha256sum lightning/net_graph-2021-02-12.bin | awk '{ print $1 }')" != "890a1f80dfb6ef674a1e4ff0f23cd73d740731c395f99d85abbede0cfbb701ab" ]; then
153+
echo "Bad hash"
154+
exit 1
155+
fi
156+
- name: Run benchmarks on Rust ${{ matrix.toolchain }}
157+
run: |
158+
cd lightning
159+
cargo bench --features unstable
160+
cd ..
161+
129162
check_commits:
130163
runs-on: ubuntu-latest
131164
env:

0 commit comments

Comments
 (0)