Skip to content

Commit 7e211e2

Browse files
authored
Merge pull request #69 from end2endzone/feature-issue68
Update to RapidAssist version 0.11.0
2 parents c5532b2 + e88c24c commit 7e211e2

File tree

11 files changed

+83
-60
lines changed

11 files changed

+83
-60
lines changed

.github/workflows/build_linux.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121

2222
- name: Configure GIT
2323
working-directory: ${{env.GITHUB_WORKSPACE}}
@@ -28,7 +28,7 @@ jobs:
2828
git submodule update --init --recursive
2929
3030
- name: Setup python
31-
uses: actions/setup-python@v2
31+
uses: actions/setup-python@v5
3232
with:
3333
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
3434
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
@@ -48,7 +48,8 @@ jobs:
4848
env
4949
5050
- name: Deploy 'tests not available' badge before building
51-
uses: exuanbo/actions-deploy-gist@v1
51+
#uses: exuanbo/actions-deploy-gist@v1
52+
uses: end2endzone/actions-deploy-gist@main
5253
if: github.event_name != 'pull_request'
5354
with:
5455
token: ${{ secrets.BADGES }}
@@ -72,11 +73,13 @@ jobs:
7273
run: ./ci/github/install_bin2cpp.sh
7374

7475
- name: Run unit tests
76+
id: unit_tests
7577
working-directory: ${{env.GITHUB_WORKSPACE}}
7678
shell: bash
7779
run: ./ci/github/test_script.sh
7880

7981
- name: Search unit test report file
82+
if: success() || steps.unit_tests.conclusion == 'failure'
8083
working-directory: ${{env.GITHUB_WORKSPACE}}
8184
shell: bash
8285
run: |
@@ -85,20 +88,23 @@ jobs:
8588
echo UNITTEST_REPORT_PATH=$UNITTEST_REPORT_PATH >> $GITHUB_ENV
8689
8790
- name: Create test badge
91+
if: success() || steps.unit_tests.conclusion == 'failure'
8892
working-directory: ${{env.GITHUB_WORKSPACE}}
8993
run: python ci/github/maketestbadge.py ${{env.UNITTEST_REPORT_PATH}}
9094

9195
- name: Deploy test badge to gist
92-
uses: exuanbo/actions-deploy-gist@v1
93-
if: github.event_name != 'pull_request'
96+
if: success() || steps.unit_tests.conclusion == 'failure'
97+
#uses: exuanbo/actions-deploy-gist@v1
98+
uses: end2endzone/actions-deploy-gist@main
9499
with:
95100
token: ${{ secrets.BADGES }}
96101
gist_id: 58cf6c72c08e706335337d5ef9ca48e8
97102
gist_file_name: ${{env.GIT_REPOSITORY}}.${{env.GIT_BRANCH}}.${{env.GITHUB_WORKFLOW}}.json
98103
file_path: ./badge.json
99104

100105
- name: Archive test results
101-
uses: actions/upload-artifact@v2
106+
if: success() || steps.unit_tests.conclusion == 'failure'
107+
uses: actions/[email protected]
102108
with:
103109
name: unit-test-results
104110
path: build/bin/bin2cpp_unittest.*.xml
@@ -111,7 +117,8 @@ jobs:
111117
echo BIN2CPP_VERSION=$(cat build/version)>> $GITHUB_ENV
112118
113119
- name: Archive installation packages
114-
uses: actions/upload-artifact@v2
120+
if: success() || steps.unit_tests.conclusion == 'failure'
121+
uses: actions/[email protected]
115122
with:
116123
name: Installation packages.
117124
path: build/bin2cpp-${{env.BIN2CPP_VERSION}}-*.*

.github/workflows/build_macos.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
build:
1414
# For a list of available runner types, refer to
1515
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
16-
runs-on: macos-10.15
16+
runs-on: macos-latest
1717

1818
steps:
1919
- name: Checkout repository
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121

