Skip to content

Commit 10057b1

Browse files
committed
Cache dependencies for Travis build
Also: * Move temporary directory to /tmp * Remove files with wrong hash (so we don't have to remove them manually)
1 parent 83f2dc4 commit 10057b1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ python:
66
install:
77
- pip install -r contrib/requirements/requirements-travis.txt
88
cache:
9-
- pip
9+
- pip: true
10+
- directories:
11+
- /tmp/electrum-build
1012
script:
1113
- tox
1214
after_success:
@@ -24,5 +26,6 @@ jobs:
2426
- sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
2527
- sudo apt-get update -qq
2628
- sudo apt-get install -qq winehq-stable dirmngr gnupg2 p7zip-full
29+
before_script: ls -lah /tmp/electrum-build
2730
script: ./contrib/build-wine/build.sh
2831
after_success: true

contrib/build-wine/prepare-wine.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ verify_hash() {
4242
return 0
4343
else
4444
echo "$file $actual_hash (unexpected hash)" >&2
45+
rm "$file"
4546
exit 1
4647
fi
4748
}
@@ -54,7 +55,7 @@ download_if_not_exist() {
5455
}
5556

5657
# Let's begin!
57-
cd `dirname $0`
58+
here=$(dirname $(readlink -e $0))
5859
set -e
5960

6061
# Clean up Wine environment
@@ -64,11 +65,9 @@ echo "done"
6465

6566
wine 'wineboot'
6667

67-
echo "Cleaning tmp"
68-
mkdir -p tmp
69-
echo "done"
68+
mkdir -p /tmp/electrum-build
7069

71-
cd tmp
70+
cd /tmp/electrum-build
7271

7372
# Install Python
7473
# note: you might need "sudo apt-get install dirmngr" for the following
@@ -94,7 +93,7 @@ $PYTHON -m pip install pywin32-ctypes==0.1.2
9493
# install PySocks
9594
$PYTHON -m pip install win_inet_pton==1.0.1
9695

97-
$PYTHON -m pip install -r ../../deterministic-build/requirements-binaries.txt
96+
$PYTHON -m pip install -r $here/../deterministic-build/requirements-binaries.txt
9897

9998
# Install PyInstaller
10099
$PYTHON -m pip install https://github.com/ecdsa/pyinstaller/archive/fix_2952.zip

0 commit comments

Comments
 (0)