mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 23:06:44 +01:00
62 lines
2 KiB
YAML
62 lines
2 KiB
YAML
---
|
|
name: Mac OS pytest
|
|
on:
|
|
pull_request:
|
|
jobs:
|
|
smoke-test:
|
|
name: Smoke Test macOS
|
|
runs-on: macos-14
|
|
timeout-minutes: 120
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
bitcoind-version: ["27.1"]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download Bitcoin ${{ matrix.bitcoind-version }} & install binaries
|
|
run: |
|
|
export BITCOIND_VERSION=${{ matrix.bitcoind-version }}
|
|
export TARGET_ARCH="arm64-apple-darwin"
|
|
|
|
wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIND_VERSION}/bitcoin-${BITCOIND_VERSION}-${TARGET_ARCH}.tar.gz
|
|
tar -xzf bitcoin-${BITCOIND_VERSION}-${TARGET_ARCH}.tar.gz
|
|
sudo mv bitcoin-${BITCOIND_VERSION}/bin/* /usr/local/bin
|
|
rm -rf bitcoin-${BITCOIND_VERSION}-${TARGET_ARCH}.tar.gz bitcoin-${BITCOIND_VERSION}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
export PATH="/usr/local/opt:/Users/runner/.local/bin:/opt/homebrew/bin/python3.10/bin:$PATH"
|
|
|
|
brew install gnu-sed python@3.10 autoconf automake libtool protobuf
|
|
python3.10 -m pip install -U --user poetry==1.8.0 wheel pip mako
|
|
python3.10 -m poetry install
|
|
|
|
- name: Build and install CLN
|
|
run: |
|
|
export CPATH=/opt/homebrew/include
|
|
export LIBRARY_PATH=/opt/homebrew/lib
|
|
|
|
python3.10 -m poetry run ./configure --disable-valgrind --disable-compat
|
|
python3.10 -m poetry run make
|
|
|
|
- name: Start bitcoind in regtest mode
|
|
run: |
|
|
bitcoind -regtest -daemon
|
|
sleep 5
|
|
|
|
- name: Generate initial block
|
|
run: |
|
|
bitcoin-cli -regtest createwallet default_wallet
|
|
bitcoin-cli -regtest generatetoaddress 1 $(bitcoin-cli -regtest getnewaddress)
|
|
sleep 2
|
|
|
|
- name: Start CLN in regtest mode
|
|
run: |
|
|
lightningd/lightningd --network=regtest --log-file=/tmp/l1.log --daemon
|
|
sleep 5
|
|
|
|
- name: Verify CLN is running
|
|
run: |
|
|
cli/lightning-cli --regtest getinfo
|