Skip to content

Commit e877ecd

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

File tree

2 files changed

+39
-6
lines changed

2 files changed

+39
-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

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

0 commit comments

Comments
 (0)