core-lightning/.github/workflows/macos.yaml

69 lines
2.4 KiB
YAML
Raw Normal View History

2021-09-06 14:35:58 +02:00
---
name: Mac OS pytest
on:
pull_request:
2021-09-06 14:35:58 +02:00
jobs:
smoke-test:
name: Smoke Test macOS
runs-on: macos-latest
env:
DEVELOPER: 1
VALGRIND: 0
EXPERIMENTAL_FEATURES: 1
COMPAT: 0
strategy:
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
2021-09-06 14:35:58 +02:00
- name: Install dependencies
run: |
2022-02-24 14:32:37 +01:00
export PATH="/usr/local/opt:/Users/runner/.local/bin:/Users/runner/Library/Python/3.9/bin:$PATH"
2021-09-06 14:35:58 +02:00
export BITCOIN_VERSION=0.20.1
brew install wget python autoconf automake libtool python3 gmp gnu-sed gettext libsodium
(
cd /tmp/
wget https://storage.googleapis.com/c-lightning-tests/bitcoin-$BITCOIN_VERSION-osx64.tar.gz -O bitcoin.tar.gz
2021-09-06 14:35:58 +02:00
tar -xvzf bitcoin.tar.gz
sudo mv bitcoin-$BITCOIN_VERSION/bin/* /usr/local/bin
)
pip3 install --user poetry
poetry config virtualenvs.create false --local
poetry install
2021-09-06 14:35:58 +02:00
ln -s /usr/local/Cellar/gettext/0.20.1/bin/xgettext /usr/local/opt
export PATH="/usr/local/opt:$PATH"
- name: Build
env:
VALGRIND: ${{ matrix.VALGRIND }}
DEVELOPER: ${{ matrix.DEVELOPER }}
EXPERIMENTAL_FEATURES: ${{ matrix.EXPERIMENTAL_FEATURES }}
COMPILER: ${{ matrix.COMPILER }}
COMPAT: ${{ matrix.COMPAT }}
PYTEST_PAR: ${{ matrix.PYTEST_PAR }}
PYTEST_OPTS: ${{ matrix.PYTEST_OPTS }}
NO_PYTHON: ${{ matrix.NO_PYTHON }}
COPTFLAGS: ${{ matrix.COPTFLAGS }}
NETWORK: ${{ matrix.NETWORK }}
TEST_CMD: ${{ matrix.TEST_CMD }}
TEST_GROUP_COUNT: ${{ matrix.TEST_GROUP_COUNT }}
TEST_GROUP: ${{ matrix.TEST_GROUP }}
run: |
2022-02-24 14:32:37 +01:00
export PATH="/usr/local/opt:/Users/runner/.local/bin:/Users/runner/Library/Python/3.9/bin:$PATH"
2021-09-06 14:35:58 +02:00
export LDFLAGS="-L/usr/local/opt/sqlite/lib"
export CPPFLAGS="-I/usr/local/opt/sqlite/include"
cat << EOF > pytest.ini
[pytest]
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
markers =
slow_test: marks tests as slow (deselect with '-m "not slow_test"')
EOF
./configure
make