gci: Switch docs and CI builder to use poetry

This commit is contained in:
Christian Decker
2022-02-22 14:42:40 +01:00
committed by Rusty Russell
parent d51f97a9e4
commit 70840ef066
5 changed files with 22 additions and 38 deletions

View File

@@ -21,28 +21,9 @@ export VALGRIND=${VALGRIND:-0}
export FUZZING=${FUZZING:-0} export FUZZING=${FUZZING:-0}
export LIGHTNINGD_POSTGRES_NO_VACUUM=1 export LIGHTNINGD_POSTGRES_NO_VACUUM=1
pip3 install --user -U \ pip3 install --user poetry
-r requirements.lock poetry config virtualenvs.create false --local
poetry install
timeout 60 pip3 install --user \
--use-feature=in-tree-build \
./contrib/pyln-client \
./contrib/pyln-proto \
./contrib/pyln-testing
# Install utilities that aren't dependencies, but make
# running tests easier/feasible on CI (and pytest which
# keeps breaking the rerunfailures plugin).
pip3 install --user \
blinker \
flake8 \
flaky \
mako \
pytest-sentry \
pytest-test-groups==1.0.3 \
pytest-custom-exit-code==0.3.0 \
pytest-timeout \
pytest-json-report
git clone https://github.com/lightningnetwork/lightning-rfc.git ../lightning-rfc git clone https://github.com/lightningnetwork/lightning-rfc.git ../lightning-rfc
git submodule update --init --recursive git submodule update --init --recursive

View File

@@ -30,10 +30,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.0.0 uses: actions/checkout@v2.0.0
- name: Fetch tags for auto versioning - name: Set up Python 3.7
run: git fetch --prune --unshallow --tags -f
- name: Set up Python 3.6
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.6 python-version: 3.6

View File

@@ -16,9 +16,6 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.0.0 uses: actions/checkout@v2.0.0
- name: Fetch tags for auto versioning
run: git fetch --prune --unshallow --tags
- name: Set up Python 3.6 - name: Set up Python 3.6
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
@@ -36,7 +33,10 @@ jobs:
sudo mv bitcoin-$BITCOIN_VERSION/bin/* /usr/local/bin sudo mv bitcoin-$BITCOIN_VERSION/bin/* /usr/local/bin
) )
pip install --upgrade mako pip pip3 install --user poetry
poetry config virtualenvs.create false --local
poetry install
ln -s /usr/local/Cellar/gettext/0.20.1/bin/xgettext /usr/local/opt ln -s /usr/local/Cellar/gettext/0.20.1/bin/xgettext /usr/local/opt
export PATH="/usr/local/opt:$PATH" export PATH="/usr/local/opt:$PATH"

View File

@@ -38,9 +38,9 @@ Get dependencies:
sudo apt-get update sudo apt-get update
sudo apt-get install -y \ sudo apt-get install -y \
autoconf automake build-essential git libtool libgmp-dev libsqlite3-dev \ autoconf automake build-essential git libtool libgmp-dev libsqlite3-dev \
python3 python3-mako python3-pip net-tools zlib1g-dev libsodium-dev \ python3 python3-pip net-tools zlib1g-dev libsodium-dev gettext
gettext pip install --user poetry
pip3 install --user mrkd mistune==0.8.4 poetry install
If you don't have Bitcoin installed locally you'll need to install that If you don't have Bitcoin installed locally you'll need to install that
as well. It's now available via [snapd](https://snapcraft.io/bitcoin-core). as well. It's now available via [snapd](https://snapcraft.io/bitcoin-core).
@@ -60,8 +60,6 @@ For development or running tests, get additional dependencies:
sudo apt-get install -y valgrind libpq-dev shellcheck cppcheck \ sudo apt-get install -y valgrind libpq-dev shellcheck cppcheck \
libsecp256k1-dev jq libsecp256k1-dev jq
pip3 install --upgrade pip
pip3 install --user -r requirements.txt
Build lightning: Build lightning:
@@ -150,7 +148,8 @@ fiddle with compile time options:
mrkd is required to build man pages from markdown files (not done by the port): mrkd is required to build man pages from markdown files (not done by the port):
# cd /usr/ports/devel/py-pip && make install # cd /usr/ports/devel/py-pip && make install
$ pip install --user mrkd $ pip install --user poetry
$ poetry install
See `/usr/ports/net-p2p/c-lightning/Makefile` for instructions on how to See `/usr/ports/net-p2p/c-lightning/Makefile` for instructions on how to
build from an arbitrary git commit, instead of the latest release tag. build from an arbitrary git commit, instead of the latest release tag.
@@ -183,8 +182,8 @@ pkg_add autoconf # (select highest version, autoconf-2.69p2 at time of writing)
``` ```
Install `mako` and `mrkd` otherwise we run into build errors: Install `mako` and `mrkd` otherwise we run into build errors:
``` ```
pip3.7 install --user mako pip3.7 install --user poetry
pip3.7 install --user mrkd poetry install
``` ```
Add `/home/<username>/.local/bin` to your path: Add `/home/<username>/.local/bin` to your path:

7
poetry.lock generated
View File

@@ -1194,6 +1194,13 @@ pytest-forked = [
{file = "pytest-forked-1.4.0.tar.gz", hash = "sha256:8b67587c8f98cbbadfdd804539ed5455b6ed03802203485dd2f53c1422d7440e"}, {file = "pytest-forked-1.4.0.tar.gz", hash = "sha256:8b67587c8f98cbbadfdd804539ed5455b6ed03802203485dd2f53c1422d7440e"},
{file = "pytest_forked-1.4.0-py3-none-any.whl", hash = "sha256:bbbb6717efc886b9d64537b41fb1497cfaf3c9601276be8da2cccfea5a3c8ad8"}, {file = "pytest_forked-1.4.0-py3-none-any.whl", hash = "sha256:bbbb6717efc886b9d64537b41fb1497cfaf3c9601276be8da2cccfea5a3c8ad8"},
] ]
pytest-test-groups = [
{file = "pytest-test-groups-1.0.3.tar.gz", hash = "sha256:a93ee8ae8605ad290965508d13efc975de64f80429465837af5f3dd5bc93fd96"},
]
pytest-timeout = [
{file = "pytest-timeout-2.1.0.tar.gz", hash = "sha256:c07ca07404c612f8abbe22294b23c368e2e5104b521c1790195561f37e1ac3d9"},
{file = "pytest_timeout-2.1.0-py3-none-any.whl", hash = "sha256:f6f50101443ce70ad325ceb4473c4255e9d74e3c7cd0ef827309dfa4c0d975c6"},
]
pytest-xdist = [ pytest-xdist = [
{file = "pytest-xdist-2.5.0.tar.gz", hash = "sha256:4580deca3ff04ddb2ac53eba39d76cb5dd5edeac050cb6fbc768b0dd712b4edf"}, {file = "pytest-xdist-2.5.0.tar.gz", hash = "sha256:4580deca3ff04ddb2ac53eba39d76cb5dd5edeac050cb6fbc768b0dd712b4edf"},
{file = "pytest_xdist-2.5.0-py3-none-any.whl", hash = "sha256:6fe5c74fec98906deb8f2d2b616b5c782022744978e7bd4695d39c8f42d0ce65"}, {file = "pytest_xdist-2.5.0-py3-none-any.whl", hash = "sha256:6fe5c74fec98906deb8f2d2b616b5c782022744978e7bd4695d39c8f42d0ce65"},