Browse Source

Fixing build issues, pipeline update (#40)

* Re-enabling cli run tests for Ubuntu 16.04 and 18.04

* Update verus

* Readme clean up.
Replacing 8 with $(nproc) on Linux run instructions.

* Update README.md

* Switching from md5 to sha256 checksums

* Updating version
adding repository and branch to variables sent to Agama pipeline

* Fixing variable

* Using openssl to produce sha256 checksum for MacOS

* Adding branch info to upstream Agama build job

* Defaulting to Michael's branch for the upstream Agama pipeline, for now.

* Updating version

* Updating version

* Updating version

* Using shasum instead of openssl to produce hashes for Mac verus-cli

* Adding Agama upgrade scripts

* Modifying upgrade scripts to change to script directory upon execution

* Updating version

* including types.h in Mac targets to define u_char

* Correcting win target check

* undefining cpuid on win targets

* terminating dev

* Addressing mac compilation

* fixing mac packaging script

* defining posix_memalign in win targets

* enabling symbols for win targets

* adding symbols

* clean up
pull/173/head
Asher Dawes 6 years ago
committed by miketout
parent
commit
6f90d1a855
  1. 35
      .gitlab-ci.yml
  2. 12
      README.md
  3. 3
      configure.ac
  4. 2
      makeReleaseMac.sh
  5. 4
      src/crypto/verus_clhash.cpp
  6. 7
      src/crypto/verus_clhash.h
  7. 6
      src/crypto/verus_clhash_portable.cpp
  8. 2
      src/fiat/verus
  9. 2
      src/komodo_curve25519.h
  10. 16
      zcutil/upgrade-agama.bat
  11. 19
      zcutil/upgrade-agama.sh

35
.gitlab-ci.yml

@ -13,7 +13,7 @@ variables:
DOWNSTREAM_AGAMA_BRANCH: ${CI_COMMIT_REF_NAME}
POST_MESSAGE: "Source: ${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}\n
Pipeline Trigger: ${CI_PIPELINE_SOURCE}\n
Commit: ${CI_COMMIT_SHA}$\n
Commit: ${CI_COMMIT_SHA}\n
${CI_COMMIT_MESSAGE}"
########################################################################################################################
####END#### PROJECT LEVEL VARIABLES ####END####
@ -43,6 +43,7 @@ build:linux:
src/verusd
doc/man/verus-cli/linux/README.txt
zcutil/fetch-params.sh
zcutil/upgrade-agama.sh
verus-cli
- mv verus-cli/fetch-params.sh verus-cli/fetch-params
- chmod +x verus-cli/komodod
@ -50,9 +51,11 @@ build:linux:
- chmod +x verus-cli/verus
- chmod +x verus-cli/verusd
- chmod +x verus-cli/fetch-params
- chmod +x verus-cli/upgrade-agama.sh
- if [ "${CI_COMMIT_REF_NAME}" = "master" ]; then strip -g verus-cli/komodod && strip -g verus-cli/komodod; fi
- tar -czvf ${VERUS_CLI_LINUX} verus-cli
- md5sum ${VERUS_CLI_LINUX} > ${VERUS_CLI_LINUX}.md5
- sha256sum ${VERUS_CLI_LINUX} > ${VERUS_CLI_LINUX}.sha256
after_script:
- curl -F file=@"${VERUS_CLI_LINUX}"
-F channels="${CLI_POST_CHANNEL}"
-F initial_comment="${POST_MESSAGE}"
@ -61,7 +64,7 @@ build:linux:
artifacts:
paths:
- ${VERUS_CLI_LINUX}
- ${VERUS_CLI_LINUX}.md5
- ${VERUS_CLI_LINUX}.sha256
expire_in: 1 week
########################################################################################################################
####END#### LINUX ####END####
@ -88,9 +91,10 @@ build:windows:
doc/man/verus-cli/windows/README.txt
zcutil/fetch-params.bat
zcutil/wget64.exe
zcutil/upgrade-agama.bat
verus-cli
- zip -r ${VERUS_CLI_WINDOWS} verus-cli
- md5sum ${VERUS_CLI_WINDOWS} > ${VERUS_CLI_WINDOWS}.md5
- sha256sum ${VERUS_CLI_WINDOWS} > ${VERUS_CLI_WINDOWS}.sha256
- curl -F file=@"${VERUS_CLI_WINDOWS}"
-F channels="${CLI_POST_CHANNEL}"
-F initial_comment="${POST_MESSAGE}"
@ -99,7 +103,7 @@ build:windows:
artifacts:
paths:
- ${VERUS_CLI_WINDOWS}
- ${VERUS_CLI_WINDOWS}.md5
- ${VERUS_CLI_WINDOWS}.sha256
expire_in: 1 week
########################################################################################################################
####END#### WINDOWS ####END####
@ -117,7 +121,7 @@ build:mac:
- zcutil/build-mac.sh -j$(sysctl -n hw.physicalcpu)
- ./makeReleaseMac.sh
- tar -czvf ${VERUS_CLI_MACOS} verus-cli
- md5sum ${VERUS_CLI_MACOS} > ${VERUS_CLI_MACOS}.md5
- shasum -a 256 ${VERUS_CLI_MACOS} > ${VERUS_CLI_MACOS}.sha256
- curl -F file=@"${VERUS_CLI_MACOS}"
-F channels="${CLI_POST_CHANNEL}"
-F initial_comment="${POST_MESSAGE}"
@ -126,7 +130,7 @@ build:mac:
artifacts:
paths:
- ${VERUS_CLI_MACOS}
- ${VERUS_CLI_MACOS}.md5
- ${VERUS_CLI_MACOS}.sha256
expire_in: 1 week
########################################################################################################################
####END#### MACOS ####END####
@ -143,7 +147,7 @@ build:mac:
########################################################################################################################
####START#### Code Quality ####START####
########################################################################################################################
.code_quality:
code_quality:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
@ -165,7 +169,7 @@ build:mac:
########################################################################################################################
####START#### Static Application Security Tests ####START####
########################################################################################################################
.sast:
sast:
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
@ -187,7 +191,7 @@ build:mac:
########################################################################################################################
####START#### Run Verus CLI on Ubuntu Xenial (16.04) ####START####
########################################################################################################################
.ubuntu:xenial:
ubuntu:xenial:
image: ubuntu:xenial
variables:
DOCKER_DRIVER: overlay2
@ -216,7 +220,7 @@ build:mac:
########################################################################################################################
####START#### Run Verus CLI on Ubuntu Bionic (18.04) ####START####
########################################################################################################################
.ubuntu:bionic:
ubuntu:bionic:
image: ubuntu:bionic
variables:
DOCKER_DRIVER: overlay2
@ -323,10 +327,11 @@ deploy:
- curl -X POST
-F token="$CI_JOB_TOKEN"
-F ref="$DOWNSTREAM_AGAMA_BRANCH"
-F variables\[UPSTREAM_TRIGGER_INFO\]="${POST_MESSAGE}"
-F variables\[VERUS_CLI_LINUX\]="${VERUS_CLI_LINUX}"
-F variables\[VERUS_CLI_WINDOWS\]="${VERUS_CLI_WINDOWS}"
-F variables\[VERUS_CLI_MACOS\]="${VERUS_CLI_MACOS}"
-F variables\[UPSTREAM_TRIGGER\]="${CI_PROJECT_NAME}"
-F variables\[UPSTREAM_CLI_BRANCH\]="${CI_COMMIT_REF_NAME}"
-F variables\[VERUS_CLI_LINUX\]="${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/Linux/${VERUS_CLI_LINUX}"
-F variables\[VERUS_CLI_WINDOWS\]="${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/Windows/${VERUS_CLI_WINDOWS}"
-F variables\[VERUS_CLI_MACOS\]="${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/MacOS/${VERUS_CLI_MACOS}"
"https://gitlab.com/api/v4/projects/8018592/trigger/pipeline"
########################################################################################################################
####END#### Deploy ####END####

12
README.md

@ -1,6 +1,10 @@
## VerusCoin version 0.5.0 with VerusHash 2.0
VerusCoin is a new, mineable and stakeable cryptocurrency. It is a live fork of Komodo that retains its Zcash lineage and improves it. VerusCoin will leverage the Komodo platform and dPoW notarization for enhanced security and cross-chain interoperability. We have added a variation of a zawy12, lwma difficulty algorithm, a new CPU-optimized hash algorithm and a new algorithm for fair proof of stake. We describe these changes and vision going forward in a [our Phase I white paper](http://185.25.51.16/papers/VerusPhaseI.pdf) and [our Vision](http://185.25.51.16/papers/VerusVision.pdf).
VerusCoin is a new, mineable and stakeable cryptocurrency.
It is a live fork of Komodo that retains its Zcash lineage and improves it.
VerusCoin will leverage the Komodo platform and dPoW notarization for enhanced security
and cross-chain interoperability. We have added a variation of a zawy12, lwma difficulty algorithm, a new CPU-optimized hash algorithm and a new algorithm for fair proof of stake.
We describe these changes and vision going forward in [our Phase I white paper](http://185.25.51.16/papers/VerusPhaseI.pdf) and [our Vision](http://185.25.51.16/papers/VerusVision.pdf).
- [VerusCoin web site https://veruscoin.io/ Wallets and CLI tools](https://veruscoin.io/)
- [VerusCoin Explorer](https://explorer.veruscoin.io/)
@ -66,7 +70,7 @@ First time you'll need to get assorted startup values downloaded. This takes a m
```
./zcutil/fetch-params.sh
```
Building for Ubunutu/Mint:
Building for Ubuntu/Mint/Debian:
```
./zcutil/build.sh
```
@ -90,8 +94,8 @@ git clone https://github.com/VerusCoin/VerusCoin
cd VerusCoin
#you might want to: git checkout <branch>; git pull
./zcutil/fetch-params.sh
# -j8 = using 8 threads for the compilation - replace 8 with number of threads you want to use
./zcutil/build.sh -j8
# -j$(nproc) = using all threads for the compilation - replace $(nproc) with number of threads you want to use
./zcutil/build.sh -j$(nproc)
#This can take some time.
```

3
configure.ac

@ -796,8 +796,9 @@ fi
# Additional Zcash flags
AX_CHECK_COMPILE_FLAG([-fwrapv],[CXXFLAGS="$CXXFLAGS -fwrapv"])
AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing],[CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"])
if test x$TARGET_OS != xdarwin; then
AX_CHECK_COMPILE_FLAG([-Wno-builtin-declaration-mismatch],[CXXFLAGS="$CXXFLAGS -Wno-builtin-declaration-mismatch"],,[[$CXXFLAG_WERROR]])
fi
LIBZCASH_LIBS="-lgmp -lgmpxx $BOOST_SYSTEM_LIB -lcrypto -lsodium $RUST_LIBS"
AC_MSG_CHECKING([whether to build bitcoind])

2
makeReleaseMac.sh

@ -7,11 +7,13 @@ cp src/fiat/verus \
src/verusd \
doc/man/verus-cli/mac/README.txt \
zcutil/fetch-params.sh \
zcutil/upgrade-agama.sh \
verus-cli
mv verus-cli/fetch-params.sh verus-cli/fetch-params
chmod +x ${KMD_DIR}/fetch-params
chmod +x ${KMD_DIR}/verus
chmod +x ${KMD_DIR}/verusd
chmod +x ${KMD_DIR}/upgrade-agama.sh
binaries=("komodo-cli" "komodod")
alllibs=()

4
src/crypto/verus_clhash.cpp

@ -19,6 +19,10 @@
#include "verus_hash.h"
#ifdef _WIN32
#undef __cpuid
#define posix_memalign(p, a, s) (((*(p)) = _aligned_malloc((s), (a))), *(p) ?0 :errno)
#endif
#include <boost/thread.hpp>
#include <assert.h>

7
src/crypto/verus_clhash.h

@ -21,6 +21,9 @@
#define INCLUDE_VERUS_CLHASH_H
#include <cpuid.h>
#ifdef _WIN32
#undef __cpuid
#endif
#include <boost/thread.hpp>
#include <stdlib.h>
@ -32,9 +35,9 @@
extern "C" {
#endif
#ifdef __WIN32
#ifdef _WIN32
#define posix_memalign(p, a, s) (((*(p)) = _aligned_malloc((s), (a))), *(p) ?0 :errno)
typedef unsigned char u_char
typedef unsigned char u_char;
#endif
enum {

6
src/crypto/verus_clhash_portable.cpp

@ -23,8 +23,10 @@
#include <assert.h>
#include <string.h>
#include <x86intrin.h>
#ifdef __WIN32
#ifdef __APPLE__
#include <sys/types.h>
#endif
#ifdef _WIN32
#pragma warning (disable : 4146)
#endif

2
src/fiat/verus

@ -4,4 +4,4 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
../komodo-cli -ac_name=VRSC "$@"
./komodo-cli -ac_name=VRSC "$@"

2
src/komodo_curve25519.h

@ -891,7 +891,7 @@ void OS_randombytes(unsigned char *x,long xlen);
bits256 rand256(int32_t privkeyflag)
{
bits256 randval;
#ifndef __WIN32
#ifndef _WIN32
OS_randombytes(randval.bytes,sizeof(randval));
#else
randombytes_buf(randval.bytes,sizeof(randval));

16
zcutil/upgrade-agama.bat

@ -0,0 +1,16 @@
@echo off
call :GET_CURRENT_DIR
cd %THIS_DIR%
set /p AGAMA_DIR="Agama directory, followed by [ENTER]:"
cd C:\%UserInputPath%
echo "Removing old binaries"
rm %AGAMA_DIR%/resources/app/assets/bin/win64/*
echo "Copying files"
cp ./* %AGAMA_DIR%/resources/app/assets/bin/win64
echo "Upgrade complete"
:GET_CURRENT_DIR
@pushd %~dp0
@set THIS_DIR=%CD%
@popd
@goto :EOF

19
zcutil/upgrade-agama.sh

@ -0,0 +1,19 @@
#!/bin/bash
#set working directory to the location of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "Removing old binaries"
rm /Applications/Agama.app/Contents/Resources/app/assets/bin/osx/*
echo "Copying files"
cp ./* /Applications/Agama.app/Contents/Resources/app/assets/bin/osx
echo "Upgrade complete"
else
echo "Agama directory, followed by [ENTER]:"
read AGAMA_DIR
echo "Removing old binaries"
rm ${AGAMA_DIR}/resources/app/assets/bin/linux64/*
echo "Copying files"
cp ./* ${AGAMA_DIR}/resources/app/assets/bin/linux64
echo "Upgrade complete"
fi
Loading…
Cancel
Save