-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix macOS/windows tests that failed to load library (#60)
* Add workflow for macos-latest * Set test env to help find plugins This fixes tests on macOS and windows that were failing to find and/or load a sensor component library. In windows CI and the macOS workflow (which runs `make test` before `make install`) tests were failing with the message "Unable to find sensor plugin path". This is fixed by setting the IGN_PLUGIN_PATH in cmake to the build folder containing the compiled plugins. In the macOS jenkins build (which runs `make test` after `make install`) tests were failing with the message "SDF sensor type does not match template type". It was difficult to track down, but it appears to be caused by a failure to properly dlopen all the shared libraries linked by the component plugins when a test finds an installed component library, rather than one from the build folder. It is fixed by setting DYLD_LIBRARY_PATH to include the location of the installed libraries. Fixes #4. * Remove redundant AddPluginPaths calls from tests They don't work on windows, so just depend on the environment variables set in cmake instead. Signed-off-by: Steve Peters <[email protected]>
- Loading branch information
Showing
13 changed files
with
67 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: macOS latest | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
env: | ||
PACKAGE: ignition-sensors4 | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Homebrew | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
- run: brew config | ||
|
||
# Needed for X11Requirement | ||
- run: brew cask install xquartz | ||
- name: Install base dependencies | ||
run: | | ||
brew tap osrf/simulation; | ||
brew install --only-dependencies ${PACKAGE}; | ||
- run: mkdir build | ||
- name: cmake | ||
working-directory: build | ||
run: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD | ||
- run: make | ||
working-directory: build | ||
- run: make test | ||
working-directory: build | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
- name: make install | ||
working-directory: build | ||
run: | | ||
make install; | ||
brew link ${PACKAGE}; |
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
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
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
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
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
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
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
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
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
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
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
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