Skip to content

Commit

Permalink
CI and Portability Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
simpsont-oci committed Sep 22, 2022
1 parent e09ecc8 commit be9fb98
Showing 1 changed file with 25 additions and 36 deletions.
61 changes: 25 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
fail-fast: false
matrix:
node_version:
- 12
- 14
- 16
- 18
opendds_branch:
- master
- latest-release
Expand All @@ -33,6 +33,25 @@ jobs:
- {os: macos-latest, 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-latest, security: 0}
- node_version: 8
opendds_branch: latest-release
m: {os: windows-latest, security: 0}
- node_version: 10
opendds_branch: latest-release
m: {os: ubuntu-latest, security: 1}
- node_version: 10
opendds_branch: latest-release
m: {os: windows-latest, security: 1}
- node_version: 12
opendds_branch: latest-release
m: {os: ubuntu-latest, security: 1}
- node_version: 12
opendds_branch: latest-release
m: {os: windows-latest, security: 1}

runs-on: ${{ matrix.m.os }}
steps:
Expand All @@ -57,6 +76,10 @@ jobs:
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-latest' }}
run: |-
Expand All @@ -82,11 +105,6 @@ jobs:
- name: 'Set Up Problem Matcher (ubuntu / macos)'
if: ${{ matrix.m.os == 'ubuntu-latest' || matrix.m.os == 'macos-latest' }}
uses: ammaraskar/[email protected]
- name: 'Set Up node (windows)'
if: ${{ matrix.m.os == 'windows-2019' }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- name: 'Set environment variables (ubuntu / macos)'
if: ${{ matrix.m.os == 'ubuntu-latest' || matrix.m.os == 'macos-latest' }}
shell: bash
Expand All @@ -95,7 +113,6 @@ jobs:
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 "NVM_DIR=$GITHUB_WORKSPACE/nvm" >> $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
Expand All @@ -120,7 +137,6 @@ jobs:
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 "NVM_DIR=$GITHUB_WORKSPACE\\nvm" >> $GITHUB_ENV
echo "npm_config_devdir=$GITHUB_WORKSPACE\\opendds-node-gyp-devdir" >> $GITHUB_ENV
if [ ${{ matrix.m.dds_security }} == 1 ]; then
CONFIG_OPTIONS+=" --security";
Expand Down Expand Up @@ -154,38 +170,17 @@ jobs:
cd OpenDDS
call setenv.cmd
msbuild -p:Configuration=Debug,Platform=x64 -t:${{ env.BUILD_TARGETS }} -m DDS_TAOv2.sln
- name: 'Checkout nvm'
uses: actions/checkout@v3
with:
repository: nvm-sh/nvm.git
path: ${{ env.NVM_DIR }}
ref: v0.39.0
fetch-depth: 1
- name: 'Install node, Build (ubuntu / macos)'
- name: 'Install (ubuntu / macos)'
if: ${{ matrix.m.os == 'ubuntu-latest' || matrix.m.os == 'macos-latest' }}
shell: bash
run: |-
set -e
cd ${{ env.NVM_DIR }}
[ -s "./nvm.sh" ] && \. "./nvm.sh" # loads nvm
cd $GITHUB_WORKSPACE
nvm install ${{ matrix.node_version }}
nvm use ${{ matrix.node_version }}
echo "node:$(node -v) npm:$(npm -v)"
echo "Build ========== ========== =========="
npm install
${{ env.ACE_ROOT }}/bin/mwc.pl -type gnuace -exclude ACE_TAO,OpenDDS
make -j2 || make
- name: 'Test (ubuntu / macos)'
if: ${{ matrix.m.os == 'ubuntu-latest' || matrix.m.os == 'macos-latest' }}
shell: bash
run: |-
set -e
cd ${{ env.NVM_DIR }}
[ -s "./nvm.sh" ] && \. "./nvm.sh" # loads nvm
cd $GITHUB_WORKSPACE
nvm use ${{ matrix.node_version }}
echo "node:$(node -v) npm:$(npm -v)"
cd test
./run_test.pl cpp2node
./run_test.pl node2cpp
Expand All @@ -197,12 +192,6 @@ jobs:
if: ${{ (matrix.m.os == 'ubuntu-latest' || matrix.m.os == 'macos-latest') && matrix.m.dds_security == 1 }}
shell: bash
run: |-
set -e
cd ${{ env.NVM_DIR }}
[ -s "./nvm.sh" ] && \. "./nvm.sh" # loads nvm
cd $GITHUB_WORKSPACE
nvm use ${{ matrix.node_version }}
echo "node:$(node -v) npm:$(npm -v)"
cd test
./run_test.pl cpp2node --rtps --secure
./run_test.pl node2cpp --rtps --secure
Expand Down

0 comments on commit be9fb98

Please sign in to comment.