Skip to content

Commit

Permalink
Merge branch 'master' into bcp-008-01
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-r-thorpe committed Jul 26, 2024
2 parents 4e37320 + f4c676c commit b24ce69
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 11 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,34 @@ on: [pull_request, push]
env:
SECRET_GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
SECRET_RESULTS_SHEET_ID: ${{ secrets.RESULTS_SHEET_ID }}
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
build_and_test:
name: '${{ matrix.os }}: build and test (install mdns: ${{ matrix.install_mdns }}, use conan: ${{ matrix.use_conan }}, force cpprest asio: ${{ matrix.force_cpprest_asio }}, dns-sd mode: ${{ matrix.dns_sd_mode}}, enable_authorization: ${{ matrix.enable_authorization }})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
os: [ubuntu-20.04, macos-12, windows-2019]
install_mdns: [false, true]
use_conan: [true]
force_cpprest_asio: [false]
dns_sd_mode: [multicast, unicast]
enable_authorization: [false, true]
exclude:
# install_mdns is only meaningful on Linux
- os: macos-11
- os: macos-12
enable_authorization: false
- os: windows-2019
enable_authorization: false
- os: ubuntu-20.04
enable_authorization: false
- os: macos-11
- os: macos-12
install_mdns: true
- os: windows-2019
install_mdns: true
# for now, unicast DNS-SD tests are only implemented on Linux
- os: macos-11
- os: macos-12
dns_sd_mode: unicast
- os: windows-2019
dns_sd_mode: unicast
Expand Down Expand Up @@ -353,6 +354,7 @@ jobs:
echo "CMAKE_WORKSPACE=${RUNNER_WORKSPACE//\\/\/}" >> $GITHUB_ENV
- name: install test
if: runner.os != 'macOS'
uses: lukka/[email protected]
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
Expand All @@ -367,6 +369,7 @@ jobs:
${{ env.CMAKE_COMPILER_ARGS }}'

- name: install test log
if: runner.os != 'macOS'
run: |
# dump the log file created in Sandbox/my-nmos-node/CMakeLists.txt
cat ${{ env.RUNNER_WORKSPACE }}/build-my-nmos-node/my-nmos-node_include-release.txt
Expand Down Expand Up @@ -643,7 +646,7 @@ jobs:
# ubuntu-14.04 ca-certificates are out of date
git config --global http.sslVerify false
# build and install openssl
curl -OsSk https://www.openssl.org/source/openssl-1.1.1v.tar.gz
curl -OsSk https://openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz
tar xzf openssl-1.1.1v.tar.gz
cd openssl-1.1.1v
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl
Expand Down Expand Up @@ -909,6 +912,7 @@ jobs:
echo "CMAKE_WORKSPACE=${RUNNER_WORKSPACE//\\/\/}" >> $GITHUB_ENV
- name: install test
if: runner.os != 'macOS'
uses: lukka/[email protected]
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
Expand All @@ -923,6 +927,7 @@ jobs:
${{ env.CMAKE_COMPILER_ARGS }}'

- name: install test log
if: runner.os != 'macOS'
run: |
# dump the log file created in Sandbox/my-nmos-node/CMakeLists.txt
cat ${{ env.RUNNER_WORKSPACE }}/build-my-nmos-node/my-nmos-node_include-release.txt
Expand Down Expand Up @@ -1172,8 +1177,8 @@ jobs:

