diff --git a/.github/workflows/cli-testnet.yml b/.github/workflows/cli-testnet.yml index 41cf464b..d48fe8f3 100644 --- a/.github/workflows/cli-testnet.yml +++ b/.github/workflows/cli-testnet.yml @@ -21,11 +21,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ windows-2019, macos-13, ubuntu-latest ] + os: [ ubuntu-latest ] include: - - os: windows-2019 - - os: macos-13 - os: ubuntu-latest + target: linux-amd64 + net: testnet env: CCACHE_TEMPDIR: ${{ github.workspace }}/ccache CONAN_HOME: "${{ github.workspace }}/build/" @@ -64,7 +64,7 @@ jobs: with: save-always: true path: ${{ env.CONAN_HOME }} - key: host-${{ runner.os }}-target-${{ runner.os }}-${{ hashFiles('conanfile.py') }} + key: host-${{ runner.os }}-target-${{ runner.os }}-${{ hashFiles('contrib/cmake/conanfile.py') }} - name: Install Conan run: pip install conan pytest && conan --version - name: Setup CMake and Ninja @@ -75,147 +75,159 @@ jobs: - name: Call make release-testnet run: | conan config install contrib/cmake/settings_user.yml - make release-testnet - linux-amd64: - runs-on: ubuntu-20.04 - env: - CCACHE_TEMPDIR: ${{ github.workspace }}/ccache - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/ccache - key: ccache-${{ runner.os }}-build-testnet-cli - restore-keys: ccache-${{ runner.os }}-build-testnet-cli - - name: update apt - run: sudo apt update - - name: install dependencies - run: sudo apt-get install -y python-dev autotools-dev libboost-all-dev libicu-dev libbz2-dev git screen checkinstall zlib1g-dev ccache miniupnpc - - name: build server - run: | - ${{env.CCACHE_SETTINGS}} - ./utils/build/testnet_linux_cli.sh - - name: Move Tarball - run: cd build/release && mv lethean-linux-cli-*.tar.bz2 ../../ - - uses: actions/upload-artifact@v3 - with: - name: lethean-linux-cli - if-no-files-found: error - path: lethean-linux-cli-*.tar.bz2 - - name: Release + make ci-${{ runner.target }}-testnet + - name: Release Tag uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') with: - files: ${{ github.workspace }}/lethean-linux-cli-*.tar.bz2 - macos-amd64: - runs-on: macos-latest - env: - CCACHE_TEMPDIR: ${{ github.workspace }}/ccache - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/ccache - key: ccache-${{ runner.os }}-build-testnet-cli - restore-keys: ccache-${{ runner.os }}-build-testnet-cli - - name: install dependencies - run: HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl boost icu4c ccache miniupnpc - - name: build server - env: - PKG_CONFIG_PATH: "/usr/local/opt/openssl@3/lib/pkgconfig" - OPENSSL_ROOT_DIR: "/usr/local/opt/openssl@3" - ZANO_BOOST_ROOT: "/opt/homebrew/opt/boost" - ZANO_BOOST_LIBS_PATH: "/opt/homebrew/opt/boost/lib" - CMAKE_OSX_SYSROOT: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk" - run: | - ${{env.CCACHE_SETTINGS}} - export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/icu4c/lib - ./utils/build/testnet_mac_osx_cli.sh - - name: Move Tarball - run: cd build/release && mv lethean-macos-cli-*.tar.bz2 ../../ - - uses: actions/upload-artifact@v3 - with: - name: lethean-macos-cli - if-no-files-found: error - path: lethean-macos-cli-*.tar.bz2 - - name: Release + files: '*ethean-${{ runner.target }}-cli.*' + - name: Release Branch uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + if: startsWith(github.ref, 'refs/heads/main') with: - files: ${{ github.workspace }}/lethean-macos-cli-*.tar.bz2 - windows-amd64: - runs-on: windows-latest - env: - CCACHE_TEMPDIR: ${{ github.workspace }}/ccache - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: recursive - - uses: actions/cache@v3 - with: - path: ${{ github.workspace }}/ccache - key: ccache-${{ runner.os }}-build-testnet-cli - restore-keys: ccache-${{ runner.os }}-build-testnet-cli - - name: Eat the Choco - run: | - choco install openssl --version 1.1.1.1500 -y - choco install ccache -y - choco install zip -y - - name: install msvc toolset - uses: ilammy/msvc-dev-cmd@v1 - - name: Install boost - uses: MarkusJx/install-boost@v2.4.1 - id: install-boost - with: - # REQUIRED: Specify the required boost version - # A list of supported versions can be found here: - # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json - boost_version: 1.80.0 - platform_version: 2022 - toolset: msvc - link: static - - name: Set up Visual Studio shell - uses: egor-tensin/vs-shell@v2 - with: - arch: x64 - - name: build server - env: - QT_PREFIX_PATH: C:\ProgramData\chocolatey\lib\Qt5.11.2\5.11.2 - BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} - LOCAL_BOOST_PATH: ${{ steps.install-boost.outputs.BOOST_ROOT }} - OPENSSL_ROOT_DIR: "C:\\Program Files\\OpenSSL-Win64" - CCACHE_TEMPDIR: ${{ github.workspace }}/ccache - run: | - refreshenv - ${{env.CCACHE_SETTINGS}} - .\utils\build\testnet_windows_cli.bat - - uses: actions/upload-artifact@v3 - with: - name: lethean-windows-cli - if-no-files-found: error - path: ${{ github.workspace }}\lethean-win-cli-*.zip - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - lethean-win-cli-* + tag_name: canary + prerelease: true + files: '*ethean-${{ runner.target }}-cli.*' +# linux-amd64: +# runs-on: ubuntu-20.04 +# env: +# CCACHE_TEMPDIR: ${{ github.workspace }}/ccache +# steps: +# - name: Cancel Previous Runs +# uses: styfle/cancel-workflow-action@0.9.1 +# with: +# access_token: ${{ github.token }} +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# submodules: recursive +# - uses: actions/cache@v3 +# with: +# path: ${{ github.workspace }}/ccache +# key: ccache-${{ runner.os }}-build-testnet-cli +# restore-keys: ccache-${{ runner.os }}-build-testnet-cli +# - name: update apt +# run: sudo apt update +# - name: install dependencies +# run: sudo apt-get install -y python-dev autotools-dev libboost-all-dev libicu-dev libbz2-dev git screen checkinstall zlib1g-dev ccache miniupnpc +# - name: build server +# run: | +# ${{env.CCACHE_SETTINGS}} +# ./utils/build/testnet_linux_cli.sh +# - name: Move Tarball +# run: cd build/release && mv lethean-linux-cli-*.tar.bz2 ../../ +# - uses: actions/upload-artifact@v3 +# with: +# name: lethean-linux-cli +# if-no-files-found: error +# path: lethean-linux-cli-*.tar.bz2 +# - name: Release +# uses: softprops/action-gh-release@v1 +# if: startsWith(github.ref, 'refs/tags/') +# with: +# files: ${{ github.workspace }}/lethean-linux-cli-*.tar.bz2 +# macos-amd64: +# runs-on: macos-latest +# env: +# CCACHE_TEMPDIR: ${{ github.workspace }}/ccache +# steps: +# - name: Cancel Previous Runs +# uses: styfle/cancel-workflow-action@0.9.1 +# with: +# access_token: ${{ github.token }} +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# submodules: recursive +# - uses: actions/cache@v3 +# with: +# path: ${{ github.workspace }}/ccache +# key: ccache-${{ runner.os }}-build-testnet-cli +# restore-keys: ccache-${{ runner.os }}-build-testnet-cli +# - name: install dependencies +# run: HOMEBREW_NO_AUTO_UPDATE=1 brew install openssl boost icu4c ccache miniupnpc +# - name: build server +# env: +# PKG_CONFIG_PATH: "/usr/local/opt/openssl@3/lib/pkgconfig" +# OPENSSL_ROOT_DIR: "/usr/local/opt/openssl@3" +# ZANO_BOOST_ROOT: "/opt/homebrew/opt/boost" +# ZANO_BOOST_LIBS_PATH: "/opt/homebrew/opt/boost/lib" +# CMAKE_OSX_SYSROOT: "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk" +# run: | +# ${{env.CCACHE_SETTINGS}} +# export LIBRARY_PATH=${LIBRARY_PATH}:/usr/local/opt/icu4c/lib +# ./utils/build/testnet_mac_osx_cli.sh +# - name: Move Tarball +# run: cd build/release && mv lethean-macos-cli-*.tar.bz2 ../../ +# - uses: actions/upload-artifact@v3 +# with: +# name: lethean-macos-cli +# if-no-files-found: error +# path: lethean-macos-cli-*.tar.bz2 +# - name: Release +# uses: softprops/action-gh-release@v1 +# if: startsWith(github.ref, 'refs/tags/') +# with: +# files: ${{ github.workspace }}/lethean-macos-cli-*.tar.bz2 +# windows-amd64: +# runs-on: windows-latest +# env: +# CCACHE_TEMPDIR: ${{ github.workspace }}/ccache +# steps: +# - name: Cancel Previous Runs +# uses: styfle/cancel-workflow-action@0.9.1 +# with: +# access_token: ${{ github.token }} +# - uses: actions/checkout@v3 +# with: +# fetch-depth: 0 +# submodules: recursive +# - uses: actions/cache@v3 +# with: +# path: ${{ github.workspace }}/ccache +# key: ccache-${{ runner.os }}-build-testnet-cli +# restore-keys: ccache-${{ runner.os }}-build-testnet-cli +# - name: Eat the Choco +# run: | +# choco install openssl --version 1.1.1.1500 -y +# choco install ccache -y +# choco install zip -y +# - name: install msvc toolset +# uses: ilammy/msvc-dev-cmd@v1 +# - name: Install boost +# uses: MarkusJx/install-boost@v2.4.1 +# id: install-boost +# with: +# # REQUIRED: Specify the required boost version +# # A list of supported versions can be found here: +# # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json +# boost_version: 1.80.0 +# platform_version: 2022 +# toolset: msvc +# link: static +# - name: Set up Visual Studio shell +# uses: egor-tensin/vs-shell@v2 +# with: +# arch: x64 +# - name: build server +# env: +# QT_PREFIX_PATH: C:\ProgramData\chocolatey\lib\Qt5.11.2\5.11.2 +# BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} +# LOCAL_BOOST_PATH: ${{ steps.install-boost.outputs.BOOST_ROOT }} +# OPENSSL_ROOT_DIR: "C:\\Program Files\\OpenSSL-Win64" +# CCACHE_TEMPDIR: ${{ github.workspace }}/ccache +# run: | +# refreshenv +# ${{env.CCACHE_SETTINGS}} +# .\utils\build\testnet_windows_cli.bat +# - uses: actions/upload-artifact@v3 +# with: +# name: lethean-windows-cli +# if-no-files-found: error +# path: ${{ github.workspace }}\lethean-win-cli-*.zip +# - name: Release +# uses: softprops/action-gh-release@v1 +# if: startsWith(github.ref, 'refs/tags/') +# with: +# files: | +# lethean-win-cli-* diff --git a/Makefile b/Makefile index de756aab..64a5d6da 100644 --- a/Makefile +++ b/Makefile @@ -55,6 +55,27 @@ static-release-testnet: $(eval command += $(cmake_release) $(cmake_static) $(cmake_testnet)) $(call CMAKE,$(dir_release),$(command)) && $(MAKE) +# +# CI +# +ci-linux-release: static-release + @rm -fr lethean && mkdir -p lethean + @cp -r build/release/src/letheand lethean/letheand + @cp -r build/release/src/lethean-cli-wallet lethean/lethean-cli-wallet + @chmod +x lethean/lethean* + @tar -cjvf lethean-linux-amd64-cli.tar.bz2 lethean/ + @rm -rf lethean + +ci-linux-amd64-testnet: static-release-testnet + @rm -fr lethean && mkdir -p lethean + @cp -r build/release/src/letheand lethean/letheand-testnet + @cp -r build/release/src/lethean-cli-wallet lethean/lethean-cli-wallet-testnet + @chmod +x lethean/lethean* + @tar -cjvf testnet-lethean-linux-amd64-cli.tar.bz2 lethean/ + @rm -rf lethean + + + # # GUI # @@ -102,4 +123,4 @@ macos-gui: tags: ctags -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q --language-force=C++ src contrib tests/gtest -.PHONY: all release debug static static-release gui gui-release gui-static gui-release-static gui-debug test test-release test-debug clean tags macos-gui +.PHONY: all release debug static static-release gui gui-release gui-static gui-release-static gui-debug test test-release test-debug clean tags macos-gui ci-testnet ci-release diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 69f1dc35..61ea4f60 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -663,7 +663,7 @@ bool simple_wallet::restore_wallet(const std::string& wallet_file, const std::st "Your wallet has been restored.\n" << "To start synchronizing with the daemon use \"refresh\" command.\n" << "Use \"help\" command to see the list of available commands.\n" << - "Always use \"exit\" command when closing simplewallet to save\n" << + "Always use \"exit\" command when closing lethean-cli-wallet to save\n" << "current session's state. Otherwise, you will possibly need to synchronize \n" << "your wallet again. Your wallet keys is NOT under risk anyway.\n" << "**********************************************************************"; @@ -2695,7 +2695,7 @@ int main(int argc, char* argv[]) if (command_line::get_arg(vm, command_line::arg_help)) { - success_msg_writer() << "Usage: simplewallet [--wallet-file=|--generate-new-wallet=] [--daemon-address=:] []"; + success_msg_writer() << "Usage: lethean-cli-wallet [--wallet-file=|--generate-new-wallet=] [--daemon-address=:] []"; success_msg_writer() << desc_all << '\n' << sw->get_commands_str(); return false; }