Update value reader and value writer implementation #257
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: "node-opendds CI" | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '10 0 * * 0' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# The jobs with latest-release configuration are disabled until OpenDDS 3.28 | |
# which will have the updated ValueReader and ValueWriter interfaces. | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
node_version: | |
- 14 | |
- 16 | |
- 18 | |
opendds_branch: | |
- master | |
#- latest-release | |
m: | |
- {os: ubuntu-20.04, dds_security: 1} | |
- {os: ubuntu-20.04, dds_security: 0} | |
- {os: macos-11, dds_security: 1} | |
- {os: macos-11, dds_security: 0} | |
- {os: windows-2019, dds_security: 1} | |
- {os: windows-2019, dds_security: 0} | |
#include: | |
#- node_version: 8 | |
# opendds_branch: latest-release | |
# m: {os: ubuntu-20.04, security: 0} | |
#- node_version: 8 | |
# opendds_branch: latest-release | |
# m: {os: windows-2019, security: 0} | |
#- node_version: 10 | |
# opendds_branch: latest-release | |
# m: {os: ubuntu-20.04, security: 1} | |
#- node_version: 10 | |
# opendds_branch: latest-release | |
# m: {os: windows-2019, security: 1} | |
#- node_version: 12 | |
# opendds_branch: latest-release | |
# m: {os: ubuntu-20.04, security: 1} | |
#- node_version: 12 | |
# opendds_branch: latest-release | |
# m: {os: windows-2019, security: 1} | |
runs-on: ${{ matrix.m.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 'Checkout MPC' | |
uses: actions/checkout@v3 | |
with: | |
repository: DOCGroup/MPC | |
path: MPC | |
fetch-depth: 1 | |
- name: 'Checkout ACE_TAO' | |
uses: actions/checkout@v3 | |
with: | |
repository: DOCGroup/ACE_TAO | |
ref: ace6tao2 | |
path: ACE_TAO | |
fetch-depth: 1 | |
- name: 'Checkout OpenDDS' | |
uses: actions/checkout@v3 | |
with: | |
repository: objectcomputing/OpenDDS | |
ref: ${{ matrix.opendds_branch }} | |
path: OpenDDS | |
fetch-depth: 1 | |
- name: 'Set Up node' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: 'Install ssl and xerces (ubuntu)' | |
if: ${{ matrix.m.dds_security == 1 && matrix.m.os == 'ubuntu-20.04' }} | |
run: |- | |
sudo apt-get update | |
sudo apt-get -y install libssl-dev libxerces-c-dev | |
- name: 'Install xerces (macos)' | |
if: ${{ matrix.m.dds_security == 1 && matrix.m.os == 'macos-11' }} | |
run: | | |
brew install xerces-c | |
- name: 'Install openssl and xerces (windows)' | |
if: ${{ matrix.m.dds_security == 1 && matrix.m.os == 'windows-2019' }} | |
uses: lukka/run-vcpkg@v7 | |
with: | |
vcpkgGitCommitId: b86c0c35b88e2bf3557ff49dc831689c2f085090 | |
vcpkgArguments: --recurse openssl xerces-c | |
vcpkgTriplet: x64-windows | |
- name: 'Set Up MSVC Environment' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: 'Set Up Problem Matcher (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
uses: ammaraskar/msvc-problem-matcher@0.2.0 | |
- name: 'Set Up Problem Matcher (ubuntu / macos)' | |
if: ${{ matrix.m.os == 'ubuntu-20.04' || matrix.m.os == 'macos-11' }} | |
uses: ammaraskar/gcc-problem-matcher@0.2.0 | |
- name: 'Set environment variables (ubuntu / macos)' | |
if: ${{ matrix.m.os == 'ubuntu-20.04' || matrix.m.os == 'macos-11' }} | |
shell: bash | |
run: |- | |
echo "ACE_ROOT=$GITHUB_WORKSPACE/ACE_TAO/ACE" >> $GITHUB_ENV | |
echo "TAO_ROOT=$GITHUB_WORKSPACE/ACE_TAO/TAO" >> $GITHUB_ENV | |
echo "DDS_ROOT=$GITHUB_WORKSPACE/OpenDDS" >> $GITHUB_ENV | |
echo "MPC_ROOT=$GITHUB_WORKSPACE/MPC" >> $GITHUB_ENV | |
echo "npm_config_devdir=$GITHUB_WORKSPACE/opendds-node-gyp-devdir" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/ACE_TAO/ACE/lib:$GITHUB_WORKSPACE/OpenDDS/lib" >> $GITHUB_ENV | |
if [ ${{ matrix.node_version }} >= 16 ]; then | |
CONFIG_OPTIONS+=" --std=c++14"; | |
else | |
CONFIG_OPTIONS+=" --std=c++11"; | |
fi | |
if [ ${{ matrix.m.dds_security }} == 1 ]; then | |
CONFIG_OPTIONS+=" --security"; | |
BUILD_TARGETS+=" OpenDDS_Security"; | |
if [ '${{ matrix.m.os }}' == 'macos-11' ]; then | |
CONFIG_OPTIONS+=" --xerces3=$(brew --prefix xerces-c) --openssl=/usr/local/opt/openssl@1.1" | |
fi | |
fi | |
echo "CONFIG_OPTIONS=$CONFIG_OPTIONS" >> $GITHUB_ENV | |
echo "BUILD_TARGETS=DCPSInfoRepo_Main OpenDDS_Rtps_Udp$BUILD_TARGETS" >> $GITHUB_ENV | |
- name: 'Set environment variables (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
shell: bash | |
run: |- | |
echo "ACE_ROOT=$GITHUB_WORKSPACE\\ACE_TAO\\ACE" >> $GITHUB_ENV | |
echo "TAO_ROOT=$GITHUB_WORKSPACE\\ACE_TAO\\TAO" >> $GITHUB_ENV | |
echo "DDS_ROOT=$GITHUB_WORKSPACE\\OpenDDS" >> $GITHUB_ENV | |
echo "MPC_ROOT=$GITHUB_WORKSPACE\\MPC" >> $GITHUB_ENV | |
echo "npm_config_devdir=$GITHUB_WORKSPACE\\opendds-node-gyp-devdir" >> $GITHUB_ENV | |
if [ ${{ matrix.m.dds_security }} == 1 ]; then | |
CONFIG_OPTIONS+=" --security"; | |
BUILD_TARGETS+=";OpenDDS_Security"; | |
if [ '${{ matrix.m.os }}' == 'windows-2019' ]; then | |
CONFIG_OPTIONS+=" --xerces3=$VCPKG_ROOT\\installed\\x64-windows --openssl=$VCPKG_ROOT\\installed\\x64-windows" | |
fi | |
fi | |
echo "CONFIG_OPTIONS=$CONFIG_OPTIONS" >> $GITHUB_ENV | |
echo "BUILD_TARGETS=DCPSInfoRepo_Main;OpenDDS_Rtps_Udp$BUILD_TARGETS" >> $GITHUB_ENV | |
echo "ACE_TEST_LOG_STUCK_STACKS=1" >> $GITHUB_ENV | |
- name: 'Configure & Build OpenDDS (ubuntu / macos)' | |
if: ${{ matrix.m.os == 'ubuntu-20.04' || matrix.m.os == 'macos-11' }} | |
shell: bash | |
run: |- | |
echo "dds_security=${{ matrix.m.dds_security }}; CONFIG_OPTIONS=${{ env.CONFIG_OPTIONS }}; BUILD_TARGETS=${{ env.BUILD_TARGETS }}" | |
cd OpenDDS | |
./configure --no-tests ${{ env.CONFIG_OPTIONS }} | |
. setenv.sh | |
make -j4 ${{ env.BUILD_TARGETS }} | |
- name: 'Configure OpenDDS (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
shell: cmd | |
run: |- | |
echo "dds_security=${{ matrix.m.dds_security }}; CONFIG_OPTIONS=${{ env.CONFIG_OPTIONS }}; BUILD_TARGETS=${{ env.BUILD_TARGETS }}" | |
cd OpenDDS | |
configure --no-tests ${{ env.CONFIG_OPTIONS }} | |
- name: 'Build OpenDDS (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
shell: cmd | |
run: |- | |
cd OpenDDS | |
call setenv.cmd | |
msbuild -p:Configuration=Debug,Platform=x64 -t:${{ env.BUILD_TARGETS }} -m DDS_TAOv2.sln | |
- name: 'Install (ubuntu / macos)' | |
if: ${{ matrix.m.os == 'ubuntu-20.04' || matrix.m.os == 'macos-11' }} | |
shell: bash | |
run: |- | |
npm install | |
${{ env.ACE_ROOT }}/bin/mwc.pl -type gnuace -exclude ACE_TAO,OpenDDS | |
make -j4 || make | |
- name: Install gdb | |
if: ${{ matrix.m.os == 'ubuntu-20.04' }} | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install gdb | |
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope | |
- name: 'Change Core File Pattern (ubuntu)' | |
if: ${{ matrix.m.os == 'ubuntu-20.04' }} | |
shell: bash | |
run: | | |
sudo sysctl -w kernel.core_pattern=core.%e.%p | |
echo Core file pattern set to: | |
cat /proc/sys/kernel/core_pattern | |
- name: 'Change Cores Directory Permissions (macos)' | |
if: ${{ matrix.m.os == 'macos-11' }} | |
shell: bash | |
run: | | |
sudo chmod o+w /cores | |
- name: 'Test (ubuntu / macos)' | |
if: ${{ matrix.m.os == 'ubuntu-20.04' || matrix.m.os == 'macos-11' }} | |
shell: bash | |
run: |- | |
ulimit -c unlimited | |
cd test | |
./run_test.pl cpp2node | |
./run_test.pl node2cpp | |
./run_test.pl node2node | |
./run_test.pl cpp2node --rtps | |
./run_test.pl node2cpp --rtps | |
./run_test.pl node2node --rtps | |
- name: 'Test Secure (ubuntu / macos)' | |
if: ${{ (matrix.m.os == 'ubuntu-20.04' || matrix.m.os == 'macos-11') && matrix.m.dds_security == 1 }} | |
shell: bash | |
run: |- | |
ulimit -c unlimited | |
cd test | |
./run_test.pl cpp2node --rtps --secure | |
./run_test.pl node2cpp --rtps --secure | |
./run_test.pl node2node --rtps --secure | |
- name: 'Install (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
shell: cmd | |
run: |- | |
cd OpenDDS | |
call setenv.cmd | |
cd .. | |
call npm.cmd config set msvs_version 2019 | |
call npm.cmd install --debug --lib_suffix=d | |
- name: 'Build (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
shell: cmd | |
run: |- | |
cd OpenDDS | |
call setenv.cmd | |
cd .. | |
set PATH=%PATH%;%GITHUB_WORKSPACE%\ACE_TAO\ACE\lib;%GITHUB_WORKSPACE%\OpenDDS\lib" | |
set PATH | |
perl ${{ env.ACE_ROOT }}\bin\mwc.pl -type vs2019 -exclude ACE_TAO,OpenDDS | |
msbuild -p:Configuration=Debug,Platform=x64 -m node_opendds.sln | |
- name: 'Test (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' }} | |
shell: cmd | |
run: |- | |
cd OpenDDS | |
call setenv.cmd | |
cd .. | |
set PATH=%PATH%;%GITHUB_WORKSPACE%\ACE_TAO\ACE\lib;%GITHUB_WORKSPACE%\OpenDDS\lib" | |
set PATH | |
cd test | |
perl run_test.pl cpp2node | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
perl run_test.pl node2cpp | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
perl run_test.pl node2node | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
perl run_test.pl cpp2node --rtps | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
perl run_test.pl node2cpp --rtps | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
perl run_test.pl node2node --rtps | |
- name: 'Test Secure (windows)' | |
if: ${{ matrix.m.os == 'windows-2019' && matrix.m.dds_security == 1 }} | |
shell: cmd | |
run: |- | |
cd OpenDDS | |
call setenv.cmd | |
cd .. | |
set PATH=%PATH%;%GITHUB_WORKSPACE%\ACE_TAO\ACE\lib;%GITHUB_WORKSPACE%\OpenDDS\lib" | |
set PATH | |
cd test | |
perl run_test.pl cpp2node --rtps --secure | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
perl run_test.pl node2cpp --rtps --secure | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
perl run_test.pl node2node --rtps --secure |