diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6e4c56f..64372164 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,17 @@ jobs: source .bashrc cmake --workflow --preset dev --fresh + # Test that all models build properly in a Trick environment (i.e not using + # the CMake build process or Trickification). Purge the sim build afterward + # to save on runner memory usage. + - name: Check Trick compatibility + run: | + export PATH=${TRICK_HOME}/bin:${PATH} + source .bashrc + cd utility/sims/SIM_test_trick_compatibility + trick-CP + make spotless + - name: Build verification sims id: build_verif_sims if: ${{ env.RUN_VERIF_SIMS == 'true' }} diff --git a/utility/sims/SIM_test_trick_compatibility/README.md b/utility/sims/SIM_test_trick_compatibility/README.md new file mode 100644 index 00000000..341aded6 --- /dev/null +++ b/utility/sims/SIM_test_trick_compatibility/README.md @@ -0,0 +1,4 @@ +This simulation tests that all CML models will build in a Trick environment. +We're checking to see that: +- SWIG and ICG don't choke. +- Library dependencies are set up properly. diff --git a/utility/sims/SIM_test_trick_compatibility/S_define b/utility/sims/SIM_test_trick_compatibility/S_define new file mode 100644 index 00000000..bdeda2f5 --- /dev/null +++ b/utility/sims/SIM_test_trick_compatibility/S_define @@ -0,0 +1,9 @@ +/* This simulation tests that all CML models will build in a Trick environment. + * We're checking to see that: + * - SWIG and ICG don't choke. + * - Library dependencies are set up properly. + */ + +#include "sim_objects/default_trick_sys.sm" + +##include "../../../trickified/S_source.hh" diff --git a/utility/sims/SIM_test_trick_compatibility/S_overrides.mk b/utility/sims/SIM_test_trick_compatibility/S_overrides.mk new file mode 100644 index 00000000..9071f6b5 --- /dev/null +++ b/utility/sims/SIM_test_trick_compatibility/S_overrides.mk @@ -0,0 +1,10 @@ +# We're intentionally using the public-facing CML makefile and not the internal unit +# sim makefile. This is so we can test building all of the CML models in a Trick +# environment. +CML_TRICK_BUILD=1 +include ${CML_HOME}/mkspecs/cml.mk + +# Still use internal JEOD makefile. +include ${CML_HOME}/mkspecs/internal/jeod.mk + +export TRICK_CXXFLAGS += -I${JEOD_HOME}/.. -I${JEOD_HOME}/models -std=c++17