From 292314d19d601b3c1ec53b2d57fda9b2c5cfc626 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 27 Nov 2024 18:48:38 +0100 Subject: [PATCH 1/6] Try to include macos13 --- .github/workflows/mcstas-basictest.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml index 01a780168..c46ce72a6 100644 --- a/.github/workflows/mcstas-basictest.yml +++ b/.github/workflows/mcstas-basictest.yml @@ -22,6 +22,7 @@ jobs: - { 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.12" } - { os: macos-15, CC: clang, CXX: clang++, python: "3.13" } - { os: windows-latest, CC: gcc, CXX: g++, python: "3.12" } @@ -91,7 +92,9 @@ jobs: mkdir build_mcstas 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; if [ -d "/opt/homebrew/opt" ]; then export HOMEBRW="/opt/homebrew/opt"; fi; fi; + if [ "$RUNNER_OS" == "macOS" ]; then; if [ -d "/usr/local/opt" ]; then export HOMEBRW="/usr/local/opt"; fi; fi; + if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/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 \ From 47d5c013ede488cd04356f0c62c1a2e824dbc22c Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 27 Nov 2024 18:50:30 +0100 Subject: [PATCH 2/6] Fix semicolons --- .github/workflows/mcstas-basictest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml index c46ce72a6..1ebc12ccd 100644 --- a/.github/workflows/mcstas-basictest.yml +++ b/.github/workflows/mcstas-basictest.yml @@ -92,8 +92,8 @@ jobs: mkdir build_mcstas cd build_mcstas export EXTRA_ARGS_FOR_CMAKE="" - if [ "$RUNNER_OS" == "macOS" ]; then; if [ -d "/opt/homebrew/opt" ]; then export HOMEBRW="/opt/homebrew/opt"; fi; fi; - if [ "$RUNNER_OS" == "macOS" ]; then; if [ -d "/usr/local/opt" ]; then export HOMEBRW="/usr/local/opt"; fi; fi; + if [ "$RUNNER_OS" == "macOS" ]; then; if [ -d "/opt/homebrew/opt" ]; then; export HOMEBRW="/opt/homebrew/opt"; fi; fi; + if [ "$RUNNER_OS" == "macOS" ]; then; if [ -d "/usr/local/opt" ]; then; export HOMEBRW="/usr/local/opt"; fi; fi; if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex"; fi if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi cmake \ From 668ffb9cce09457731e7f8f8090b68cb628ec839 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 27 Nov 2024 18:54:50 +0100 Subject: [PATCH 3/6] Fix && in if statements --- .github/workflows/mcstas-basictest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml index 1ebc12ccd..d73fa463d 100644 --- a/.github/workflows/mcstas-basictest.yml +++ b/.github/workflows/mcstas-basictest.yml @@ -92,8 +92,8 @@ jobs: mkdir build_mcstas cd build_mcstas export EXTRA_ARGS_FOR_CMAKE="" - if [ "$RUNNER_OS" == "macOS" ]; then; if [ -d "/opt/homebrew/opt" ]; then; export HOMEBRW="/opt/homebrew/opt"; fi; fi; - if [ "$RUNNER_OS" == "macOS" ]; then; if [ -d "/usr/local/opt" ]; then; export HOMEBRW="/usr/local/opt"; fi; fi; + if [ "$RUNNER_OS" == "macOS" ] && [ -d "/opt/homebrew/opt" ]; then; export HOMEBRW="/opt/homebrew/opt"; fi + if [ "$RUNNER_OS" == "macOS" ] && [ -d "/usr/local/opt" ]; then; export HOMEBRW="/usr/local/opt"; fi if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex"; fi if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi cmake \ From 59830c42c3b11b9c68671d0ffc454a1e45544287 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 27 Nov 2024 19:00:15 +0100 Subject: [PATCH 4/6] Fix semicolons --- .github/workflows/mcstas-basictest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml index d73fa463d..f78dcb4c3 100644 --- a/.github/workflows/mcstas-basictest.yml +++ b/.github/workflows/mcstas-basictest.yml @@ -92,8 +92,8 @@ jobs: mkdir build_mcstas cd build_mcstas export EXTRA_ARGS_FOR_CMAKE="" - if [ "$RUNNER_OS" == "macOS" ] && [ -d "/opt/homebrew/opt" ]; then; export HOMEBRW="/opt/homebrew/opt"; fi - if [ "$RUNNER_OS" == "macOS" ] && [ -d "/usr/local/opt" ]; then; export HOMEBRW="/usr/local/opt"; fi + if [ "$RUNNER_OS" == "macOS" ] && [ -d "/opt/homebrew/opt" ]; then export HOMEBRW="/opt/homebrew/opt"; fi + if [ "$RUNNER_OS" == "macOS" ] && [ -d "/usr/local/opt" ]; then export HOMEBRW="/usr/local/opt"; fi if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex"; fi if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi cmake \ From 01ea27c5b843a3f1edde3874b3b1dfde411f9e83 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 27 Nov 2024 19:05:17 +0100 Subject: [PATCH 5/6] Try with -f on the flex binary --- .github/workflows/mcstas-basictest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mcstas-basictest.yml b/.github/workflows/mcstas-basictest.yml index f78dcb4c3..4573b13b6 100644 --- a/.github/workflows/mcstas-basictest.yml +++ b/.github/workflows/mcstas-basictest.yml @@ -92,8 +92,8 @@ jobs: mkdir build_mcstas cd build_mcstas export EXTRA_ARGS_FOR_CMAKE="" - if [ "$RUNNER_OS" == "macOS" ] && [ -d "/opt/homebrew/opt" ]; then export HOMEBRW="/opt/homebrew/opt"; fi - if [ "$RUNNER_OS" == "macOS" ] && [ -d "/usr/local/opt" ]; then export HOMEBRW="/usr/local/opt"; fi + if [ "$RUNNER_OS" == "macOS" ] && [ -f "/opt/homebrew/opt/flex/bin/flex" ]; then export HOMEBRW="/opt/homebrew/opt"; fi + if [ "$RUNNER_OS" == "macOS" ] && [ -f "/usr/local/opt/flex/bin/flex" ]; then export HOMEBRW="/usr/local/opt"; fi if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex"; fi if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi cmake \ From 6773ab145f5d24a6f6fbe27287a9a2d15e0f0b1e Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 27 Nov 2024 19:07:05 +0100 Subject: [PATCH 6/6] Sync McStas <-> McXtrace --- .github/workflows/mcxtrace-basictest.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/mcxtrace-basictest.yml b/.github/workflows/mcxtrace-basictest.yml index 5bb002f13..f3f03250f 100644 --- a/.github/workflows/mcxtrace-basictest.yml +++ b/.github/workflows/mcxtrace-basictest.yml @@ -22,6 +22,7 @@ jobs: - { 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.12" } - { os: macos-15, CC: clang, CXX: clang++, python: "3.13" } - { os: windows-latest, CC: gcc, CXX: g++, python: "3.12" } @@ -91,9 +92,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=/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" == "macOS" ] && [ -f "/opt/homebrew/opt/flex/bin/flex" ]; then export HOMEBRW="/opt/homebrew/opt"; fi + if [ "$RUNNER_OS" == "macOS" ] && [ -f "/usr/local/opt/flex/bin/flex" ]; then export HOMEBRW="/usr/local/opt"; fi + if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/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 \