Skip to content

test build with bitcoin-sv commit #44

test build with bitcoin-sv commit

test build with bitcoin-sv commit #44

name: Test workflow
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- master
workflow_dispatch:
inputs:
bitcoin-sv-input:
description: 'Optionally build bdk with custom bitcoin-sv commit'
required: false
default: 394645fcba643e5f7090ff1beb246a2b72b3b172
env:
DEFAULT_BITCOIN_SV_COMMIT: 394645fcba643e5f7090ff1beb246a2b72b3b172
jobs:
build-bdk:
strategy:
matrix:
os: [linux-arm64-8-core, ubuntu-24.04, macos-15, macos-13, windows-2022]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Define dependant bitcoin-sv commit
id: define-bitcoin-sv-commit
shell: bash
run: |
# Use dispatch input if present, otherwise default from env
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
bsvcommit="${{ github.event.inputs.bitcoin-sv-input }}"
else
bsvcommit="${{ env.DEFAULT_BITCOIN_SV_COMMIT }}"
fi
echo "Build using bsvcommit=$bsvcommit ..."
echo "bsvcommit=$bsvcommit" >> "$GITHUB_OUTPUT"
- name: Check out bitcoin-sv
shell: bash
run: |
echo "Checking out bitcoin-sv at commit ${{ steps.define-bitcoin-sv-commit.outputs.bsvcommit }} ..."
git clone https://x-access-token:${{ secrets.BITCOIN_SV_PAT }}@github.com/nchain-research/bitcoin-sv-staging.git bitcoin-sv
cd bitcoin-sv && git checkout ${{ steps.define-bitcoin-sv-commit.outputs.bsvcommit }} && git log -3 && pwd && cd ..
echo "Successfully checked out bitcoin-sv commit ${{ steps.define-bitcoin-sv-commit.outputs.bsvcommit }} to bitcoin-sv"
- name: Get OS ARCH Name
run: |
echo "OS_ARCH=$(uname -s | tr 'A-Z' 'a-z')_$(uname -m)" >> $GITHUB_ENV
- name: Display G++ Version
run: |
echo "Checking G++ version..."
g++ --version
- name: Check Runtime Libraries
run: |
echo "Compiling a simple test program..."
echo '#include <iostream>' > test.cpp
echo 'int main() { std::cout << "Hello, world!" << std::endl; return 0; }' >> test.cpp
g++ test.cpp -o testcpp
echo "Checking linked runtime libraries with ldd..."
ldd testcpp
- name: Check libstdc++ Version
run: |
echo "Checking libstdc++ version..."
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX || echo "libstdc++ not found"
- name: Check glibc Version
run: |
echo "Checking glibc version..."
ldd --version