From 181996eb129498b406752c8509a35f3af3416786 Mon Sep 17 00:00:00 2001 From: Nino Tarantino Date: Tue, 22 Sep 2026 10:57:22 -0500 Subject: [PATCH 1/2] Create sim which builds all CML models --- utility/sims/SIM_test_trick_compatibility/README.md | 4 ++++ utility/sims/SIM_test_trick_compatibility/S_define | 9 +++++++++ .../sims/SIM_test_trick_compatibility/S_overrides.mk | 10 ++++++++++ 3 files changed, 23 insertions(+) create mode 100644 utility/sims/SIM_test_trick_compatibility/README.md create mode 100644 utility/sims/SIM_test_trick_compatibility/S_define create mode 100644 utility/sims/SIM_test_trick_compatibility/S_overrides.mk 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 From 0aa0b72cf0cc4b1cf9fe7ccad8ee4519e02c28f5 Mon Sep 17 00:00:00 2001 From: Nino Tarantino Date: Tue, 22 Sep 2026 11:05:19 -0500 Subject: [PATCH 2/2] Add job stage to test Trick compatibility --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) 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' }}