Skip to content

Commit

Permalink
Remove debugging-stuff, harmonize McStas<->McXtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
willend committed Nov 27, 2024
1 parent 72c82b3 commit ee141ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/mcstas-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:
run: |
sudo apt -y install libopenmpi-dev
- name: Setup OpenMPI (macOS-12,13)
- name: Setup OpenMPI (macOS)
id: setup-openmpi-macos12
if: runner.os == 'macOS' && matrix.os != 'macos-11'
if: runner.os == 'macOS'
run: |
brew install openmpi
Expand All @@ -92,8 +92,6 @@ jobs:
cd build_mcstas
export EXTRA_ARGS_FOR_CMAKE=""
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex"; fi
if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi
cmake \
-DCMAKE_INSTALL_PREFIX=../install_mcstas \
Expand Down Expand Up @@ -144,10 +142,7 @@ jobs:
fi
if [ "$RUNNER_OS" == "macOS" ];
then
which python3
find . -name mcrun -exec grep -H python \{\} \;
python3 -mpip install PyYAML ply --break-system-packages
python3 -mpip install McStasscript ncrystal --break-system-packages
python3 -mpip install PyYAML ply McStasScript ncrystal --break-system-packages
fi
if [ "$RUNNER_OS" == "Linux" ];
then
Expand Down Expand Up @@ -246,7 +241,7 @@ jobs:
- name: Launch NCrystal test instrument (mpi)
id: ncrystal-test-mpi
if: runner.os == 'Linux'
if: runner.os == 'Linux' || runner.os == 'macOS' # Linux or macOS only
# Status: Works on Unixes ("ncrystal missing for Windows")
run: |
set -e
Expand Down
30 changes: 19 additions & 11 deletions .github/workflows/mcxtrace-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ jobs:
fail-fast: false
matrix:
include:
- { os: ubuntu-20.04, CC: gcc-10, CXX: g++-10, python: '3.8' }
- { os: ubuntu-22.04, CC: gcc, CXX: g++, python: '3.9' }
- { os: ubuntu-22.04, CC: gcc, CXX: g++, python: '3.10' }
- { os: ubuntu-24.04, CC: gcc-13, CXX: g++-13, python: '3.12' }
- { os: ubuntu-24.04, CC: clang, CXX: clang++, python: '3.12' }
- { os: ubuntu-22.04, CC: clang, CXX: clang++, python: '3.11' }
- { os: ubuntu-22.04, CC: gcc-12, CXX: g++-12, python: '3.11' }
- { os: macos-13, CC: clang, CXX: clang++, python: "3.11" }
# - { os: macos-14, CC: clang, CXX: clang++, python: "3.11" }
# - { os: macos-15, CC: clang, CXX: clang++, python: "3.11" }
- { os: windows-latest, CC: gcc, CXX: g++, python: "3.11" }
- { os: macos-14, CC: clang, CXX: clang++, python: "3.12" }
- { os: macos-15, CC: clang, CXX: clang++, python: "3.13" }
- { os: windows-latest, CC: gcc, CXX: g++, python: "3.12" }

name: ${{ matrix.os }}.${{ matrix.CC }}.python-${{ matrix.python }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -67,9 +65,9 @@ jobs:
run: |
sudo apt -y install libopenmpi-dev
- name: Setup OpenMPI (macOS-12,13)
- name: Setup OpenMPI (macOS)
id: setup-openmpi-macos12
if: runner.os == 'macOS' && matrix.os != 'macos-11'
if: runner.os == 'macOS'
run: |
brew install openmpi
Expand All @@ -93,7 +91,9 @@ jobs:
mkdir build_mcxtrace
cd build_mcxtrace
export EXTRA_ARGS_FOR_CMAKE=""
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison -DFLEX_EXECUTABLE=/usr/local/opt/flex/bin/flex"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/opt/homebrew/opt/bison/bin/bison -DFLEX_EXECUTABLE=/opt/homebrew/opt/flex/bin/flex"; fi
if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi
cmake \
-DCMAKE_INSTALL_PREFIX=../install_mcxtrace \
Expand Down Expand Up @@ -137,7 +137,15 @@ jobs:
set -e
set -u
set -x
python3 -mpip install PyYAML ply McStasscript
if [ "$RUNNER_OS" != "macOS" ];
then
python3 -mpip install PyYAML ply McStasscript
fi
if [ "$RUNNER_OS" == "macOS" ];
then
python3 -mpip install PyYAML ply McStasScript --break-system-packages
fi
- name: Launch JJ_SAXS instrument
id: JJ_SAXS-basic
Expand Down

0 comments on commit ee141ba

Please sign in to comment.