2222
- name: Configure GIT
2323
working-directory: ${{env.GITHUB_WORKSPACE}}
@@ -28,7 +28,7 @@ jobs:
2828
git submodule update --init --recursive
2929
3030
- name: Setup python
31-
uses: actions/setup-python@v2
31+
uses: actions/setup-python@v5
3232
with:
3333
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
3434
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
@@ -48,7 +48,8 @@ jobs:
4848
env
4949
5050
- name: Deploy 'tests not available' badge before building
51-
uses: exuanbo/actions-deploy-gist@v1
51+
#uses: exuanbo/actions-deploy-gist@v1
52+
uses: end2endzone/actions-deploy-gist@main
5253
if: github.event_name != 'pull_request'
5354
with:
5455
token: ${{ secrets.BADGES }}
@@ -72,11 +73,13 @@ jobs:
7273
run: ./ci/github/install_bin2cpp.sh
7374

7475
- name: Run unit tests
76+
id: unit_tests
7577
working-directory: ${{env.GITHUB_WORKSPACE}}
7678
shell: bash
7779
run: ./ci/github/test_script.sh
7880

7981
- name: Search unit test report file
82+
if: success() || steps.unit_tests.conclusion == 'failure'
8083
working-directory: ${{env.GITHUB_WORKSPACE}}
8184
shell: bash
8285
run: |
@@ -85,20 +88,23 @@ jobs:
8588
echo UNITTEST_REPORT_PATH=$UNITTEST_REPORT_PATH >> $GITHUB_ENV
8689
8790
- name: Create test badge
91+
if: success() || steps.unit_tests.conclusion == 'failure'
8892
working-directory: ${{env.GITHUB_WORKSPACE}}
8993
run: python ci/github/maketestbadge.py ${{env.UNITTEST_REPORT_PATH}}
9094

9195
- name: Deploy test badge to gist
92-
uses: exuanbo/actions-deploy-gist@v1
93-
if: github.event_name != 'pull_request'
96+
if: success() || steps.unit_tests.conclusion == 'failure'
97+
#uses: exuanbo/actions-deploy-gist@v1
98+
uses: end2endzone/actions-deploy-gist@main
9499
with:
95100
token: ${{ secrets.BADGES }}
96101
gist_id: 58cf6c72c08e706335337d5ef9ca48e8
97102
gist_file_name: ${{env.GIT_REPOSITORY}}.${{env.GIT_BRANCH}}.${{env.GITHUB_WORKFLOW}}.json
98103
file_path: ./badge.json
99104

100105
- name: Archive test results
101-
uses: actions/upload-artifact@v2
106+
if: success() || steps.unit_tests.conclusion == 'failure'
107+
uses: actions/[email protected]
102108
with:
103109
name: unit-test-results
104110
path: build/bin/bin2cpp_unittest.*.xml
@@ -111,7 +117,8 @@ jobs:
111117
echo BIN2CPP_VERSION=$(cat build/version)>> $GITHUB_ENV
112118
113119
- name: Archive installation packages
114-
uses: actions/upload-artifact@v2
120+
if: success() || steps.unit_tests.conclusion == 'failure'
121+
uses: actions/[email protected]
115122
with:
116123
name: Installation packages.
117124
path: build/bin2cpp-${{env.BIN2CPP_VERSION}}-*.*

.github/workflows/build_windows.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Windows
33
on: [push, pull_request]
44

55
env:
6-
PlatformToolset: v140
6+
PlatformToolset: v142
77

88
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
99
Platform: x64
@@ -19,7 +19,7 @@ jobs:
1919

2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323

2424
- name: Configure GIT
2525
working-directory: ${{env.GITHUB_WORKSPACE}}
@@ -30,7 +30,7 @@ jobs:
3030
git submodule update --init --recursive
3131
3232
- name: Setup python
33-
uses: actions/setup-python@v2
33+
uses: actions/setup-python@v5
3434
with:
3535
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax
3636
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
@@ -50,7 +50,8 @@ jobs:
5050
set
5151
5252
- name: Deploy 'tests not available' badge before building
53-
uses: exuanbo/actions-deploy-gist@v1
53+
#uses: exuanbo/actions-deploy-gist@v1
54+
uses: end2endzone/actions-deploy-gist@main
5455
if: github.event_name != 'pull_request'
5556
with:
5657
token: ${{ secrets.BADGES }}
@@ -74,11 +75,13 @@ jobs:
7475
run: call ci\github\install_bin2cpp.bat
7576

