Skip to content

Commit 8168858

Browse files
committed
test build with bitcoin-sv commit
1 parent e81107a commit 8168858

File tree

2 files changed

+38
-6
lines changed

2 files changed

+38
-6
lines changed

.github/workflows/build_bdk.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: Build BDK
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize]
6-
push:
7-
branches:
8-
- master
4+
# pull_request:
5+
# types: [opened, synchronize]
6+
# push:
7+
# branches:
8+
# - master
99
workflow_dispatch:
1010

1111
jobs:

.github/workflows/test_whatever.yaml

+33-1
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,52 @@
11
name: Test workflow
22

33
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
push:
7+
branches:
8+
- master
49
workflow_dispatch:
10+
inputs:
11+
bitcoin-sv-input:
12+
description: 'Optionally build bdk with custom bitcoin-sv commit'
13+
required: false
14+
default: 394645fcba643e5f7090ff1beb246a2b72b3b172
15+
16+
env:
17+
DEFAULT_BITCOIN_SV_COMMIT: 394645fcba643e5f7090ff1beb246a2b72b3b172
518

619
jobs:
720
build-bdk:
821
strategy:
922
matrix:
10-
os: [linux-arm64-8-core, ubuntu-24.04, macos-15]
23+
os: [linux-arm64-8-core, ubuntu-24.04, macos-15, macos-13]
1124
fail-fast: false
1225
runs-on: ${{ matrix.os }}
1326

1427
steps:
1528
- name: Checkout repository
1629
uses: actions/checkout@v4
1730

31+
- name: Define dependant bitcoin-sv commit
32+
id: define-bitcoin-sv-commit
33+
run: |
34+
# Use dispatch input if present, otherwise default from env
35+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
36+
bsvcommit="${{ github.event.inputs.bitcoin-sv-input }}"
37+
else
38+
bsvcommit="${{ env.DEFAULT_BITCOIN_SV_COMMIT }}"
39+
fi
40+
echo "Build using bsvcommit=$bsvcommit ..."
41+
echo "bsvcommit=$bsvcommit" >> "$GITHUB_OUTPUT"
42+
43+
- name: Check out bitcoin-sv
44+
run: |
45+
echo "Checking out bitcoin-sv at commit ${{ steps.define-bitcoin-sv-commit.outputs.bsvcommit }} ..."
46+
git clone https://x-access-token:${{ secrets.BITCOIN_SV_PAT }}@github.com/nchain-research/bitcoin-sv-staging.git bitcoin-sv
47+
cd bitcoin-sv && git checkout ${{ steps.define-bitcoin-sv-commit.outputs.bsvcommit }} && git log -3 && pwd && cd ..
48+
echo "Successfully checked out bitcoin-sv commit ${{ steps.define-bitcoin-sv-commit.outputs.bsvcommit }} to bitcoin-sv"
49+
1850
- name: Get OS ARCH Name
1951
run: |
2052
echo "OS_ARCH=$(uname -s | tr 'A-Z' 'a-z')_$(uname -m)" >> $GITHUB_ENV

0 commit comments

Comments
 (0)