diff --git a/.github/workflows/build_linux.yml b/.github/workflows/build_linux.yml index fd19c17..2ba9e07 100755 --- a/.github/workflows/build_linux.yml +++ b/.github/workflows/build_linux.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Configure GIT working-directory: ${{env.GITHUB_WORKSPACE}} @@ -28,7 +28,7 @@ jobs: git submodule update --init --recursive - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified @@ -48,7 +48,8 @@ jobs: env - name: Deploy 'tests not available' badge before building - uses: exuanbo/actions-deploy-gist@v1 + #uses: exuanbo/actions-deploy-gist@v1 + uses: end2endzone/actions-deploy-gist@main if: github.event_name != 'pull_request' with: token: ${{ secrets.BADGES }} @@ -72,11 +73,13 @@ jobs: run: ./ci/github/install_bin2cpp.sh - name: Run unit tests + id: unit_tests working-directory: ${{env.GITHUB_WORKSPACE}} shell: bash run: ./ci/github/test_script.sh - name: Search unit test report file + if: success() || steps.unit_tests.conclusion == 'failure' working-directory: ${{env.GITHUB_WORKSPACE}} shell: bash run: | @@ -85,12 +88,14 @@ jobs: echo UNITTEST_REPORT_PATH=$UNITTEST_REPORT_PATH >> $GITHUB_ENV - name: Create test badge + if: success() || steps.unit_tests.conclusion == 'failure' working-directory: ${{env.GITHUB_WORKSPACE}} run: python ci/github/maketestbadge.py ${{env.UNITTEST_REPORT_PATH}} - name: Deploy test badge to gist - uses: exuanbo/actions-deploy-gist@v1 - if: github.event_name != 'pull_request' + if: success() || steps.unit_tests.conclusion == 'failure' + #uses: exuanbo/actions-deploy-gist@v1 + uses: end2endzone/actions-deploy-gist@main with: token: ${{ secrets.BADGES }} gist_id: 58cf6c72c08e706335337d5ef9ca48e8 @@ -98,7 +103,8 @@ jobs: file_path: ./badge.json - name: Archive test results - uses: actions/upload-artifact@v2 + if: success() || steps.unit_tests.conclusion == 'failure' + uses: actions/upload-artifact@v4.3.5 with: name: unit-test-results path: build/bin/bin2cpp_unittest.*.xml @@ -111,7 +117,8 @@ jobs: echo BIN2CPP_VERSION=$(cat build/version)>> $GITHUB_ENV - name: Archive installation packages - uses: actions/upload-artifact@v2 + if: success() || steps.unit_tests.conclusion == 'failure' + uses: actions/upload-artifact@v4.3.5 with: name: Installation packages. path: build/bin2cpp-${{env.BIN2CPP_VERSION}}-*.* diff --git a/.github/workflows/build_macos.yml b/.github/workflows/build_macos.yml index f64016c..b6eacdb 100755 --- a/.github/workflows/build_macos.yml +++ b/.github/workflows/build_macos.yml @@ -13,11 +13,11 @@ jobs: build: # For a list of available runner types, refer to # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on - runs-on: macos-10.15 + runs-on: macos-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Configure GIT working-directory: ${{env.GITHUB_WORKSPACE}} @@ -28,7 +28,7 @@ jobs: git submodule update --init --recursive - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified @@ -48,7 +48,8 @@ jobs: env - name: Deploy 'tests not available' badge before building - uses: exuanbo/actions-deploy-gist@v1 + #uses: exuanbo/actions-deploy-gist@v1 + uses: end2endzone/actions-deploy-gist@main if: github.event_name != 'pull_request' with: token: ${{ secrets.BADGES }} @@ -72,11 +73,13 @@ jobs: run: ./ci/github/install_bin2cpp.sh - name: Run unit tests + id: unit_tests working-directory: ${{env.GITHUB_WORKSPACE}} shell: bash run: ./ci/github/test_script.sh - name: Search unit test report file + if: success() || steps.unit_tests.conclusion == 'failure' working-directory: ${{env.GITHUB_WORKSPACE}} shell: bash run: | @@ -85,12 +88,14 @@ jobs: echo UNITTEST_REPORT_PATH=$UNITTEST_REPORT_PATH >> $GITHUB_ENV - name: Create test badge + if: success() || steps.unit_tests.conclusion == 'failure' working-directory: ${{env.GITHUB_WORKSPACE}} run: python ci/github/maketestbadge.py ${{env.UNITTEST_REPORT_PATH}} - name: Deploy test badge to gist - uses: exuanbo/actions-deploy-gist@v1 - if: github.event_name != 'pull_request' + if: success() || steps.unit_tests.conclusion == 'failure' + #uses: exuanbo/actions-deploy-gist@v1 + uses: end2endzone/actions-deploy-gist@main with: token: ${{ secrets.BADGES }} gist_id: 58cf6c72c08e706335337d5ef9ca48e8 @@ -98,7 +103,8 @@ jobs: file_path: ./badge.json - name: Archive test results - uses: actions/upload-artifact@v2 + if: success() || steps.unit_tests.conclusion == 'failure' + uses: actions/upload-artifact@v4.3.5 with: name: unit-test-results path: build/bin/bin2cpp_unittest.*.xml @@ -111,7 +117,8 @@ jobs: echo BIN2CPP_VERSION=$(cat build/version)>> $GITHUB_ENV - name: Archive installation packages - uses: actions/upload-artifact@v2 + if: success() || steps.unit_tests.conclusion == 'failure' + uses: actions/upload-artifact@v4.3.5 with: name: Installation packages. path: build/bin2cpp-${{env.BIN2CPP_VERSION}}-*.* diff --git a/.github/workflows/build_windows.yml b/.github/workflows/build_windows.yml index c670654..1a65e4b 100755 --- a/.github/workflows/build_windows.yml +++ b/.github/workflows/build_windows.yml @@ -3,7 +3,7 @@ name: Windows on: [push, pull_request] env: - PlatformToolset: v140 + PlatformToolset: v142 # build platform, i.e. x86, x64, Any CPU. This setting is optional. Platform: x64 @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Configure GIT working-directory: ${{env.GITHUB_WORKSPACE}} @@ -30,7 +30,7 @@ jobs: git submodule update --init --recursive - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified @@ -50,7 +50,8 @@ jobs: set - name: Deploy 'tests not available' badge before building - uses: exuanbo/actions-deploy-gist@v1 + #uses: exuanbo/actions-deploy-gist@v1 + uses: end2endzone/actions-deploy-gist@main if: github.event_name != 'pull_request' with: token: ${{ secrets.BADGES }} @@ -74,11 +75,13 @@ jobs: run: call ci\github\install_bin2cpp.bat - name: Run unit tests + id: unit_tests working-directory: ${{env.GITHUB_WORKSPACE}} shell: cmd run: call ci\github\test_script.bat - name: Search unit test report file + if: success() || steps.unit_tests.conclusion == 'failure' working-directory: ${{env.GITHUB_WORKSPACE}} shell: cmd run: | @@ -87,12 +90,14 @@ jobs: echo UNITTEST_REPORT_PATH=%UNITTEST_REPORT_PATH%>> %GITHUB_ENV% - name: Create test badge + if: success() || steps.unit_tests.conclusion == 'failure' working-directory: ${{env.GITHUB_WORKSPACE}} run: python ci\github\maketestbadge.py ${{env.UNITTEST_REPORT_PATH}} - name: Deploy test badge to gist - uses: exuanbo/actions-deploy-gist@v1 - if: github.event_name != 'pull_request' + if: success() || steps.unit_tests.conclusion == 'failure' + #uses: exuanbo/actions-deploy-gist@v1 + uses: end2endzone/actions-deploy-gist@main with: token: ${{ secrets.BADGES }} gist_id: 58cf6c72c08e706335337d5ef9ca48e8 @@ -100,7 +105,8 @@ jobs: file_path: ./badge.json - name: Archive test results - uses: actions/upload-artifact@v2 + if: success() || steps.unit_tests.conclusion == 'failure' + uses: actions/upload-artifact@v4.3.5 with: name: unit-test-results path: build\bin\${{env.Configuration}}\bin2cpp_unittest.*.xml @@ -114,7 +120,8 @@ jobs: echo BIN2CPP_VERSION=%BIN2CPP_VERSION%>> %GITHUB_ENV% - name: Archive installation packages - uses: actions/upload-artifact@v2 + if: success() || steps.unit_tests.conclusion == 'failure' + uses: actions/upload-artifact@v4.3.5 with: name: Installation packages. path: build/bin2cpp-${{env.BIN2CPP_VERSION}}-*.* diff --git a/.gitignore b/.gitignore index cb039a3..6efc2c7 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .DS_Store /samples/demo_website/outdir /samples/demo_relative_dir/include/bin2cpp +/desktop.ini diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 04dee38..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -dist: trusty -sudo: required -language: cpp -os: -- linux -branches: - only: - - master -env: - global: - - BIN2CPP_BUILD_TYPE=Release - -install: -- cd $TRAVIS_BUILD_DIR/ci/travis; ./install_googletest.sh; -- cd $TRAVIS_BUILD_DIR/ci/travis; ./install_rapidassist.sh; - -script: -- cd $TRAVIS_BUILD_DIR/ci/travis; ./install_bin2cpp.sh; - -after_success: -- cd $TRAVIS_BUILD_DIR/ci/travis; ./test_script.sh; - -notifications: - email: true diff --git a/CHANGES b/CHANGES index 630acee..6e480de 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,8 @@ +Changes for 3.0.1: + +* Fixed issue #68: Update to RapidAssist version 0.11.0 + + Changes for 3.0.0: Note: This version introduces breaking changes. The public API has changed. See notes about automatic identifiers and deprecated method `getFilename()`. diff --git a/CMakeLists.txt b/CMakeLists.txt index 97cb9a6..74ca0c4 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,11 @@ MESSAGE( STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR} ) MESSAGE( STATUS "CMAKE_HOST_SYSTEM_PROCESSOR: " ${CMAKE_HOST_SYSTEM_PROCESSOR} ) MESSAGE( STATUS "CMAKE_SYSTEM_INFO_FILE: " ${CMAKE_SYSTEM_INFO_FILE} ) +function(get_major_version VERSION_STRING OUTPUT_VARIABLE) + string(REGEX MATCH "^([0-9]+)" MAJOR_VERSION ${VERSION_STRING}) + set(${OUTPUT_VARIABLE} "${CMAKE_MATCH_1}" PARENT_SCOPE) +endfunction() + # Get OS name and version. include(GetOsReleaseInfo) if (WIN32) @@ -61,13 +66,28 @@ if (WIN32) elseif (APPLE) # Get MacOS release info. GetOsReleaseInfo(MAC_RELEASE_NAME MAC_RELEASE_VER) + + # MAC_RELEASE_NAME used to resolve to something like `macOS Catalina`. Now On Github's Action, + # the output is `macOS Unknown`. If the code name of the OS is Unknown, it is better to remove it completely. + # Replace ` Unknown` by ``. + string(REPLACE " Unknown" "" MAC_RELEASE_NAME "${MAC_RELEASE_NAME}") + + # Extract release MAJOR version + get_major_version(${MAC_RELEASE_VER} MAC_RELEASE_VER_MAJOR) + MESSAGE( STATUS "MAC_RELEASE_NAME: " ${MAC_RELEASE_NAME} ) MESSAGE( STATUS "MAC_RELEASE_VER: " ${MAC_RELEASE_VER} ) + MESSAGE( STATUS "MAC_RELEASE_VER_MAJOR: " ${MAC_RELEASE_VER_MAJOR} ) elseif (UNIX) # Get Linux distribution info. GetOsReleaseInfo(LINUX_DIST_NAME LINUX_DIST_VER ) + + # Extract distribution MAJOR version + get_major_version(${LINUX_DIST_VER} LINUX_DIST_VER_MAJOR) + MESSAGE( STATUS "LINUX_DIST_NAME: " ${LINUX_DIST_NAME} ) MESSAGE( STATUS "LINUX_DIST_VER: " ${LINUX_DIST_VER} ) + MESSAGE( STATUS "LINUX_DIST_VER_MAJOR: " ${LINUX_DIST_VER_MAJOR} ) endif() @@ -78,7 +98,7 @@ endif() # Product version according to Semantic Versioning v2.0.0 https://semver.org/ SET(BIN2CPP_VERSION_MAJOR 3) SET(BIN2CPP_VERSION_MINOR 0) -SET(BIN2CPP_VERSION_PATCH 0) +SET(BIN2CPP_VERSION_PATCH 1) set(BIN2CPP_VERSION ${BIN2CPP_VERSION_MAJOR}.${BIN2CPP_VERSION_MINOR}.${BIN2CPP_VERSION_PATCH}) FILE(WRITE ${CMAKE_BINARY_DIR}/version "${BIN2CPP_VERSION}") @@ -283,8 +303,8 @@ elseif (APPLE) string(TOLOWER "${MAC_RELEASE_NAME}" MAC_RELEASE_NAME) string(REPLACE " " "." MAC_RELEASE_NAME "${MAC_RELEASE_NAME}") - # Updating the package filename to `bin2cpp-2.4.0-macos.catalina-x86_64.tar.gz`. - set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${MAC_RELEASE_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}") + # Updating the package filename to `bin2cpp-2.4.0-macos.catalina.10-x86_64.tar.gz` or `bin2cpp-3.0.1-macos.14-arm64.tar.gz`. + set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${MAC_RELEASE_NAME}.${MAC_RELEASE_VER_MAJOR}-${CMAKE_HOST_SYSTEM_PROCESSOR}") elseif (UNIX) # Default package filename example : `bin2cpp-2.4.0-Linux.tar.gz`. # @@ -297,8 +317,8 @@ elseif (UNIX) string(TOLOWER "${LINUX_DIST_NAME}" LINUX_DIST_NAME) string(REPLACE " " "." LINUX_DIST_NAME "${LINUX_DIST_NAME}") - # Updating the package filename to `bin2cpp-2.4.0-ubuntu-x86_64.tar.gz`. - set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LINUX_DIST_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}") + # Updating the package filename to `bin2cpp-3.0.1-ubuntu.24-x86_64.tar.gz` or `bin2cpp-3.0.1-centos.10-x86_64.tar.gz`. + set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LINUX_DIST_NAME}.${LINUX_DIST_VER_MAJOR}-${CMAKE_HOST_SYSTEM_PROCESSOR}") endif() diff --git a/INSTALL.md b/INSTALL.md index 3e0b3b6..35362d3 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -27,7 +27,7 @@ This section explains how to compile and build the software and how to get a dev The following software must be installed on the system for compiling source code: * [Google C++ Testing Framework v1.8.0](https://github.com/google/googletest/tree/release-1.8.0) -* [RapidAssist v0.10.2](https://github.com/end2endzone/RapidAssist/tree/0.10.2) +* [RapidAssist v0.11.0](https://github.com/end2endzone/RapidAssist/tree/0.11.0) * [CMake](http://www.cmake.org/) v3.4.3 (or newer) diff --git a/appveyor.yml b/appveyor.yml index c6fbf98..cfcfd16 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,7 @@ version: "{branch} (#{build})" branches: only: - master + - /feature-issue.*/ # Do not build on tags (GitHub and BitBucket) skip_tags: true @@ -26,7 +27,7 @@ skip_tags: true #---------------------------------# # Build worker image (VM template) -image: Visual Studio 2015 +image: Visual Studio 2019 # scripts that are called at very beginning, before repo cloning init: @@ -38,7 +39,6 @@ clone_folder: c:\projects\bin2cpp # scripts that run after cloning repository install: -- cmd: echo INSTALL! - cmd: git submodule update --init --recursive #---------------------------------# @@ -46,7 +46,7 @@ install: #---------------------------------# environment: - PlatformToolset: v140 + PlatformToolset: v142 # build platform, i.e. x86, x64, Any CPU. This setting is optional. Platform: x64 diff --git a/ci/linux/install_rapidassist.sh b/ci/linux/install_rapidassist.sh index fcf278c..34fd393 100755 --- a/ci/linux/install_rapidassist.sh +++ b/ci/linux/install_rapidassist.sh @@ -32,8 +32,8 @@ git clone "https://github.com/end2endzone/RapidAssist.git" cd RapidAssist echo -echo Checking out version v0.10.2... -git -c advice.detachedHead=false checkout 0.10.2 +echo Checking out version v0.11.0... +git -c advice.detachedHead=false checkout 0.11.0 echo echo ============================================================================ diff --git a/ci/windows/install_rapidassist.bat b/ci/windows/install_rapidassist.bat index 5335d1b..8055760 100644 --- a/ci/windows/install_rapidassist.bat +++ b/ci/windows/install_rapidassist.bat @@ -37,8 +37,8 @@ git clone "https://github.com/end2endzone/RapidAssist.git" cd RapidAssist echo. -echo Checking out version v0.10.2... -git -c advice.detachedHead=false checkout 0.10.2 +echo Checking out version v0.11.0... +git -c advice.detachedHead=false checkout 0.11.0 echo. echo ============================================================================