Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -85,20 +88,23 @@ 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
gist_file_name: ${{env.GIT_REPOSITORY}}.${{env.GIT_BRANCH}}.${{env.GITHUB_WORKFLOW}}.json
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
Expand All @@ -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}}-*.*
23 changes: 15 additions & 8 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -85,20 +88,23 @@ 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
gist_file_name: ${{env.GIT_REPOSITORY}}.${{env.GIT_BRANCH}}.${{env.GITHUB_WORKFLOW}}.json
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
Expand All @@ -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}}-*.*
23 changes: 15 additions & 8 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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: |
Expand All @@ -87,20 +90,23 @@ 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
gist_file_name: ${{env.GIT_REPOSITORY}}.${{env.GIT_BRANCH}}.${{env.GITHUB_WORKFLOW}}.json
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
Expand All @@ -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}}-*.*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
.DS_Store
/samples/demo_website/outdir
/samples/demo_relative_dir/include/bin2cpp
/desktop.ini
24 changes: 0 additions & 24 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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()`.
Expand Down
30 changes: 25 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()


Expand All @@ -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}")

Expand Down Expand Up @@ -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`.
#
Expand All @@ -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()


Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
Loading