7677
- name: Run unit tests
78+
id: unit_tests
7779
working-directory: ${{env.GITHUB_WORKSPACE}}
7880
shell: cmd
7981
run: call ci\github\test_script.bat
8082

8183
- name: Search unit test report file
84+
if: success() || steps.unit_tests.conclusion == 'failure'
8285
working-directory: ${{env.GITHUB_WORKSPACE}}
8386
shell: cmd
8487
run: |
@@ -87,20 +90,23 @@ jobs:
8790
echo UNITTEST_REPORT_PATH=%UNITTEST_REPORT_PATH%>> %GITHUB_ENV%
8891
8992
- name: Create test badge
93+
if: success() || steps.unit_tests.conclusion == 'failure'
9094
working-directory: ${{env.GITHUB_WORKSPACE}}
9195
run: python ci\github\maketestbadge.py ${{env.UNITTEST_REPORT_PATH}}
9296

9397
- name: Deploy test badge to gist
94-
uses: exuanbo/actions-deploy-gist@v1
95-
if: github.event_name != 'pull_request'
98+
if: success() || steps.unit_tests.conclusion == 'failure'
99+
#uses: exuanbo/actions-deploy-gist@v1
100+
uses: end2endzone/actions-deploy-gist@main
96101
with:
97102
token: ${{ secrets.BADGES }}
98103
gist_id: 58cf6c72c08e706335337d5ef9ca48e8
99104
gist_file_name: ${{env.GIT_REPOSITORY}}.${{env.GIT_BRANCH}}.${{env.GITHUB_WORKFLOW}}.json
100105
file_path: ./badge.json
101106

102107
- name: Archive test results
103-
uses: actions/upload-artifact@v2
108+
if: success() || steps.unit_tests.conclusion == 'failure'
109+
uses: actions/[email protected]
104110
with:
105111
name: unit-test-results
106112
path: build\bin\${{env.Configuration}}\bin2cpp_unittest.*.xml
@@ -114,7 +120,8 @@ jobs:
114120
echo BIN2CPP_VERSION=%BIN2CPP_VERSION%>> %GITHUB_ENV%
115121
116122
- name: Archive installation packages
117-
uses: actions/upload-artifact@v2
123+
if: success() || steps.unit_tests.conclusion == 'failure'
124+
uses: actions/[email protected]
118125
with:
119126
name: Installation packages.
120127
path: build/bin2cpp-${{env.BIN2CPP_VERSION}}-*.*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/samples/demo_website/outdir
88
/samples/demo_relative_dir/include/bin2cpp
9+
/desktop.ini

.travis.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Changes for 3.0.1:
2+
3+
* Fixed issue #68: Update to RapidAssist version 0.11.0
4+
5+
16
Changes for 3.0.0:
27

38
Note: This version introduces breaking changes. The public API has changed. See notes about automatic identifiers and deprecated method `getFilename()`.

CMakeLists.txt

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ MESSAGE( STATUS "CMAKE_SYSTEM_PROCESSOR: " ${CMAKE_SYSTEM_PROCESSOR} )
5151
MESSAGE( STATUS "CMAKE_HOST_SYSTEM_PROCESSOR: " ${CMAKE_HOST_SYSTEM_PROCESSOR} )
5252
MESSAGE( STATUS "CMAKE_SYSTEM_INFO_FILE: " ${CMAKE_SYSTEM_INFO_FILE} )
5353

