-
Notifications
You must be signed in to change notification settings - Fork 905
68 lines (55 loc) · 2.29 KB
/
macos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: Mac OS pytest
on:
pull_request:
jobs:
smoke-test:
name: Smoke Test macOS
runs-on: macos-latest
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:/Users/runner/Library/Python/3.10/bin:$PATH"
brew install wget autoconf automake libtool python@3.10 gnu-sed gettext libsodium protobuf
python3.10 -m pip install -U --user poetry wheel pip
python3.10 -m poetry install
python3.10 -m pip install -U --user mako
sudo ln -s /usr/local/Cellar/gettext/0.20.1/bin/xgettext /usr/local/opt
- name: Build and install
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
# sudo PATH="/usr/local/opt:$PATH" LIBRARY_PATH=/opt/homebrew/lib CPATH=/opt/homebrew/include make install
- 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 lightningd in regtest mode
run: |
lightningd/lightningd --network=regtest --log-file=/tmp/l1.log --daemon
sleep 5
- name: Verify lightningd is running
run: |
cli/lightning-cli --regtest getinfo