-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
195 lines (185 loc) · 6.85 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
sudo: false
language: cpp
matrix:
include:
# Ubuntu, g++-8
- os: linux
dist: xenial
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libssl-dev
- g++-8
- gcc-8
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
- LABEL="linux-g++-8"
- RELEASE_FILENAME="violetminer-linux"
- RELEASE_FILETYPE="tar.gz"
- CUDA_SUPPORT="ON"
- CUDA_PATH="/usr/local/cuda"
- CUDA_BIN_PATH="/usr/local/cuda/bin"
- CUDA=10.1.243-1
- CUDA_SHORT=10.1.243-1
- UBUNTU_VERSION=ubuntu1604
before_install:
- eval $MATRIX_EVAL
- INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
- sudo dpkg -i ${INSTALLER}
- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
- sudo apt-key add 7fa2af80.pub
- sudo apt update -qq
- sudo apt install -y cuda
- sudo apt clean
- CUDA_HOME=/usr/local/cuda
- LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
- PATH=${CUDA_HOME}/bin:${PATH}
# Ubuntu, clang-8
- os: linux
dist: xenial
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-8
packages:
- clang-8
- clang-8
- libstdc++-8-dev
env:
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
- LABEL="linux"
- RELEASE_FILENAME="violetminer-linux"
- RELEASE_FILETYPE="tar.gz"
- _DEPLOYABLE="true"
- CUDA_SUPPORT="ON"
- CUDA_PATH="/usr/local/cuda"
- CUDA_BIN_PATH="/usr/local/cuda/bin"
- CUDA=10.1.243-1
- CUDA_SHORT=10.1.243-1
- UBUNTU_VERSION=ubuntu1604
before_install:
- eval $MATRIX_EVAL
- INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
- sudo dpkg -i ${INSTALLER}
- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
- sudo apt-key add 7fa2af80.pub
- sudo apt update -qq
- sudo apt install -y cuda
- sudo apt clean
- CUDA_HOME=/usr/local/cuda
- LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
- PATH=${CUDA_HOME}/bin:${PATH}
- clang-8 --version
# OSX, clang
- os: osx
osx_image: xcode10
compiler: clang
env:
- LABEL="osx"
- RELEASE_FILENAME="violetminer-osx"
- RELEASE_FILETYPE="tar.gz"
- _DEPLOYABLE="true"
- CUDA_SUPPORT="ON"
install:
# Need to make sure that we have openssl installed
- travis_retry brew install openssl || travis_retry brew upgrade openssl
- brew link --force openssl
- ln -s /usr/local/opt/openssl/include/openssl /usr/local/include
- curl -L http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_mac.dmg -o $HOME/cuda_10.1.243_mac.dmg
- curl -L https://developer.download.nvidia.com/compute/redist/cudnn/v7.6.2/cudnn-10.1-osx-x64-v7.6.2.24.tgz -o $HOME/cudnn-10.1-osx-x64-v7.6.2.24.tgz
- hdiutil mount $HOME/cuda_10.1.243_mac.dmg
- sleep 5
- sudo /Volumes/CUDAMacOSXInstaller/CUDAMacOSXInstaller.app/Contents/MacOS/CUDAMacOSXInstaller --accept-eula --no-window; export BREW_STATUS=$?
- tar xvf $HOME/cudnn-10.1-osx-x64-v7.6.2.24.tgz
- sudo cp -r ./cuda/include/*.h /usr/local/cuda/include/
- sudo cp -r ./cuda/lib/*.dylib /usr/local/cuda/lib/
- sudo cp -r ./cuda/lib/*.a /usr/local/cuda/lib/
- sudo cp -r /usr/local/cuda/lib/* /usr/local/lib/
- sudo cp -r /usr/local/cuda/lib/libcuda.dylib /usr/local/cuda/lib/stubs/
# work around issues with CUDA 10.1
- for f in /usr/local/cuda/lib/*.10.dylib; do sudo ln -s $f ${f/%.10.dylib/.10.1.dylib}; done
- cd $HOME/ccache-3.7/; ./configure; make; sudo make install; cd $TRAVIS_BUILD_DIR
- echo 'CCACHE_CC=/usr/local/cuda/bin/nvcc /usr/local/bin/ccache compiler "$@"' | sudo tee /usr/local/cuda/bin/nvcccache
- sudo chmod 755 /usr/local/cuda/bin/nvcccache
- PATH=/usr/local/cuda/bin:${PATH}
- export CUDACXX=/usr/local/cuda/bin/nvcc
# Arm (aarch64) cross compile
- os: linux
env:
- MATRIX_EVAL="CC=aarch64-linux-gnu-gcc && CXX=aarch64-linux-gnu-g++"
- LABEL="aarch64"
- RELEASE_FILENAME="violetminer-armv8"
- RELEASE_FILETYPE="tar.gz"
- _DEPLOYABLE="true"
- CUDA_SUPPORT="OFF"
# Windows, MSVC
- os: windows
env:
- LABEL="windows-msvc"
- MSBUILD_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin"
- RELEASE_FILENAME="violetminer-win64"
- RELEASE_FILETYPE="zip"
- _DEPLOYABLE="true"
- CUDA_VER="10.1"
- CUDA_ARCHIVE="cuda_10.1.243_426.00_win10.exe"
script:
- wget -nv https://developer.download.nvidia.com/compute/cuda/$CUDA_VER/Prod/local_installers/$CUDA_ARCHIVE
- PowerShell -Command "Start-Process -FilePath \"$CUDA_ARCHIVE\" -ArgumentList \"-s nvcc_$CUDA_VER\" -Wait -NoNewWindow"
- 7z x $CUDA_ARCHIVE > nul
- ./scripts/win-install.bat
- cd build
- cd Release
- mkdir $RELEASE_FILENAME
- cp violetminer.exe $RELEASE_FILENAME
- 7z a $RELEASE_FILENAME.$RELEASE_FILETYPE $RELEASE_FILENAME
# Windows, MSVC
- os: windows
env:
- LABEL="windows"
- MSBUILD_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin"
- RELEASE_FILENAME="violetminer-win64"
- RELEASE_FILETYPE="zip"
- _DEPLOYABLE="true"
- CUDA_VER="10.1"
- CUDA_ARCHIVE="cuda_10.1.243_426.00_win10.exe"
script:
- wget -nv https://developer.download.nvidia.com/compute/cuda/$CUDA_VER/Prod/local_installers/$CUDA_ARCHIVE
- clang --version
- clang-cl --version
- PowerShell -Command "Start-Process -FilePath \"$CUDA_ARCHIVE\" -ArgumentList \"-s nvcc_$CUDA_VER\" -Wait -NoNewWindow"
- 7z x $CUDA_ARCHIVE > nul
- ./scripts/win-clang-install.bat
- cd build
- cd Release
- mkdir $RELEASE_FILENAME
- cp violetminer.exe $RELEASE_FILENAME
- 7z a $RELEASE_FILENAME.$RELEASE_FILETYPE $RELEASE_FILENAME
before_install:
- eval $MATRIX_EVAL
script:
- eval $MATRIX_EVAL
# If we're cross compiling aarch64, make sure our build enivornment is setup
# we do this in the script stage because this happens after the repo is cloned
- if [[ "$LABEL" == "aarch64" ]]; then source scripts/prep-aarch64.sh ; fi
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_NVIDIA=$CUDA_SUPPORT ..
- make -j2
- if [[ "$LABEL" != "aarch64" ]]; then ./argon2-cpp-test ; fi
- mkdir $RELEASE_FILENAME
- mv violetminer $RELEASE_FILENAME
- tar cvfz $RELEASE_FILENAME.tar.gz $RELEASE_FILENAME
deploy:
- provider: releases
api_key: $GITHUB_TOKEN
file: ${RELEASE_FILENAME}.${RELEASE_FILETYPE}
skip_cleanup: true
on:
tags: true
condition: "$_DEPLOYABLE = true"