2020 cmargs : >
2121 -D BUILD_SHARED_LIBS=ON
2222 -D LIBEFP_ENABLE_OPENMP=ON
23+ # uncomment the following two options to look for possible memory-related bugs in openmp
24+ # however, the tests will take ~10 times longer
25+ #-D CMAKE_C_FLAGS="-fsanitize=thread -g"
26+ #-D CMAKE_EXE_LINKER_FLAGS="-fsanitize=thread"
2327 pytest-marker-expr : " test" # i.e., all
2428
2529 - label : L-Gnu
3034 cmargs : >
3135 -D BUILD_SHARED_LIBS=ON
3236 -D LIBEFP_ENABLE_OPENMP=ON
37+ # uncomment the following two options to look for possible memory-related bugs in openmp
38+ # however, the tests will take ~10 times longer
39+ # this workflow was crashing with these options in pytests due to conflict of TSan and libgomp
40+ #-D CMAKE_C_FLAGS="-fsanitize=thread -g"
41+ #-D CMAKE_EXE_LINKER_FLAGS="-fsanitize=thread"
3342 pytest-marker-expr : " test"
3443
3544 - label : L-Intel
@@ -48,18 +57,20 @@ jobs:
4857
4958 - label : M-Clang
5059 # NaNs in tests on macos-latest (macos-12)
51- runs-on : macos-13
60+ # runs-on: macos-13
61+ runs-on : macos-latest
5262 python-version : " 3.10"
5363 blas : OBL
5464 build_type : Release
5565 cmargs : >
5666 -D BUILD_SHARED_LIBS=ON
5767 -D LIBEFP_ENABLE_OPENMP=ON
58- pytest-marker-expr : " test"
68+ pytest-marker-expr: "test"
5969
6070 - label : M-Clang
6171 # NaNs in tests on macos-latest (macos-12)
62- runs-on : macos-13
72+ # runs-on: macos-13
73+ runs-on : macos-15-intel
6374 python-version : " 3.10"
6475 blas : ACC
6576 build_type : Release
@@ -124,11 +135,20 @@ jobs:
124135 :
125136 sed -E -i.bak "s;#${{ matrix.cfg.blas }};;g" export.yaml
126137 fi
138+ # if [[ "${{ runner.os }}" == "Windows" ]]; then
139+ # :
140+ # sed -i "s;fortran-compiler;m2w64-gcc-fortran;g" export.yaml
141+ # sed -i "s;#${{ matrix.cfg.blas }};;g" export.yaml
142+ # sed -i "s;openmp;pthreads;g" export.yaml # W openblas is pthreads
143+ # sed -i "s;#- libpython;- libpython;g" export.yaml
144+ # fi
127145 if [[ "${{ runner.os }}" == "Windows" ]]; then
128- :
129- sed -i "s;fortran-compiler;m2w64-gcc-fortran;g" export.yaml
146+ # Use the modern conda-forge compilers instead of the old m2w64 ones
147+ sed -i "s;c-compiler;gcc;g" export.yaml
148+ sed -i "s;cxx-compiler;gxx;g" export.yaml
149+ sed -i "s;fortran-compiler;gfortran;g" export.yaml
130150 sed -i "s;#${{ matrix.cfg.blas }};;g" export.yaml
131- sed -i "s;openmp;pthreads;g" export.yaml # W openblas is pthreads
151+ sed -i "s;openmp;pthreads;g" export.yaml
132152 sed -i "s;#- libpython;- libpython;g" export.yaml
133153 fi
134154 # model sed for L/W
@@ -182,6 +202,17 @@ jobs:
182202 - name : Test (CTest) - unit tests
183203 run : ctest --output-on-failure --test-dir "${{ github.workspace }}/build"
184204
205+ # - name: Test (CTest) with Valgrind
206+ # run: |
207+ # sudo apt-get update && sudo apt-get install -y valgrind
208+ # # Run valgrind directly on the ctest executable. The tests will take forever
209+ # valgrind --tool=memcheck \
210+ # --leak-check=full \
211+ # --track-origins=yes \
212+ # --trace-children=yes \
213+ # --error-exitcode=1 \
214+ # ctest --output-on-failure --test-dir "${{ github.workspace }}/build"
215+
185216 - name : Test (find_package) - consume installation
186217 run : |
187218 mkdir test_installed_library && cd test_installed_library
@@ -242,11 +273,19 @@ jobs:
242273 - name : Install Psi4 for QM/EFP testing
243274 if : ${{ matrix.cfg.blas == 'MKL' }}
244275 run : conda install psi4 -c conda-forge
245-
276+
246277 - name : Test (pytest) -- unit tests Python bindings
247278 run : |
248- PYTHONPATH="${{ github.workspace }}/installed/lib" \
249- pytest --cache-clear -v -rws --color=yes \
250- --durations=50 --durations-min=1 --strict-markers \
251- -k "${{ matrix.cfg.pytest-marker-expr }}" \
252- "${{ github.workspace }}/installed/"
279+ # Setup PYTHONPATH
280+ SEP=$(python -c "import os; print(os.pathsep)")
281+ LIB_PATH="${{ github.workspace }}/installed/lib"
282+ TEST_PATH="${{ github.workspace }}/installed/lib/pylibefp/tests"
283+ export PYTHONPATH="${LIB_PATH}${SEP}${TEST_PATH}"
284+ echo "PYTHONPATH is set to: $PYTHONPATH"
285+ # PYTHONPATH="${{ github.workspace }}/installed/lib:${{ github.workspace }}/installed/lib/pylibefp/tests" \
286+
287+ # Run Pytest
288+ pytest -s --cache-clear -v -rws --color=yes \
289+ --durations=50 --durations-min=1 --strict-markers \
290+ -k "${{ matrix.cfg.pytest-marker-expr }}" \
291+ "${{ github.workspace }}/installed/"
0 commit comments