-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
72 lines (64 loc) · 2.33 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
os: osx
language: shell
osx_image: xcode11
if: tag IS present
addons:
homebrew:
packages:
- berkeley-db4
- boost
- libevent
- sqlcipher
- qtkeychain
cache:
directories:
- $TRAVIS_BUILD_DIR/cache
install:
- git clone https://gitlab.matrix.org/matrix-org/olm --depth 1 && cd olm
- cmake . -Bbuild
- cmake --build build
- cmake --install build
- cd ..
- echo -e "machine gitlab.com\n login bakaoh\n password $GITLAB_AT" >~/.netrc
- git clone -b online https://gitlab.com/nunchuck/nunchuck-qt nunchuk-qt --depth 1 && cd nunchuk-qt
- git submodule update --init --recursive
- cacheCommit=`cat $TRAVIS_BUILD_DIR/cache/bitcoin.commit`
- currentCommit=`git -C contrib/libnunchuk/contrib/bitcoin rev-parse HEAD`
- if [ "$cacheCommit" == "$currentCommit" ]; then
echo "Restore Bitcoin Core cache";
cp -R $TRAVIS_BUILD_DIR/cache/bitcoin contrib/libnunchuk/contrib;
else
echo "Build Bitcoin Core";
pushd contrib/libnunchuk/contrib/bitcoin;
./autogen.sh;
./configure --without-gui --disable-zmq --with-miniupnpc=no --with-incompatible-bdb --disable-bench --disable-tests;
make -j8;
popd;
echo "Update Bitcoin Core cache";
rm -rf $TRAVIS_BUILD_DIR/cache/bitcoin;
cp -R contrib/libnunchuk/contrib/bitcoin $TRAVIS_BUILD_DIR/cache;
echo $currentCommit > $TRAVIS_BUILD_DIR/cache/bitcoin.commit;
fi
- mkdir contrib/libnunchuk/contrib/sqlcipher/.libs
- cp /usr/local/lib/libsqlcipher.a contrib/libnunchuk/contrib/sqlcipher/.libs/libsqlcipher.a
script:
- mkdir build && cd build
- cmake .. -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake -DUR__DISABLE_TESTS=ON
- cmake --build . --config Release -j8
before_cache:
- export TRAVIS_BRANCH=main
after_success:
- export PATH="/usr/local/opt/qt/bin:$PATH"
- mv $TRAVIS_BUILD_DIR/hwi nunchuck-client-qt.app/Contents/MacOS/hwi
- mv nunchuck-client-qt.app/Contents/MacOS/nunchuck-client-qt nunchuck-client-qt.app/Contents/MacOS/Nunchuk
- mv nunchuck-client-qt.app Nunchuk.app
- macdeployqt Nunchuk.app -qmldir=..
- macdeployqt Nunchuk.app -dmg
- zip nunchuk-mac-$TRAVIS_TAG.zip Nunchuk.dmg
deploy:
provider: releases
token: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
file: nunchuk-mac-$TRAVIS_TAG.zip
on:
tags: true