forked from xdn-project/digitalnotewallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flatrate node fee + automated CI/CD workflow for releases (cryptonote…
…foundation#35) * Support of flat-rate node fee * Automated CI/CD workflow for releases * Deterministic transaction keys too * Update core with new keyimages storage and changes in crypto * Automated CI/CD workflow for releases * cpack .deb file for ubuntu and pack translations on windows, try to use windeployqt * Create setup with NSIS for Windows and fix bundle Info.plist for macOS * Bump core with flat rate node fee * Add remote node's flat rate fee support with fallback to % fee if node doesn't support flat rate * Use QT version 5.12.2 instead of 5.14 * Remove debug output, bump copyright year in modified files * Update translation of strings about node fees * Fix errors in Korean translation file * Add functions to get node fee address and amount to INode * Replace AddressProvider with INode builting functions for getting node's fee and address for fee
- Loading branch information
Showing
35 changed files
with
1,064 additions
and
532 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,228 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-windows: | ||
name: Windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Setup MSBuild.exe | ||
uses: warrenbuckley/Setup-MSBuild@v1 | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v2 | ||
with: | ||
version: '5.12.2' | ||
host: 'windows' | ||
target: 'desktop' | ||
modules: 'qttools5' | ||
install-deps: 'true' | ||
|
||
- name: Install NSIS | ||
uses: joncloud/makensis-action@v1 | ||
with: | ||
just-include: true | ||
|
||
- name: Build | ||
shell: powershell | ||
id: build | ||
env: | ||
BOOST_ROOT: ${{ env.BOOST_ROOT }} | ||
run: | | ||
$build_folder = "build" | ||
$krb_ver = "${{ github.ref }}" -replace '[refs/tags/]' | ||
$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/seredat/karbowanec cryptonote | ||
mkdir "$build_folder" | ||
cd "$build_folder" | ||
Start-Process cmake -ArgumentList "-G ""Visual Studio 16 2019"" -A x64",".." -NoNewWindow -Wait | ||
Start-Process msbuild -ArgumentList "KarbowanecWallet.sln","/p:Configuration=Release" -NoNewWindow -Wait | ||
$build_path = "./$build_folder" | ||
echo "::set-output name=build_path::${build_path}" | ||
echo "::set-output name=release_name::${release_name}" | ||
echo "::set-output name=krb_ver::${krb_ver}" | ||
- name: Pack | ||
shell: powershell | ||
id: pack | ||
env: | ||
VCINSTALLDIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\' | ||
run: | | ||
$build_folder = "${{ steps.build.outputs.build_path }}" | ||
$release_name = "${{ steps.build.outputs.release_name }}" | ||
$release_folder = "Release" | ||
cd "$build_folder" | ||
$krb_ver = "${{ steps.build.outputs.krb_ver }}" | ||
mkdir "$release_folder/$release_name" | ||
mkdir "$release_folder/$release_name/languages" | ||
cp languages/*.qm "$release_folder/$release_name/languages/" | ||
cd "$release_folder" | ||
cp KarbowanecWallet.exe "$release_name/" | ||
cp "../../COPYING" "$release_name/COPYING.txt" | ||
windeployqt --release KarbowanecWallet.exe --dir "$release_name/" | ||
cd ../../ | ||
makensis WindowsInstall.nsi | ||
cd "$build_folder/$release_folder" | ||
Compress-Archive -Path "KarbowanecWallet-Setup.exe" -DestinationPath "$release_name.zip" | ||
$sha256 = (Get-FileHash "$release_name.zip").Hash | ||
$asset_path = "./$build_folder/$release_folder/$release_name.zip" | ||
echo "::set-output name=sha256::${sha256}" | ||
echo "::set-output name=release_name::${release_name}.zip" | ||
echo "::set-output name=asset_path::${asset_path}" | ||
echo "::set-output name=krb_ver::${krb_ver}" | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ steps.pack.outputs.asset_path }} | ||
name: Karbo Wallet ${{ steps.pack.outputs.krb_ver }} | ||
body: | | ||
**${{ steps.pack.outputs.release_name }}** | ||
${{ steps.pack.outputs.sha256 }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-macos: | ||
name: macOS | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v2 | ||
with: | ||
version: '5.12.2' | ||
modules: 'qttools5' | ||
install-deps: 'true' | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
build_folder="build/release" | ||
krb_ver=$(echo ${{ github.ref }} | sed 's|refs/tags/||') | ||
release_name="Karbo-wallet-macOS-$krb_ver" | ||
app_name="KarbowanecWallet.app" | ||
lang_folder="/Contents/Resources/languages" | ||
brew install gcc boost@1.60 | ||
brew link boost@1.60 --force | ||
rm -rf cryptonote | ||
git clone https://github.com/seredat/karbowanec.git cryptonote | ||
mkdir -p "$build_folder" | ||
cd "$build_folder" | ||
cmake -DCMAKE_C_FLAGS="-mmacosx-version-min=10.12" -DCMAKE_CXX_FLAGS="-mmacosx-version-min=10.12" -D CMAKE_BUILD_TYPE=Release ../.. | ||
make | ||
mkdir "$app_name$lang_folder" | ||
cp languages/*.qm "$app_name$lang_folder" | ||
macdeployqt "$app_name" | ||
cpack | ||
mv *.dmg "$release_name".dmg | ||
sha256=$(shasum -a 256 "$release_name".dmg | awk '{ print toupper($1) }') | ||
asset_path="./$build_folder/$release_name.dmg" | ||
echo "::set-output name=sha256::${sha256}" | ||
echo "::set-output name=release_name::${release_name}.zip" | ||
echo "::set-output name=asset_path::${asset_path}" | ||
echo "::set-output name=krb_ver::${krb_ver}" | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ steps.build.outputs.asset_path }} | ||
name: Karbo Wallet ${{ steps.build.outputs.krb_ver }} | ||
body: | | ||
**${{ steps.build.outputs.release_name }}** | ||
${{ steps.build.outputs.sha256 }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-ubuntu16: | ||
name: Ubuntu 16.04 | ||
runs-on: ubuntu-16.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
BOOST_ROOT= | ||
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-16.04-"$krb_ver" | ||
app_name="KarbowanecWallet" | ||
rm -rf cryptonote | ||
git clone https://github.com/seredat/karbowanec.git cryptonote | ||
mkdir -p "$build_folder" | ||
cd "$build_folder" | ||
cmake ../.. | ||
make | ||
cpack | ||
tar -czf "$release_name".tar.gz *.deb | ||
sha256=$(shasum -a 256 "$release_name".tar.gz | awk '{print toupper($1)}') | ||
asset_path="./$build_folder/$release_name".tar.gz | ||
echo "::set-output name=sha256::${sha256}" | ||
echo "::set-output name=release_name::${release_name}.tar.gz" | ||
echo "::set-output name=asset_path::${asset_path}" | ||
echo "::set-output name=krb_ver::${krb_ver}" | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ steps.build.outputs.asset_path }} | ||
name: Karbo Wallet ${{ steps.build.outputs.krb_ver }} | ||
body: | | ||
**${{ steps.build.outputs.release_name }}** | ||
${{ steps.build.outputs.sha256 }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-ubuntu18: | ||
name: Ubuntu 18.04 | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- name: Build | ||
id: build | ||
run: | | ||
BOOST_ROOT= | ||
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-18.04-"$krb_ver" | ||
app_name="KarbowanecWallet" | ||
rm -rf cryptonote | ||
git clone https://github.com/seredat/karbowanec.git cryptonote | ||
mkdir -p "$build_folder" | ||
cd "$build_folder" | ||
cmake ../.. | ||
make | ||
tar -czf "$release_name".tar.gz "$app_name" | ||
sha256=$(shasum -a 256 "$release_name".tar.gz | awk '{print toupper($1)}') | ||
asset_path="./$build_folder/$release_name".tar.gz | ||
echo "::set-output name=sha256::${sha256}" | ||
echo "::set-output name=release_name::${release_name}.tar.gz" | ||
echo "::set-output name=asset_path::${asset_path}" | ||
echo "::set-output name=krb_ver::${krb_ver}" | ||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: ${{ steps.build.outputs.asset_path }} | ||
name: Karbo Wallet ${{ steps.build.outputs.krb_ver }} | ||
body: | | ||
**${{ steps.build.outputs.release_name }}** | ||
${{ steps.build.outputs.sha256 }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.