diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8bd8ef2a6a..88d5777a71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) BUILD_TYPE: Release - DEFAULT_BRANCH: develop + DEFAULT_BRANCH: patch WX_VERSION: '3.2.8.1' ORTOOLS_VER: "9.14" ORTOOLS_RELEASE: "6206" @@ -196,7 +196,7 @@ jobs: - name: Evaluate test results vs Windows file run: | python $SAMNTDIR/test/compare_lk_test_output.py ${SAMNTDIR}/test_results_win64.csv ${SAMNTDIR}/build/test_results_linux64.csv true - + - name: Run SSC Variable & SAM Defaults Differ run: | python -m pip install --upgrade pip diff --git a/README.md b/README.md index 92075bec88..10a0178dc9 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,6 @@ The desktop version of SAM for Windows, Mac, or Linux builds from the following * [jsoncpp](https://github.com/open-source-parsers/jsoncpp) is a C++ library that allows manipulating JSON values, including serialization and deserialization to and from strings. -* [Python](https://www.python.org)/[Miniconda](https://docs.conda.io/) is for integration of Python scripts with the SAM user interface. - This repository, **SAM**, contains the code for SAM's user interface that assigns values to inputs of the SSC compute modules, runs the modules in the correct order, and displays simulation results. It also includes tools for editing LK scripts, viewing time series results, and generating shade data from a 3-dimensional representation of a photovoltaic array or solar hot water collector and nearby shading objects. The SAM repository also includes [two libraries](https://github.com/NatLabRockies/SAM/tree/develop/Sandia) from Sandia National Laboratories, [stepwise](https://dakota.sandia.gov/content/packages/stepwise), and [LHS](https://dakota.sandia.gov/content/packages/lhs), which are distributed as part of the Dakota platform, licensed under [LGPL](https://www.gnu.org/licenses/lgpl-3.0.en.html). diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index 15ea280f14..cdacf1fd99 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -110,7 +110,7 @@ else() find_library( SSC_LIB NAMES ssc.dylib ssc.lib ssc.so PATHS $ENV{SSC_LIB} $ENV{SSCDIR}/build/ssc $ENV{SSCDIR}/build/ssc/Release) - if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR MSVC) + if (CMAKE_BUILD_TYPE STREQUAL "Debug") unset(SSCD_LIB CACHE) find_library( SSCD_LIB NAMES sscd.dylib sscd.lib sscd.so @@ -118,7 +118,7 @@ else() target_link_libraries(SAM_api debug ${SSCD_LIB}) endif() - if(SAMAPI_EXPORT) # only on Unix + if(SAMAPI_EXPORT AND UNIX) # only on Unix unset(SSCE_LIB CACHE) find_library( SSCE_LIB NAMES libssc.so diff --git a/test/requirements.txt b/test/requirements.txt index c7339842bb..bfec01749b 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -1,2 +1,2 @@ -NREL-PySAM==3.0.0 +NLR-PySAM==8.0.0 requests diff --git a/test/run_defaults_diff.py b/test/run_defaults_diff.py index ff9e2da394..21ff199217 100644 --- a/test/run_defaults_diff.py +++ b/test/run_defaults_diff.py @@ -69,6 +69,23 @@ old_ssc = installations_dirs / "linux_64" / 'ssc.so' +# update runpath of old ssc.so (in release) - should be done in the future by the SAM build system, but for now we need to do it manually +# Set your target directory and new runpath +target_dir = Path(installations_dirs / "linux_64") +new_runpath = "$ORIGIN" # Or an absolute path like '/usr/local/lib' + +# Loop through all .so files recursively +for so_file in target_dir.glob("**/*.so"): + try: + # Run patchelf to set the rpath/runpath + subprocess.run( + ["patchelf", "--set-rpath", new_runpath, str(so_file)], check=True + ) + print(f"Successfully updated: {so_file.name}") + except subprocess.CalledProcessError as e: + print(f"Failed to update {so_file.name}: {e}") + + ssc_dir = Path(os.environ.get("SSCDIR")) new_ssc = Path(glob.glob(str(ssc_dir / "build" / "ssc" / "*ssc.so"))[0])