From c67836d54808e43b691020d187a26a09085332cc Mon Sep 17 00:00:00 2001 From: Sayan Bhattacharyya Date: Sun, 7 Jun 2020 17:32:13 +0530 Subject: [PATCH 1/4] Fix Windows Build --- .github/workflows/matrix.yml | 227 +++++++++++++++++++++++++++++++++-- 1 file changed, 216 insertions(+), 11 deletions(-) diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index a0159d6a39..6ed0455baa 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -1,12 +1,22 @@ name: Build -on: [push, pull_request] +on: + push: + pull_request: + release: + types: [published] + schedule: + - cron: '30 3 * * 0' + +env: + TAG: ${{ github.ref }} jobs: # Common Build matrix for builds on Ubuntu VM ubuntu_build: name: ${{ matrix.build_name }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: + fail-fast: false matrix: # Add more compilers here if you need them build_name: ['Ubuntu GCC 7', 'Ubuntu GCC 8', 'Ubuntu Clang 6', 'aarch64'] @@ -15,15 +25,27 @@ jobs: package_name: 'gcc-7 g++-7' cc: gcc-7 cxx: g++-7 + label: linux-gcc-7 + deployable: false - build_name: 'Ubuntu GCC 8' package_name: 'gcc-8 g++-8' cc: gcc-8 cxx: g++-8 + label: linux + deployable: true - build_name: 'Ubuntu Clang 6' cc: clang-6.0 cxx: clang++-6.0 + label: linux-clang-6 + deployable: false + - build_name: 'aarch64' + label: aarch64 + deployable: true + env: + CCACHE_DIR: $GITHUB_WORKSPACE/.ccache + LABEL: ${{ matrix.label }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 # Fetch Dependencies - name: Dependencies @@ -32,6 +54,16 @@ jobs: sudo apt update sudo apt install -y libboost-all-dev libssl-dev ${{ matrix.package_name }} + - name: Setup ccache + run: | + sudo apt install ccache + + - name: Retrieve ccache + uses: actions/cache@v1 + with: + path: .ccache + key: ccache-${{ matrix.label }} + # Configure the project with cmake - name: Configure if: matrix.build_name != 'aarch64' @@ -52,13 +84,97 @@ jobs: # Build for aarch64 - name: Prepare and Build (aarch64) if: matrix.build_name == 'aarch64' - env: - LABEL: aarch64 run: | source scripts/prep-aarch64.sh mkdir build && cd build cmake -DARCH=default -DCMAKE_BUILD_TYPE=Release -DSTATIC=true .. make -j2 + cd src + TARGETS="DeroGoldd miner zedwallet DeroGold-service cryptotest wallet-api wallet-upgrader" + ${STRIP} ${TARGETS} + + # Test the crypto + - name: Test Crypto + if: matrix.build_name != 'aarch64' + run: | + cd build/src + ./cryptotest + + # Prepare for deploy + - name: Prepare for Deploy + id: before_deploy + env: + COMMIT_SHA: ${{ github.sha }} + run: | + if [[ "${TAG:5:4}" == "tags" ]]; then export TAG=${TAG:10}; else export TAG=${COMMIT_SHA}; fi + cd build/src + TARGETS="DeroGoldd miner zedwallet DeroGold-service cryptotest wallet-api wallet-upgrader" + if [[ "${LABEL}" != "aarch64" ]]; then strip ${TARGETS}; fi + rm -rf derogold-${TAG} + mkdir derogold-${TAG} + cp ${TARGETS} derogold-${TAG}/ + cp ../../LICENSE derogold-${TAG}/ + tar cvfz derogold-${LABEL}-${TAG}.tar.gz derogold-${TAG}/ + echo ::set-output name=binary_path::derogold-${TAG} + echo ::set-output name=artifact_name::derogold-${LABEL}-${TAG} + echo ::set-output name=file_name::derogold-${LABEL}-${TAG}.tar.gz + + # Upload to GH Release + - name: Upload to GH Release + if: github.event_name == 'release' && matrix.deployable + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./build/src/${{ steps.before_deploy.outputs.file_name }} + asset_name: ${{ steps.before_deploy.outputs.file_name }} + asset_content_type: application/gzip + + # Upload to GH Actions Artifacts + - name: Upload To GH Artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.before_deploy.outputs.artifact_name }} + path: ./build/src/${{ steps.before_deploy.outputs.binary_path }} + + # Mac builds on Catalina VM + macos_build: + name: macOS + runs-on: macos-latest + env: + CC: /usr/local/opt/llvm@8/bin/clang + CXX: /usr/local/opt/llvm@8/bin/clang++ + LABEL: osx + CCACHE_DIR: $GITHUB_WORKSPACE/.ccache + steps: + - uses: actions/checkout@v2 + + # Fetch Dependencies + - name: Dependencies + run: | + brew uninstall llvm + brew install --force boost llvm@8 ccache + brew link --force llvm@8 + ln -s /usr/local/opt/llvm@8 /usr/local/opt/llvm + + - name: Retrieve ccache + uses: actions/cache@v1 + with: + path: .ccache + key: ccache-osx + + # Configure project with cmake + - name: Configure + run: | + mkdir build && cd build + cmake -DARCH=default -DCMAKE_BUILD_TYPE=Release -DSTATIC=true .. + + # Build for macOS + - name: Build + run: | + cd build + make -j2 # Test the crypto - name: Test Crypto @@ -67,30 +183,81 @@ jobs: cd build/src ./cryptotest + # Prepare for deploy + - name: Prepare for Deploy + id: before_deploy + env: + COMMIT_SHA: ${{ github.sha }} + run: | + if [[ "${TAG:5:4}" == "tags" ]]; then export TAG=${TAG:10}; else export TAG=${COMMIT_SHA}; fi + cd build/src + TARGETS="DeroGoldd miner zedwallet DeroGold-service cryptotest wallet-api wallet-upgrader" + strip ${TARGETS} + rm -rf derogold-${TAG} + mkdir derogold-${TAG} + cp ${TARGETS} derogold-${TAG}/ + cp ../../LICENSE derogold-${TAG}/ + tar cvfz derogold-${LABEL}-${TAG}.tar.gz derogold-${TAG}/ + echo ::set-output name=binary_path::derogold-${TAG} + echo ::set-output name=artifact_name::derogold-${LABEL}-${TAG} + echo ::set-output name=file_name::derogold-${LABEL}-${TAG}.tar.gz + + + # Upload to GH Release + - name: Upload to GH Release + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./build/src/${{ steps.before_deploy.outputs.file_name }} + asset_name: ${{ steps.before_deploy.outputs.file_name }} + asset_content_type: application/gzip + + # Upload to GH Actions Artifacts + - name: Upload To GH Artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.before_deploy.outputs.artifact_name }} + path: ./build/src/${{ steps.before_deploy.outputs.binary_path }} + # Windows Builds on Windows Server 2019 windows_build: name: Windows - runs-on: windows-2019 + runs-on: windows-latest env: MSBUILD_PATH: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/Bin" + LABEL: windows steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + + - name: Setup clcache + run: pip install clcache - - name: Setup MSBuild.exe - uses: warrenbuckley/Setup-MSBuild@v1 + - name: Retrieve clcache + uses: actions/cache@v1 + with: + path: clcache + key: clcache-windows + + - name: Install OpenSSL + run: choco install openssl # Configure project with cmake - name: Configure run: | mkdir build cd build - cmake -G "Visual Studio 16 2019" -A x64 .. -DARCH=default + cmake -G "Visual Studio 16 2019" -A x64 .. -DARCH=default -DBOOST_ROOT="$env:BOOST_ROOT_1_69_0" # Build for Windows - name: Build run: | + $env:CLCACHE_DIR = "$env:GITHUB_WORKSPACE\clcache" + $env:PATH = "$env:PATH;$env:MSBUILD_PATH" cd build - MSBuild DeroGold.sln /p:Configuration=Release /m + MSBuild DeroGold.sln /p:CLToolExe=clcache.exe /p:Configuration=Release /p:PlatformToolset=v141 /m # Test the crypto - name: Test Crypto @@ -98,3 +265,41 @@ jobs: run: | cd build/src/Release ./cryptotest.exe + + # Prepare for deploy + - name: Prepare for Deploy + shell: bash + id: before_deploy + env: + COMMIT_SHA: ${{ github.sha }} + run: | + if [[ "${TAG:5:4}" == "tags" ]]; then export TAG=${TAG:10}; else export TAG=${COMMIT_SHA}; fi + cd build/src/Release + rm -rf derogold-${TAG} + mkdir derogold-${TAG} + cp *.exe derogold-${TAG}/ + cp ../../../LICENSE derogold-${TAG}/ + 7z a derogold-${LABEL}-${TAG}.zip derogold-${TAG}/ + echo ::set-output name=binary_path::derogold-${TAG} + echo ::set-output name=artifact_name::derogold-${LABEL}-${TAG} + echo ::set-output name=file_name::derogold-${LABEL}-${TAG}.zip + + + # Upload to GH Release + - name: Upload to GH Release + if: github.event_name == 'release' + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ./build/src/Release/${{ steps.before_deploy.outputs.file_name }} + asset_name: ${{ steps.before_deploy.outputs.file_name }} + asset_content_type: application/zip + + # Upload to GH Actions Artifacts + - name: Upload To GH Artifacts + uses: actions/upload-artifact@v2 + with: + name: ${{ steps.before_deploy.outputs.artifact_name }} + path: ./build/src/Release/${{ steps.before_deploy.outputs.binary_path }} From a5d9f83b58eabcf6da0927267c2515d693962d9e Mon Sep 17 00:00:00 2001 From: Sayan Bhattacharyya Date: Sun, 7 Jun 2020 17:41:57 +0530 Subject: [PATCH 2/4] Fix Win Build v2 --- .github/workflows/matrix.yml | 38 ------------------------------------ 1 file changed, 38 deletions(-) diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 6ed0455baa..726151de75 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -265,41 +265,3 @@ jobs: run: | cd build/src/Release ./cryptotest.exe - - # Prepare for deploy - - name: Prepare for Deploy - shell: bash - id: before_deploy - env: - COMMIT_SHA: ${{ github.sha }} - run: | - if [[ "${TAG:5:4}" == "tags" ]]; then export TAG=${TAG:10}; else export TAG=${COMMIT_SHA}; fi - cd build/src/Release - rm -rf derogold-${TAG} - mkdir derogold-${TAG} - cp *.exe derogold-${TAG}/ - cp ../../../LICENSE derogold-${TAG}/ - 7z a derogold-${LABEL}-${TAG}.zip derogold-${TAG}/ - echo ::set-output name=binary_path::derogold-${TAG} - echo ::set-output name=artifact_name::derogold-${LABEL}-${TAG} - echo ::set-output name=file_name::derogold-${LABEL}-${TAG}.zip - - - # Upload to GH Release - - name: Upload to GH Release - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./build/src/Release/${{ steps.before_deploy.outputs.file_name }} - asset_name: ${{ steps.before_deploy.outputs.file_name }} - asset_content_type: application/zip - - # Upload to GH Actions Artifacts - - name: Upload To GH Artifacts - uses: actions/upload-artifact@v2 - with: - name: ${{ steps.before_deploy.outputs.artifact_name }} - path: ./build/src/Release/${{ steps.before_deploy.outputs.binary_path }} From d1075b51dd6269a497bd14f7121b9964085f44e4 Mon Sep 17 00:00:00 2001 From: Sayan Bhattacharyya Date: Mon, 31 Aug 2020 07:06:56 +0530 Subject: [PATCH 3/4] Fix Mac build --- .github/workflows/matrix.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 726151de75..93e11d9e6e 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -155,7 +155,7 @@ jobs: run: | brew uninstall llvm brew install --force boost llvm@8 ccache - brew link --force llvm@8 + brew link --overwrite llvm@8 ln -s /usr/local/opt/llvm@8 /usr/local/opt/llvm - name: Retrieve ccache From 120e02db0b55be4512f1913cd998dc5ba8ec2a0c Mon Sep 17 00:00:00 2001 From: Leos Stehlik Date: Sun, 10 Jan 2021 13:04:58 +0100 Subject: [PATCH 4/4] Fix typos and add WRKZCoin Developers --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce25ae0316..f989193805 100755 --- a/README.md +++ b/README.md @@ -198,8 +198,9 @@ Hi DeroGold contributor, thanks for forking and sending back Pull Requests. Exte ``` // Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers // Copyright (c) 2014-2018, The Monero Project -// Copyright (c) 2018-2019, The TurtleCoin Developers -// Copyright (c) 2018-2019, The DeroGold Developters +// Copyright (c) 2018-2020, The TurtleCoin Developers +// Copyright (c) 2018-2021, The WRKZCoin Developers +// Copyright (c) 2018-2021, The DeroGold Developers // // Please see the included LICENSE file for more information. ```