From ee141ba56a910b66415d9d9bc966bb431e2e94a9 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 27 Nov 2024 16:51:22 +0100 Subject: [PATCH] Remove debugging-stuff, harmonize McStas<->McXtrace --- .github/workflows/mcstas-basictest.yml | 13 ++++------ .github/workflows/mcxtrace-basictest.yml | 30 +++++++++++++++--------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml index ed41411cd..fa4eb76d0 100644 --- a/.github/workflows/mcstas-basictest.yml +++ b/.github/workflows/mcstas-basictest.yml @@ -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 @@ -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 \ @@ -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 @@ -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 diff --git a/.github/workflows/mcxtrace-basictest.yml b/.github/workflows/mcxtrace-basictest.yml index 670bf8fd1..5bb002f13 100644 --- a/.github/workflows/mcxtrace-basictest.yml +++ b/.github/workflows/mcxtrace-basictest.yml @@ -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 }} @@ -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 @@ -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 \ @@ -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