From bfe44ebe1a7df456d5cf8c8cf30d53470d19f6ce Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Thu, 25 Jan 2024 15:01:44 +0300 Subject: [PATCH] Test simulator run in CI --- .github/workflows/build.yml | 5 ++++- Makefile | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5df69c3..780b0ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,8 @@ jobs: run: sudo apt-get install libsdl2-dev - name: Build simulator run: make build_simulator + - name: Run simulator + run: timeout --preserve-status 30 make simulator GAZEBO=gzserver || [ $? -eq 143 ] - uses: actions/upload-artifact@v3 with: name: gazebo-plugin-binary @@ -53,7 +55,6 @@ jobs: retention-days: 1 build_simulator_macos: - if: false # temporarily disable runs-on: macos-latest steps: - uses: actions/checkout@v3 @@ -70,3 +71,5 @@ jobs: run: brew install sdl2 - name: Build simulator run: make build_simulator + - name: Run simulator + run: timeout --preserve-status 30 make simulator GAZEBO=gzserver || [ $? -eq 143 ] diff --git a/Makefile b/Makefile index c6e2584..4fedba5 100644 --- a/Makefile +++ b/Makefile @@ -27,10 +27,11 @@ gazebo/build cmake: gazebo/CMakeLists.txt build_simulator: gazebo/build make -C gazebo/build +GAZEBO ?= gazebo simulator: build_simulator GAZEBO_MODEL_PATH=$$GAZEBO_MODEL_PATH:${CURDIR}/gazebo/models \ GAZEBO_PLUGIN_PATH=$$GAZEBO_PLUGIN_PATH:${CURDIR}/gazebo/build \ - gazebo --verbose ${CURDIR}/gazebo/flix.world + $(GAZEBO) --verbose ${CURDIR}/gazebo/flix.world log: PORT=$(PORT) tools/grab_log.py