Skip to content

Commit 5ad028f

Browse files
committed
ci: add secp256 unit test workflow
This workflow job detects whether the secp256k1 subtree was updated, and if it was will build and run the secp256k1 unit tests. These are disabled by default (in other CI jobs), as they double the runtime needed, and rarely change.
1 parent 7c1fb9e commit 5ad028f

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/secp256.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright (c) 2025-present The Bitcoin Core developers
2+
# Distributed under the MIT software license, see the accompanying
3+
# file COPYING or https://opensource.org/license/mit.
4+
5+
name: secp256k1 tests
6+
on:
7+
pull_request:
8+
paths:
9+
- 'src/secp256k1/**'
10+
push:
11+
paths:
12+
- 'src/secp256k1/**'
13+
14+
env:
15+
MAKEJOBS: '-j10'
16+
17+
jobs:
18+
secp256k1-tests:
19+
name: 'secp256k1 tests'
20+
runs-on: ubuntu-24.04
21+
if: github.event_name == 'pull_request'
22+
timeout-minutes: 120
23+
steps:
24+
- name: Install dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y build-essential cmake pkgconf python3 libevent-dev libboost-dev libsqlite3-dev
28+
- name: Build with secp256k1 tests enabled
29+
run: |
30+
cmake -B build \
31+
-DSECP256K1_BUILD_TESTS=ON \
32+
-DSECP256K1_BUILD_EXHAUSTIVE_TESTS=ON
33+
cmake --build build -j $(nproc)
34+
- name: Run secp256k1 tests
35+
run: |
36+
# Run only the secp256k1 tests
37+
ctest --test-dir build --output-on-failure -R "secp256k1" -j $(nproc)

0 commit comments

Comments
 (0)