From 884e7c8e86ea6c7f17196b1ef54bf3b8b5146ee2 Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Tue, 21 Jul 2026 21:34:44 +0200 Subject: [PATCH 1/3] Fix for unbound labeldir var, temporarily test BNL only --- .github/workflows/mcstas-conda-testsuite.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mcstas-conda-testsuite.yml b/.github/workflows/mcstas-conda-testsuite.yml index 629e2cf7c..e4a394071 100644 --- a/.github/workflows/mcstas-conda-testsuite.yml +++ b/.github/workflows/mcstas-conda-testsuite.yml @@ -107,7 +107,7 @@ jobs: export TMPDIR=${HOME}/tmp fi # Run the test with 2 core mpi - ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=2 + ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=2 --instr=BNL_H8_simple - name: 'Tar output files' id: tar-package @@ -207,7 +207,7 @@ jobs: # predict, so identify it via the source artifact/tarball name # instead of hardcoding it. if [[ "$tgz" == *"ubuntu-latest"* ]]; then - REFLABEL=$(basename "$labeldir") + REFLABEL=$(basename "$tgz") fi rm -rf "$work" done From ed7a67946e2dc073f0906fd78da596ef89f3c65e Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Tue, 21 Jul 2026 21:52:57 +0200 Subject: [PATCH 2/3] Remodel from basictest solution --- .github/workflows/mcstas-conda-testsuite.yml | 36 +++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/mcstas-conda-testsuite.yml b/.github/workflows/mcstas-conda-testsuite.yml index e4a394071..5aa7e2a31 100644 --- a/.github/workflows/mcstas-conda-testsuite.yml +++ b/.github/workflows/mcstas-conda-testsuite.yml @@ -200,31 +200,33 @@ jobs: for tgz in downloaded_artifacts/*/*.tgz; do work=$(mktemp -d) tar xzf "$tgz" -C "$work" - mv "$work"/run_test-suite/* mcstas-nightly/ - - # Linux (ubuntu-latest) is the reference platform; the label - # name itself embeds a version string and timestamp we can't - # predict, so identify it via the source artifact/tarball name - # instead of hardcoding it. - if [[ "$tgz" == *"ubuntu-latest"* ]]; then - REFLABEL=$(basename "$tgz") - fi + artifact_name=$(basename "$(dirname "$tgz")") + + for labeldir in "$work"/run_test-suite/*/; do + if [[ "$artifact_name" == *"ubuntu-latest"* ]]; then + REFLABEL=$(basename "$labeldir") + fi + mv $labeldir mcstas-nightly/ + done + done rm -rf "$work" - done if [ -z "$REFLABEL" ]; then - echo "ERROR: could not identify the Linux/reference column (ubuntu-latest artifact missing?)" - exit 1 + echo "WARNING: could not identify the ubuntu-latest/conda reference column" + else + echo "REFLABEL=$REFLABEL" >> "$GITHUB_ENV" + echo "Reference column: $REFLABEL" fi - echo "REFLABEL=$REFLABEL" >> "$GITHUB_ENV" - echo "Reference column: $REFLABEL" - ls mcstas-nightly - - name: 'Run mcviewtest across all platform columns' id: viewtest run: | - cd "$PWD/mcstas-nightly" && mcviewtest --reflabel "$REFLABEL" --nobrowse + cd "$PWD/mcstas-nightly" + if [ -z "$REFLABEL" ]; then + mcviewtest --reflabel "$REFLABEL" --nobrowse + else + mcviewtest --reflabel --nobrowse + fi - name: 'Tar mcstas-nightly output (all platform folders + comparison table)' id: tar-package From 9da46adea5ee84334e84848edb77a1dd1574f37f Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Tue, 21 Jul 2026 22:05:58 +0200 Subject: [PATCH 3/3] Now works again. Use mpi=auto and sync McStas <-> McXtrace --- .github/workflows/mcstas-conda-testsuite.yml | 3 +- .../workflows/mcxtrace-conda-testsuite.yml | 36 +++++++++---------- 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/mcstas-conda-testsuite.yml b/.github/workflows/mcstas-conda-testsuite.yml index 5aa7e2a31..d27ac04dd 100644 --- a/.github/workflows/mcstas-conda-testsuite.yml +++ b/.github/workflows/mcstas-conda-testsuite.yml @@ -107,8 +107,7 @@ jobs: export TMPDIR=${HOME}/tmp fi # Run the test with 2 core mpi - ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=2 --instr=BNL_H8_simple - + ${MCTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=auto - name: 'Tar output files' id: tar-package if: always() diff --git a/.github/workflows/mcxtrace-conda-testsuite.yml b/.github/workflows/mcxtrace-conda-testsuite.yml index ff0247e77..bce716a2e 100644 --- a/.github/workflows/mcxtrace-conda-testsuite.yml +++ b/.github/workflows/mcxtrace-conda-testsuite.yml @@ -107,7 +107,7 @@ jobs: export TMPDIR=${HOME}/tmp fi # Run the test with 2 core mpi - ${MXTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=2 + ${MXTEST_EXECUTABLE} --verbose --testdir $PWD --suffix ${{ matrix.os }}_${{ matrix.mpi }} --mpi=auto - name: 'Tar output files' id: tar-package @@ -201,35 +201,33 @@ jobs: for tgz in downloaded_artifacts/*/*.tgz; do work=$(mktemp -d) tar xzf "$tgz" -C "$work" - labeldir=$(ls -d "$work"/run_test-suite/*/) - mv "$labeldir" mcxtrace-nightly/ - - # Linux (ubuntu-latest) is the reference platform; the label - # name itself embeds a version string and timestamp we can't - # predict, so identify it via the source artifact/tarball name - # instead of hardcoding it. - if [[ "$tgz" == *"ubuntu-latest"* ]]; then + artifact_name=$(basename "$(dirname "$tgz")") + + for labeldir in "$work"/run_test-suite/*/; do + if [[ "$artifact_name" == *"ubuntu-latest"* ]]; then REFLABEL=$(basename "$labeldir") fi + mv $labeldir mcxtrace-nightly/ + done + done rm -rf "$work" - done if [ -z "$REFLABEL" ]; then - echo "ERROR: could not identify the Linux/reference column (ubuntu-latest artifact missing?)" - exit 1 - fi - + echo "WARNING: could not identify the ubuntu-latest/conda reference column" + else echo "REFLABEL=$REFLABEL" >> "$GITHUB_ENV" echo "Reference column: $REFLABEL" - ls mcxtrace-nightly + fi - name: 'Run mxviewtest across all platform columns' id: viewtest run: | - set -e - set -u - set -x - cd "$PWD/mcxtrace-nightly" && mxviewtest --reflabel "$REFLABEL" --nobrowse + cd "$PWD/mcxtrace-nightly" + if [ -z "$REFLABEL" ]; then + mxviewtest --reflabel "$REFLABEL" --nobrowse + else + mxviewtest --reflabel --nobrowse + fi - name: 'Tar mcxtrace-nightly output (all platform folders + comparison table)' id: tar-package