Skip to content

Commit

Permalink
[CI] Add sirius lib to PATH (#1725)
Browse files Browse the repository at this point in the history
**Description**

On windows, running antares requires to have sirius DLL in the search
path for libraries.
In particular, unit tests linked with sirius need that.

The current implemented solution is a somewhat dirty workaround:
for each executable linked (possibly transitively) with sirius, we have
a special CMake macro which needs to be used to copy sirius DLL to the
same directory as the executable.

This requires developers to modify the build just to solve an
installation issue, and this for **each** executable that are linked
with sirius.

**Solution**
Instead, the PR proposes to add sirius installation directory to the
PATH variable.
Executing unit tests will now rely on normal windows DLL search
mechanism, and the developer only has to use the standard
`target_link_libraries` in CMake files.

---------

Signed-off-by: Sylvain Leclerc <[email protected]>
Co-authored-by: Florian OMNES <[email protected]>
  • Loading branch information
flomnes committed Feb 6, 2024
1 parent cab6f22 commit fadcb2c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ runs:
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
unzip rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
echo "${GITHUB_WORKSPACE}/rte-antares-deps-Release/bin" >> $GITHUB_PATH
- name: Download & extract OR-Tools
shell: bash
Expand Down
2 changes: 0 additions & 2 deletions src/tests/end-to-end/binding_constraints/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ target_include_directories(tests-binding_constraints
add_test(NAME end-to-end-binding_constraints COMMAND tests-binding_constraints)
set_property(TEST end-to-end-binding_constraints PROPERTY LABELS end-to-end)
set_target_properties(tests-binding_constraints PROPERTIES FOLDER Unit-tests/end_to_end)

copy_dependency(sirius_solver tests-binding_constraints)
3 changes: 0 additions & 3 deletions src/tests/end-to-end/simple_study/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ add_test(NAME end-to-end-simple-study COMMAND tests-simple-study)
set_property(TEST end-to-end-simple-study PROPERTY LABELS end-to-end)
set_target_properties(tests-simple-study PROPERTIES FOLDER Unit-tests/end_to_end)


copy_dependency(sirius_solver tests-simple-study)

# Storing tests-simple-study under the folder Unit-tests in the IDE

#----------------------------------------------------------

0 comments on commit fadcb2c

Please sign in to comment.