forked from VerusCoin/nheqminer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
78 lines (75 loc) · 2.6 KB
/
.gitlab-ci.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
stages:
- build
variables:
VERSION: 0.8.0
POST_MESSAGE: "Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n
Branch: ${CI_COMMIT_REF_NAME}\n
Commit: ${CI_COMMIT_SHA}\n
${CI_COMMIT_MESSAGE}"
build:linux:
image: asherd/verus-builders:nheqminer
variables:
DOCKER_DRIVER: overlay2
stage: build
before_script:
script:
- mkdir build && cd build
- cmake -DUSE_CUDA_DJEZO=0 -DUSE_CPU_XENONCAT=0 ..
- make -j$(nproc)
- mkdir -p build/nheqminer
- cp ../doc/Linux/Readme.txt
../scripts/start.sh
nheqminer
build/nheqminer
- cd build
- chmod +x nheqminer/nheqminer
nheqminer/start.sh
- if [ "${CI_COMMIT_REF_NAME}" = "master" ]; then strip -g nheqminer/nheqminer; fi
- tar -czf nheqminer-Linux-v${VERSION}.tar.gz nheqminer
- sha256sum nheqminer-Linux-v${VERSION}.tar.gz > nheqminer-Linux-v${VERSION}.tar.gz.sha256
- curl -F file=@nheqminer-Linux-v${VERSION}.tar.gz
-F channels="$CPU_POOL_POST_CHANNEL"
-F initial_comment="${POST_MESSAGE}"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
- mv nheqminer-Linux-v${VERSION}.tar.gz nheqminer-Linux-v${VERSION}.tar.gz.sha256 ../..
artifacts:
paths:
- nheqminer-Linux-v${VERSION}.tar.gz
- nheqminer-Linux-v${VERSION}.tar.gz.sha256
expire_in: 1 week
build:macos:
tags: ["Mojave"]
variables:
CXX: g++-8
CC: gcc-8
stage: build
script:
- mkdir build && cd build
- cmake -DUSE_CUDA_DJEZO=0 -DUSE_CPU_XENONCAT=0 ..
- make -j$(sysctl -n hw.physicalcpu)
- mkdir -p build/nheqminer
- cp ../doc/Mac/Readme.txt
../scripts/start.sh
nheqminer
build/nheqminer
- cd build
- DYLIBS=`otool -L nheqminer/nheqminer | grep "/usr/local" | awk -F' ' '{ print $1 }'`
- for dylib in $DYLIBS; do cp -rf $dylib Nheqminer/; done
- for dylib in $DYLIBS; do install_name_tool -change $dylib @executable_path/`basename $dylib` nheqminer/nheqminer; done;
- chmod +x nheqminer/nheqminer
- chmod +x nheqminer/start.sh
- if [ "${CI_COMMIT_REF_NAME}" = "master" ]; then strip nheqminer/nheqminer; fi
- tar -czf nheqminer-MacOS-v${VERSION}.tar.gz nheqminer
- shasum -a 256 nheqminer-MacOS-v${VERSION}.tar.gz > nheqminer-MacOS-v${VERSION}.tar.gz.sha256
- curl -F file=@nheqminer-MacOS-v${VERSION}.tar.gz
-F channels="$CPU_POOL_POST_CHANNEL"
-F initial_comment="${POST_MESSAGE}"
-H "${SLACK_BOT_AUTH}"
"https://slack.com/api/files.upload"
- mv nheqminer-MacOS-v${VERSION}.tar.gz nheqminer-MacOS-v${VERSION}.tar.gz.sha256 ../..
artifacts:
paths:
- nheqminer-MacOS-v${VERSION}.tar.gz
- nheqminer-MacOS-v${VERSION}.tar.gz.sha256
expire_in: 1 week