From 99ea5de2f86b86e48efdb839563e8114bc1fba02 Mon Sep 17 00:00:00 2001 From: Aiwe Date: Sun, 7 Mar 2021 13:48:44 +0200 Subject: [PATCH] Fix GA workflow (#5) Fix version string in test build packages on Linux Clone Karbo Core as a submodule with the correct branch instead of cloning Karbo Core master --- .github/workflows/check.yml | 20 +++++++---------- .github/workflows/release.yml | 42 +++++++++++++++++++++++++---------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8382451dc..47433b49c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,6 +15,7 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 ref: ${{ github.ref }} @@ -53,8 +54,6 @@ jobs: echo "$release_name" set CMAKE_PREFIX_PATH="$($qt5_cmake)" $qt5_cmake = "${{ env.Qt5_Dir }}/lib/cmake" -replace '[/]', '\\' - Remove-Item cryptonote -Recurse -ErrorAction Ignore - git clone https://github.com/Karbovanets/karbo cryptonote --quiet mkdir "$build_folder" cd "$build_folder" Start-Process cmake -ArgumentList "-DBOOST_ROOT=""$env:BOOST_ROOT_1_72_0"" -G ""Visual Studio 16 2019"" -A x64 -DARCH=default",".." -NoNewWindow -Wait @@ -108,6 +107,7 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 ref: ${{ github.ref }} @@ -145,8 +145,6 @@ jobs: release_name="Karbo-wallet-macOS-$krb_ver" app_name="KarbowanecWallet.app" lang_folder="/Contents/Resources/languages" - rm -rf cryptonote - git clone https://github.com/Karbovanets/karbo cryptonote mkdir -p "$build_folder" cd "$build_folder" cmake -D ARCH=default -D CMAKE_C_FLAGS="-mmacosx-version-min=10.12" -D CMAKE_CXX_FLAGS="-mmacosx-version-min=10.12" -D CMAKE_BUILD_TYPE=Release ../.. @@ -179,6 +177,7 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 ref: ${{ github.ref }} @@ -197,11 +196,9 @@ jobs: sudo apt update -y sudo apt install -y qt5-default qttools5-dev qttools5-dev-tools libboost-all-dev build_folder="build/release" - krb_ver="${{ steps.build.outputs.krb_ver }}" - release_name=Karbo-wallet-ubuntu-20.04-"krb_ver" + krb_ver="${{steps.tagger.outputs.tag}}" + release_name=Karbo-wallet-ubuntu-20.04-$krb_ver app_name="KarbowanecWallet" - rm -rf cryptonote - git clone https://github.com/Karbovanets/karbo cryptonote mkdir -p "$build_folder" cd "$build_folder" cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../.. @@ -229,6 +226,7 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 ref: ${{ github.ref }} @@ -248,11 +246,9 @@ jobs: sudo apt update -y sudo apt install -y qt5-default qttools5-dev qttools5-dev-tools libboost1.62-all-dev build_folder="build/release" - krb_ver="${{ steps.build.outputs.krb_ver }}" - release_name=Karbo-wallet-ubuntu-18.04-"krb_ver" + krb_ver="${{steps.tagger.outputs.tag}}" + release_name=Karbo-wallet-ubuntu-18.04-$krb_ver app_name="KarbowanecWallet" - rm -rf cryptonote - git clone https://github.com/Karbovanets/karbo cryptonote mkdir -p "$build_folder" cd "$build_folder" cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../.. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce0029582..af0d08419 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,9 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 + ref: ${{ github.ref }} - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.0.2 @@ -47,8 +49,6 @@ jobs: $release_name = "Karbo-wallet-win64-$krb_ver" set CMAKE_PREFIX_PATH="$($qt5_cmake)" $qt5_cmake = "${{ env.Qt5_Dir }}/lib/cmake" -replace '[/]', '\\' - Remove-Item cryptonote -Recurse -ErrorAction Ignore - git clone https://github.com/Karbovanets/karbo cryptonote --quiet mkdir "$build_folder" cd "$build_folder" Start-Process cmake -ArgumentList "-DBOOST_ROOT=""$env:BOOST_ROOT_1_72_0"" -G ""Visual Studio 16 2019"" -A x64 -DARCH=default",".." -NoNewWindow -Wait @@ -123,7 +123,9 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 + ref: ${{ github.ref }} - name: Install Qt uses: jurplel/install-qt-action@v2 @@ -159,8 +161,6 @@ jobs: release_name="Karbo-wallet-macOS-$krb_ver" app_name="KarbowanecWallet.app" lang_folder="/Contents/Resources/languages" - rm -rf cryptonote - git clone https://github.com/Karbovanets/karbo cryptonote mkdir -p "$build_folder" cd "$build_folder" cmake -D ARCH=default -D CMAKE_C_FLAGS="-mmacosx-version-min=10.12" -D CMAKE_CXX_FLAGS="-mmacosx-version-min=10.12" -D CMAKE_BUILD_TYPE=Release ../.. @@ -196,7 +196,18 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 + ref: ${{ github.ref }} + + - name: Find Tag + id: tagger + uses: jimschubert/query-tag-action@v1 + with: + include: 'v*' + exclude: '*-rc*' + commit-ish: 'HEAD~' + skip-unshallow: 'true' - name: Build id: build @@ -204,11 +215,9 @@ jobs: sudo apt update -y sudo apt install -y qt5-default qttools5-dev qttools5-dev-tools libboost-all-dev build_folder="build/release" - krb_ver=$(echo "$GITHUB_REF" | sed 's|refs/tags/||') - release_name=Karbo-wallet-ubuntu-20.04-"$krb_ver" + krb_ver="${{steps.tagger.outputs.tag}}" + release_name=Karbo-wallet-ubuntu-20.04-$krb_ver app_name="KarbowanecWallet" - rm -rf cryptonote - git clone https://github.com/Karbovanets/karbo cryptonote mkdir -p "$build_folder" cd "$build_folder" cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../.. @@ -239,7 +248,18 @@ jobs: steps: - uses: actions/checkout@master with: + submodules: true fetch-depth: 0 + ref: ${{ github.ref }} + + - name: Find Tag + id: tagger + uses: jimschubert/query-tag-action@v1 + with: + include: 'v*' + exclude: '*-rc*' + commit-ish: 'HEAD~' + skip-unshallow: 'true' - name: Build id: build @@ -248,11 +268,9 @@ jobs: sudo apt update -y sudo apt install -y qt5-default qttools5-dev qttools5-dev-tools libboost1.62-all-dev build_folder="build/release" - krb_ver=$(echo "$GITHUB_REF" | sed 's|refs/tags/||') - release_name=Karbo-wallet-ubuntu-18.04-"$krb_ver" + krb_ver="${{steps.tagger.outputs.tag}}" + release_name=Karbo-wallet-ubuntu-18.04-$krb_ver app_name="KarbowanecWallet" - rm -rf cryptonote - git clone https://github.com/Karbovanets/karbo cryptonote mkdir -p "$build_folder" cd "$build_folder" cmake -D ARCH=default -D CMAKE_BUILD_TYPE=Release -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=true -D BOOST_IGNORE_SYSTEM_PATHS_DEFAULT=ON -D BOOST_ROOT=/usr ../..