diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..3875a9c3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/deploy.sh b/deploy.sh index 522cf5af..3c05b904 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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 diff --git a/gzbridge/binding.gyp b/gzbridge/binding.gyp index 53d0cad3..16067895 100644 --- a/gzbridge/binding.gyp +++ b/gzbridge/binding.gyp @@ -14,6 +14,7 @@ 'cflags': [ '