Skip to content

Commit

Permalink
Travis: don't install requirements.txt if we're just building.
Browse files Browse the repository at this point in the history
(And running unit tests).

This tests our instructions in INSTALL.md, which say you only need
requirements.txt for development or running tests, not building.

Also removes the unused SOURCE_CHECK_ONLY flag.

Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Aug 31, 2020
1 parent 4bc2f15 commit 9b34210
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ before_install:

env:
# These run superficial checks that don't take too long on their own
- ARCH=64 TEST_CMD="make" NO_PYTHON=1
- ARCH=64 TEST_CMD="make check-source check-units installcheck" COPTFLAGS="-O3"
- ARCH=32 TEST_CMD="make check-source check-units installcheck" DEVELOPER=0
- ARCH=64 TEST_CMD="make check-source check-units installcheck" DEVELOPER=0 COMPILER=gcc-4.8
Expand Down
39 changes: 20 additions & 19 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export SLOW_MACHINE=1
export CC=${COMPILER:-gcc}
export DEVELOPER=${DEVELOPER:-1}
export EXPERIMENTAL_FEATURES=${EXPERIMENTAL_FEATURES:-0}
export SOURCE_CHECK_ONLY=${SOURCE_CHECK_ONLY:-"false"}
export COMPAT=${COMPAT:-1}
export PATH=$CWD/dependencies/bin:"$HOME"/.local/bin:"$PATH"
export PYTEST_PAR=2
export PYTEST_SENTRY_ALWAYS_REPORT=1
export BOLTDIR=lightning-rfc

# Allow up to 4 concurrent tests when not under valgrind, which might run out of memory.
if [ "$VALGRIND" = 0 ]; then
PYTEST_PAR=4
Expand All @@ -28,34 +28,35 @@ if [ ! -f dependencies/bin/bitcoind ]; then
rm -rf bitcoin-0.20.1-x86_64-linux-gnu.tar.gz bitcoin-0.20.1
fi

pyenv global 3.7
if [ "$NO_PYTHON" != 1 ]; then
pyenv global 3.7

pip3 install --user -U --quiet --progress-bar off \
pip \
pytest-test-groups==1.0.3

# Update pip first, may save us the compilation of binary packages in the next call
pip3 install --user -U --quiet --progress-bar off \
pip \
pytest-test-groups==1.0.3
pip3 install --user -U --quiet --progress-bar off \
-r requirements.txt \
-r contrib/pyln-client/requirements.txt \
-r contrib/pyln-proto/requirements.txt \
-r contrib/pyln-testing/requirements.txt

pip3 install --user -U --quiet --progress-bar off \
-r requirements.txt \
-r contrib/pyln-client/requirements.txt \
-r contrib/pyln-proto/requirements.txt \
-r contrib/pyln-testing/requirements.txt
pip3 install --user -U --quiet --progress-bar off \
pytest-sentry \
pytest-rerunfailures

pip3 install --user -U --quiet --progress-bar off \
pytest-sentry \
pytest-rerunfailures
cat > pytest.ini << EOF
[pytest]
addopts=-p no:logging --color=no --reruns=5
EOF
fi

echo "Configuration which is going to be built:"
echo -en 'travis_fold:start:script.1\\r'
./configure CC="$CC"
cat config.vars
echo -en 'travis_fold:end:script.1\\r'

cat > pytest.ini << EOF
[pytest]
addopts=-p no:logging --color=no --reruns=5
EOF

git clone https://github.com/lightningnetwork/lightning-rfc.git

if [ "$TARGET_HOST" == "arm-linux-gnueabihf" ] || [ "$TARGET_HOST" == "aarch64-linux-gnu" ]
Expand Down

0 comments on commit 9b34210

Please sign in to comment.