Fixing Windows compilation.
Removing __cpuid definition when compiling for Windows to avoid conflicting definitions of __cpuid provided by gcc and intrin.h . Updating GitLab yml to deploy to Slack during the build step for manual testing.
This commit is contained in:
@@ -3,6 +3,7 @@ stages:
|
|||||||
- test
|
- test
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
VERSION: 0.3.14
|
VERSION: 0.3.14
|
||||||
VERUS_CLI_LINUX: "Verus-CLI-Linux-v${VERSION}-beta.tar.gz"
|
VERUS_CLI_LINUX: "Verus-CLI-Linux-v${VERSION}-beta.tar.gz"
|
||||||
@@ -10,6 +11,7 @@ variables:
|
|||||||
VERUS_CLI_MACOS: "Verus-CLI-MacOS-v${VERSION}-beta.tar.gz"
|
VERUS_CLI_MACOS: "Verus-CLI-MacOS-v${VERSION}-beta.tar.gz"
|
||||||
POST_COMMENT: "Branch and Commit: ${CI_COMMIT_REF_NAME} ${CI_COMMIT_SHA} $'\n'MD5: "
|
POST_COMMENT: "Branch and Commit: ${CI_COMMIT_REF_NAME} ${CI_COMMIT_SHA} $'\n'MD5: "
|
||||||
|
|
||||||
|
|
||||||
build:linux:
|
build:linux:
|
||||||
image: asherd/veruscoin-cross-compiler:linux
|
image: asherd/veruscoin-cross-compiler:linux
|
||||||
variables:
|
variables:
|
||||||
@@ -19,7 +21,7 @@ build:linux:
|
|||||||
- rm -rf /root/.ccache || true
|
- rm -rf /root/.ccache || true
|
||||||
- mv .ccache /root/ || true
|
- mv .ccache /root/ || true
|
||||||
script:
|
script:
|
||||||
- zcutil/build.sh -j4
|
- zcutil/build.sh -j$(nproc)
|
||||||
- cp src/komodod src/komodo-cli kmd/linux/verus-cli
|
- cp src/komodod src/komodo-cli kmd/linux/verus-cli
|
||||||
- chmod +x kmd/linux/verus-cli/komodod
|
- chmod +x kmd/linux/verus-cli/komodod
|
||||||
- chmod +x kmd/linux/verus-cli/komodo-cli
|
- chmod +x kmd/linux/verus-cli/komodo-cli
|
||||||
@@ -30,6 +32,12 @@ build:linux:
|
|||||||
- cd kmd/linux/
|
- cd kmd/linux/
|
||||||
- tar -czvf $VERUS_CLI_LINUX verus-cli
|
- tar -czvf $VERUS_CLI_LINUX verus-cli
|
||||||
- mv $VERUS_CLI_LINUX ../..
|
- mv $VERUS_CLI_LINUX ../..
|
||||||
|
- export VERUS_CLI_LINUX_MD5=$(md5sum $VERUS_CLI_LINUX | cut -d " " -f 1)
|
||||||
|
- curl -F file=@"$VERUS_CLI_LINUX"
|
||||||
|
-F channels="$CLI_POST_CHANNEL"
|
||||||
|
-F initial_comment="${POST_COMMENT}$VERUS_CLI_LINUX_MD5"
|
||||||
|
-H "${SLACK_BOT_AUTH}"
|
||||||
|
"https://slack.com/api/files.upload"
|
||||||
after_script:
|
after_script:
|
||||||
- mv /root/.ccache ./ || true
|
- mv /root/.ccache ./ || true
|
||||||
cache:
|
cache:
|
||||||
@@ -61,11 +69,17 @@ build:windows:
|
|||||||
- mkdir .cargo || echo .cargo exists
|
- mkdir .cargo || echo .cargo exists
|
||||||
- ln -s $PWD/.cargo /root/.cargo
|
- ln -s $PWD/.cargo /root/.cargo
|
||||||
script:
|
script:
|
||||||
- zcutil/build-win.sh -j4
|
- zcutil/build-win.sh -j$(nproc)
|
||||||
- cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe kmd/windows/verus-cli
|
- cp src/komodod.exe src/komodo-cli.exe src/komodo-tx.exe kmd/windows/verus-cli
|
||||||
- cd kmd/windows/
|
- cd kmd/windows/
|
||||||
- zip -r $VERUS_CLI_WINDOWS verus-cli
|
- zip -r $VERUS_CLI_WINDOWS verus-cli
|
||||||
- mv $VERUS_CLI_WINDOWS ../..
|
- mv $VERUS_CLI_WINDOWS ../..
|
||||||
|
- export VERUS_CLI_WINDOWS_MD5=$(md5sum $VERUS_CLI_WINDOWS | cut -d " " -f 1)
|
||||||
|
- curl -F file=@"$VERUS_CLI_WINDOWS"
|
||||||
|
-F channels="$CLI_POST_CHANNEL"
|
||||||
|
-F initial_comment="${POST_COMMENT}$VERUS_CLI_WINDOWS_MD5"
|
||||||
|
-H "${SLACK_BOT_AUTH}"
|
||||||
|
"https://slack.com/api/files.upload"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: [$VERUS_CLI_WINDOWS]
|
paths: [$VERUS_CLI_WINDOWS]
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
@@ -80,10 +94,16 @@ build:mac:
|
|||||||
- depends/built
|
- depends/built
|
||||||
script:
|
script:
|
||||||
- brew bundle
|
- brew bundle
|
||||||
- zcutil/build-mac.sh -j6 | xcpretty
|
- zcutil/build-mac.sh -j$(sysctl -n hw.physicalcpu) | xcpretty
|
||||||
- ./makeReleaseMac.sh
|
- ./makeReleaseMac.sh
|
||||||
- dos2unix kmd/mac/verus-cli/README.txt
|
- dos2unix kmd/mac/verus-cli/README.txt
|
||||||
- tar -C kmd/mac/ -czvf $VERUS_CLI_MACOS verus-cli ./
|
- tar -C kmd/mac/ -czvf $VERUS_CLI_MACOS verus-cli ./
|
||||||
|
- export VERUS_CLI_MACOS_MD5=$(md5sum $VERUS_CLI_MACOS | cut -d " " -f 1)
|
||||||
|
- curl -F file=@"$VERUS_CLI_MACOS"
|
||||||
|
-F channels="$CLI_POST_CHANNEL"
|
||||||
|
-F initial_comment="${POST_COMMENT}$VERUS_CLI_MACOS_MD5"
|
||||||
|
-H "${SLACK_BOT_AUTH}"
|
||||||
|
"https://slack.com/api/files.upload"
|
||||||
artifacts:
|
artifacts:
|
||||||
paths: [$VERUS_CLI_MACOS]
|
paths: [$VERUS_CLI_MACOS]
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
@@ -125,7 +145,6 @@ build:mac:
|
|||||||
paths: [gl-sast-report.json]
|
paths: [gl-sast-report.json]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.license_management:
|
.license_management:
|
||||||
image: docker:stable
|
image: docker:stable
|
||||||
variables:
|
variables:
|
||||||
@@ -234,53 +253,29 @@ build:mac:
|
|||||||
- build:windows
|
- build:windows
|
||||||
|
|
||||||
|
|
||||||
deploy:linux:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: google/cloud-sdk:alpine
|
image: google/cloud-sdk:alpine
|
||||||
variables:
|
variables:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
dependencies:
|
dependencies:
|
||||||
- build:linux
|
- build:linux
|
||||||
before_script:
|
|
||||||
- export VERUS_CLI_LINUX_MD5=$(md5sum $VERUS_CLI_LINUX | cut -d " " -f 1)
|
|
||||||
script:
|
|
||||||
- curl -F file=@"$VERUS_CLI_LINUX"
|
|
||||||
-F channels="$CLI_POST_CHANNEL"
|
|
||||||
-F initial_comment="${POST_COMMENT}$VERUS_CLI_LINUX_MD5"
|
|
||||||
-H "${SLACK_BOT_AUTH}"
|
|
||||||
"https://slack.com/api/files.upload"
|
|
||||||
|
|
||||||
|
|
||||||
deploy:windows:
|
|
||||||
stage: deploy
|
|
||||||
image: google/cloud-sdk:alpine
|
|
||||||
variables:
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
dependencies:
|
|
||||||
- build:windows
|
- build:windows
|
||||||
before_script:
|
|
||||||
- export VERUS_CLI_WINDOWS_MD5=$(md5sum $VERUS_CLI_WINDOWS | cut -d " " -f 1)
|
|
||||||
script:
|
|
||||||
- curl -F file=@"$VERUS_CLI_WINDOWS"
|
|
||||||
-F channels="$CLI_POST_CHANNEL"
|
|
||||||
-F initial_comment="${POST_COMMENT}$VERUS_CLI_WINDOWS_MD5"
|
|
||||||
-H "${SLACK_BOT_AUTH}"
|
|
||||||
"https://slack.com/api/files.upload"
|
|
||||||
|
|
||||||
|
|
||||||
deploy:mac:
|
|
||||||
stage: deploy
|
|
||||||
image: google/cloud-sdk:alpine
|
|
||||||
variables:
|
|
||||||
DOCKER_DRIVER: overlay2
|
|
||||||
dependencies:
|
|
||||||
- build:mac
|
- build:mac
|
||||||
before_script:
|
|
||||||
- export VERUS_CLI_MACOS_MD5=$(md5sum $VERUS_CLI_MACOS | cut -d " " -f 1)
|
|
||||||
script:
|
script:
|
||||||
- curl -F file=@"$VERUS_CLI_MACOS"
|
- mkdir Windows && mkdir Linux && mkdir MacOS &&
|
||||||
-F channels="$CLI_POST_CHANNEL"
|
mv $VERUS_CLI_WINDOWS Windows &&
|
||||||
-F initial_comment="${POST_COMMENT}$VERUS_CLI_MACOS_MD5"
|
mv $VERUS_CLI_LINUX Linux &&
|
||||||
-H "${SLACK_BOT_AUTH}"
|
mv $VERUS_CLI_MACOS MacOS
|
||||||
"https://slack.com/api/files.upload"
|
- echo "$AUTH_KEY" > AUTH_KEY.json &&
|
||||||
|
gcloud auth activate-service-account
|
||||||
|
--key-file AUTH_KEY.json
|
||||||
|
- gsutil cp -r Windows Linux MacOS $STAGING/VerusCoin/$CI_COMMIT_REF_NAME/
|
||||||
|
- curl -X POST
|
||||||
|
-F token="$CI_JOB_TOKEN"
|
||||||
|
-F ref=dev
|
||||||
|
-F variables\[UPSTREAM_CLI_BRANCH\]="$CI_COMMIT_REF_NAME"
|
||||||
|
-F variables\[VERUS_CLI_LINUX\]="$VERUS_CLI_LINUX"
|
||||||
|
-F variables\[VERUS_CLI_WINDOWS\]="$VERUS_CLI_WINDOWS"
|
||||||
|
-F variables\[VERUS_CLI_MACOS\]="$VERUS_CLI_MACOS"
|
||||||
|
"https://gitlab.com/api/v4/projects/8018592/trigger/pipeline"
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#ifdef _WIN32
|
||||||
|
#undef __cpuid
|
||||||
|
#endif
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
|
|||||||
@@ -9,7 +9,9 @@
|
|||||||
#include "random.h"
|
#include "random.h"
|
||||||
#include "uint256.h"
|
#include "uint256.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
#ifdef _WIN32
|
||||||
|
#undef __cpuid
|
||||||
|
#endif
|
||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
#include <boost/tuple/tuple_comparison.hpp>
|
#include <boost/tuple/tuple_comparison.hpp>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user