54+
function(get_major_version VERSION_STRING OUTPUT_VARIABLE)
55+
string(REGEX MATCH "^([0-9]+)" MAJOR_VERSION ${VERSION_STRING})
56+
set(${OUTPUT_VARIABLE} "${CMAKE_MATCH_1}" PARENT_SCOPE)
57+
endfunction()
58+
5459
# Get OS name and version.
5560
include(GetOsReleaseInfo)
5661
if (WIN32)
@@ -61,13 +66,28 @@ if (WIN32)
6166
elseif (APPLE)
6267
# Get MacOS release info.
6368
GetOsReleaseInfo(MAC_RELEASE_NAME MAC_RELEASE_VER)
69+
70+
# MAC_RELEASE_NAME used to resolve to something like `macOS Catalina`. Now On Github's Action,
71+
# the output is `macOS Unknown`. If the code name of the OS is Unknown, it is better to remove it completely.
72+
# Replace ` Unknown` by ``.
73+
string(REPLACE " Unknown" "" MAC_RELEASE_NAME "${MAC_RELEASE_NAME}")
74+
75+
# Extract release MAJOR version
76+
get_major_version(${MAC_RELEASE_VER} MAC_RELEASE_VER_MAJOR)
77+
6478
MESSAGE( STATUS "MAC_RELEASE_NAME: " ${MAC_RELEASE_NAME} )
6579
MESSAGE( STATUS "MAC_RELEASE_VER: " ${MAC_RELEASE_VER} )
80+
MESSAGE( STATUS "MAC_RELEASE_VER_MAJOR: " ${MAC_RELEASE_VER_MAJOR} )
6681
elseif (UNIX)
6782
# Get Linux distribution info.
6883
GetOsReleaseInfo(LINUX_DIST_NAME LINUX_DIST_VER )
84+
85+
# Extract distribution MAJOR version
86+
get_major_version(${LINUX_DIST_VER} LINUX_DIST_VER_MAJOR)
87+
6988
MESSAGE( STATUS "LINUX_DIST_NAME: " ${LINUX_DIST_NAME} )
7089
MESSAGE( STATUS "LINUX_DIST_VER: " ${LINUX_DIST_VER} )
90+
MESSAGE( STATUS "LINUX_DIST_VER_MAJOR: " ${LINUX_DIST_VER_MAJOR} )
7191
endif()
7292

7393

@@ -78,7 +98,7 @@ endif()
7898
# Product version according to Semantic Versioning v2.0.0 https://semver.org/
7999
SET(BIN2CPP_VERSION_MAJOR 3)
80100
SET(BIN2CPP_VERSION_MINOR 0)
81-
SET(BIN2CPP_VERSION_PATCH 0)
101+
SET(BIN2CPP_VERSION_PATCH 1)
82102
set(BIN2CPP_VERSION ${BIN2CPP_VERSION_MAJOR}.${BIN2CPP_VERSION_MINOR}.${BIN2CPP_VERSION_PATCH})
83103
FILE(WRITE ${CMAKE_BINARY_DIR}/version "${BIN2CPP_VERSION}")
84104

@@ -283,8 +303,8 @@ elseif (APPLE)
283303
string(TOLOWER "${MAC_RELEASE_NAME}" MAC_RELEASE_NAME)
284304
string(REPLACE " " "." MAC_RELEASE_NAME "${MAC_RELEASE_NAME}")
285305

286-
# Updating the package filename to `bin2cpp-2.4.0-macos.catalina-x86_64.tar.gz`.
287-
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${MAC_RELEASE_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
306+
# 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`.
307+
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${MAC_RELEASE_NAME}.${MAC_RELEASE_VER_MAJOR}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
288308
elseif (UNIX)
289309
# Default package filename example : `bin2cpp-2.4.0-Linux.tar.gz`.
290310
#
@@ -297,8 +317,8 @@ elseif (UNIX)
297317
string(TOLOWER "${LINUX_DIST_NAME}" LINUX_DIST_NAME)
298318
string(REPLACE " " "." LINUX_DIST_NAME "${LINUX_DIST_NAME}")
299319

300-
# Updating the package filename to `bin2cpp-2.4.0-ubuntu-x86_64.tar.gz`.
301-
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LINUX_DIST_NAME}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
320+
# 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`.
321+
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LINUX_DIST_NAME}.${LINUX_DIST_VER_MAJOR}-${CMAKE_HOST_SYSTEM_PROCESSOR}")
302322
endif()
303323

304324

INSTALL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This section explains how to compile and build the software and how to get a dev
2727
The following software must be installed on the system for compiling source code:
2828

2929
* [Google C++ Testing Framework v1.8.0](https://github.com/google/googletest/tree/release-1.8.0)
30-
* [RapidAssist v0.10.2](https://github.com/end2endzone/RapidAssist/tree/0.10.2)
30+
* [RapidAssist v0.11.0](https://github.com/end2endzone/RapidAssist/tree/0.11.0)
3131
* [CMake](http://www.cmake.org/) v3.4.3 (or newer)
3232

3333

0 commit comments

Comments
 (0)