Skip to content

Commit

Permalink
Fix compilation against gazebo 11 (#194)
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Nov 11, 2020
1 parent 107c1bc commit da8f187
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 5 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Node.js CI

on: [push, pull_request]

jobs:
bionic-ci:

runs-on: ubuntu-18.04

strategy:
matrix:
node-version: [8.x, 10.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: sudo apt update
- run: sudo apt install -y libjansson-dev libboost-dev imagemagick libtinyxml-dev git cmake build-essential wget libgazebo9-dev
- run: sudo npm install -g grunt
# - run: sudo bash -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/chrome.list'
# - run: sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
# - run: sudo apt update
# - run: sudo apt install -y xvfb google-chrome-stable gnustep-base-runtime
# - run: sudo wget -q -O /usr/bin/xvfb-chrome https://gist.githubusercontent.com/chapulina/a80bd83d3494c96dc9eead843579c435/raw/7d304595d401c1265b533626d542ace7e6916002/xvfb-chrome
# - run: sudo ln -sf /usr/bin/xvfb-chrome /usr/bin/google-chrome
# - run: sudo chmod 755 /usr/bin/google-chrome
# - run: defaults write com.google.chrome HardwareAccelerationModeEnabled -integer 1
# - run: export DISPLAY=:0
- run: npm run deploy --verbose
# - run: npm test
# - run: npm run coverage
- run: npm run update
- run: npm run docs
env:
CI: true

focal-ci:

runs-on: ubuntu-20.04

strategy:
matrix:
node-version: [8.x, 10.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
- run: wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
- run: sudo apt update
- run: sudo apt install -y libjansson-dev libboost-dev imagemagick libtinyxml-dev git cmake build-essential wget libgazebo11-dev
- run: sudo npm install -g grunt
- run: npm run deploy --verbose
- run: npm run update
- run: npm run docs
env:
CI: true
3 changes: 1 addition & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ fi
make -j 8

cd ../gzbridge
$DIR/node_modules/.bin/node-gyp configure
$DIR/node_modules/.bin/node-gyp build -d
$DIR/node_modules/.bin/node-gyp rebuild -d

RETVAL=$?
if [ $RETVAL -ne 0 ]; then
Expand Down
1 change: 1 addition & 0 deletions gzbridge/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
'cflags': [
'<!@(pkg-config --cflags gazebo jansson protobuf)'
],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=c++17' ],
'ldflags': [
'<!@(pkg-config --libs-only-L --libs-only-other gazebo jansson protobuf)'
],
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "gzweb",
"version": "1.3.0",
"version": "1.4.0",
"description": "WebGL client for Gazebo",
"repository": {
"type": "mercurial",
"url": "https://bitbucket.org/osrf/gzweb"
"url": "https://github.com/osrf/gzweb"
},
"config": {
"port": ""
Expand All @@ -20,7 +20,7 @@
"dependencies": {
"fs": "0.0.1-security",
"http": "0.0.0",
"node-gyp": "",
"node-gyp": "6.1.0",
"path": "^0.12.7",
"websocket": "^1.0.25"
},
Expand Down

0 comments on commit da8f187

Please sign in to comment.