Skip to content

Commit d35043a

Browse files
committed
gci: Add macOS configuration
1 parent dd93f5d commit d35043a

File tree

1 file changed

+94
-0
lines changed

1 file changed

+94
-0
lines changed

.github/workflows/macos.yaml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
name: Mac OS pytest
3+
on: [push, pull_request]
4+
jobs:
5+
smoke-test:
6+
name: Smoke Test macOS
7+
runs-on: macos-latest
8+
env:
9+
DEVELOPER: 1
10+
VALGRIND: 0
11+
EXPERIMENTAL_FEATURES: 1
12+
COMPAT: 0
13+
strategy:
14+
fail-fast: true
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2.0.0
18+
19+
- name: Set up Python 3.6
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.6
23+
24+
- name: Install dependencies
25+
run: |
26+
export BITCOIN_VERSION=0.20.1
27+
brew install wget python autoconf automake libtool python3 gmp gnu-sed gettext libsodium
28+
29+
(
30+
cd /tmp/
31+
wget https://bitcoin.org/bin/bitcoin-core-$BITCOIN_VERSION/bitcoin-$BITCOIN_VERSION-osx64.tar.gz -O bitcoin.tar.gz
32+
tar -xvzf bitcoin.tar.gz
33+
sudo mv bitcoin-$BITCOIN_VERSION/bin/* /usr/local/bin
34+
)
35+
36+
pip install --upgrade mako pip
37+
ln -s /usr/local/Cellar/gettext/0.20.1/bin/xgettext /usr/local/opt
38+
export PATH="/usr/local/opt:$PATH"
39+
40+
- name: Build
41+
env:
42+
VALGRIND: ${{ matrix.VALGRIND }}
43+
DEVELOPER: ${{ matrix.DEVELOPER }}
44+
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
45+
COMPILER: ${{ matrix.COMPILER }}
46+
COMPAT: ${{ matrix.COMPAT }}
47+
PYTEST_PAR: ${{ matrix.PYTEST_PAR }}
48+
PYTEST_OPTS: ${{ matrix.PYTEST_OPTS }}
49+
NO_PYTHON: ${{ matrix.NO_PYTHON }}
50+
COPTFLAGS: ${{ matrix.COPTFLAGS }}
51+
NETWORK: ${{ matrix.NETWORK }}
52+
TEST_CMD: ${{ matrix.TEST_CMD }}
53+
TEST_GROUP_COUNT: ${{ matrix.TEST_GROUP_COUNT }}
54+
TEST_GROUP: ${{ matrix.TEST_GROUP }}
55+
run: |
56+
export PATH="/usr/local/opt:$PATH"
57+
export LDFLAGS="-L/usr/local/opt/sqlite/lib"
58+
export CPPFLAGS="-I/usr/local/opt/sqlite/include"
59+
60+
pip3 install -U \
61+
-r requirements.txt \
62+
-r contrib/pyln-client/requirements.txt \
63+
-r contrib/pyln-proto/requirements.txt \
64+
-r contrib/pyln-testing/requirements.txt
65+
66+
# Install utilities that aren't dependencies, but make
67+
# running tests easier/feasible on CI (and pytest which
68+
# keeps breaking the rerunfailures plugin).
69+
pip3 install -U \
70+
flaky \
71+
blinker \
72+
pytest-sentry \
73+
pytest-test-groups==1.0.3 \
74+
pytest-custom-exit-code==0.3.0 \
75+
pytest-json-report \
76+
mypy==0.790
77+
78+
cat << EOF > pytest.ini
79+
[pytest]
80+
addopts=-p no:logging --color=yes --timeout=600 --timeout-method=thread --test-group-random-seed=42 --force-flaky --no-success-flaky-report --max-runs=3 --junitxml=report.xml --json-report --json-report-file=report.json --json-report-indent=2
81+
markers =
82+
slow_test: marks tests as slow (deselect with '-m "not slow_test"')
83+
EOF
84+
85+
./configure
86+
make
87+
88+
- name: Upload Unit Test Results
89+
if: always()
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: Junit Report ${{ github.run_number }}.${{ matrix.cfg }}
93+
path: report.*
94+
if-no-files-found: ignore

0 commit comments

Comments
 (0)