- name: make badges
run: |
# combine badges from all builds, exclude macos-11
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-11_auth macos-11_noauth
# combine badges from all builds, exclude macos-12
${{ github.workspace }}/Sandbox/make_badges.sh ${{ github.workspace }} ${{ runner.workspace }}/artifacts macos-12_auth macos-12_noauth
# force push to github onto an orphan 'badges' branch
cd ${{ github.workspace }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/src/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on: [pull_request, push]
env:
SECRET_GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
SECRET_RESULTS_SHEET_ID: ${{ secrets.RESULTS_SHEET_ID }}
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
jobs:
build_and_test:
name: '${{ matrix.os }}: build and test (install mdns: ${{ matrix.install_mdns }}, use conan: ${{ matrix.use_conan }}, force cpprest asio: ${{ matrix.force_cpprest_asio }}, dns-sd mode: ${{ matrix.dns_sd_mode}}, enable_authorization: ${{ matrix.enable_authorization }})'
Expand Down Expand Up @@ -159,7 +160,7 @@ jobs:
# ubuntu-14.04 ca-certificates are out of date
git config --global http.sslVerify false
# build and install openssl
curl -OsSk https://www.openssl.org/source/openssl-1.1.1v.tar.gz
curl -OsSk https://openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz
tar xzf openssl-1.1.1v.tar.gz
cd openssl-1.1.1v
./config --prefix=/usr/local/custom-openssl --libdir=lib --openssldir=/etc/ssl
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/src/install-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
echo "CMAKE_WORKSPACE=${RUNNER_WORKSPACE//\\/\/}" >> $GITHUB_ENV
- name: install test
if: runner.os != 'macOS'
uses: lukka/[email protected]
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
Expand All @@ -19,6 +20,7 @@
${{ env.CMAKE_COMPILER_ARGS }}'

- name: install test log
if: runner.os != 'macOS'
run: |
# dump the log file created in Sandbox/my-nmos-node/CMakeLists.txt
cat ${{ env.RUNNER_WORKSPACE }}/build-my-nmos-node/my-nmos-node_include-release.txt
2 changes: 1 addition & 1 deletion Development/nmos/control_protocol_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ namespace nmos
};
auto is_float32 = [](double value)
{
return value >= (std::numeric_limits<float_t>::min)()
return value >= (std::numeric_limits<float_t>::lowest)()
&& value <= (std::numeric_limits<float_t>::max)();
};

Expand Down
6 changes: 4 additions & 2 deletions Development/nmos/test/control_protocol_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -883,10 +883,12 @@ BST_TEST_CASE(testConstraints)
BST_REQUIRE_NO_THROW(nmos::details::constraints_validation(std::numeric_limits<uint64_t>::max(), value::null(), value::null(), no_constraints_uint64_constraints_validation_params));
// float32 datatype constraints validation
const nmos::details::datatype_constraints_validation_parameters no_constraints_float32_constraints_validation_params{ no_constraints_float32_datatype, nmos::make_get_control_protocol_datatype_descriptor_handler(control_protocol_state) };
BST_REQUIRE_THROW(nmos::details::constraints_validation(std::numeric_limits<double>::min(), value::null(), value::null(), no_constraints_float32_constraints_validation_params), nmos::control_protocol_exception);
BST_REQUIRE_THROW(nmos::details::constraints_validation(std::numeric_limits<double>::lowest(), value::null(), value::null(), no_constraints_float32_constraints_validation_params), nmos::control_protocol_exception);
BST_REQUIRE_THROW(nmos::details::constraints_validation(std::numeric_limits<double>::max(), value::null(), value::null(), no_constraints_float32_constraints_validation_params), nmos::control_protocol_exception);
BST_REQUIRE_NO_THROW(nmos::details::constraints_validation(std::numeric_limits<float_t>::min(), value::null(), value::null(), no_constraints_float32_constraints_validation_params));
BST_REQUIRE_NO_THROW(nmos::details::constraints_validation(std::numeric_limits<float_t>::lowest(), value::null(), value::null(), no_constraints_float32_constraints_validation_params));
BST_REQUIRE_NO_THROW(nmos::details::constraints_validation(std::numeric_limits<float_t>::max(), value::null(), value::null(), no_constraints_float32_constraints_validation_params));
BST_REQUIRE_NO_THROW(nmos::details::constraints_validation(0.0, value::null(), value::null(), no_constraints_float32_constraints_validation_params));
BST_REQUIRE_NO_THROW(nmos::details::constraints_validation(-1000.0, value::null(), value::null(), no_constraints_float32_constraints_validation_params));
// float64 datatype constraints validation
const nmos::details::datatype_constraints_validation_parameters no_constraints_float64_constraints_validation_params{ no_constraints_float64_datatype, nmos::make_get_control_protocol_datatype_descriptor_handler(control_protocol_state) };
BST_REQUIRE_THROW(nmos::details::constraints_validation(1000, value::null(), value::null(), no_constraints_float64_constraints_validation_params), nmos::control_protocol_exception);
Expand Down

0 comments on commit b24ce69

Please sign in to comment.