Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 37 additions & 5 deletions .github/workflows/mcstas-conda-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,27 @@ jobs:
run: |
./src/devel/bin/mccode-build-conda -m mcstas -s $PWD/src -b $PWD/build_mcstas

- name: Validate build output
id: build-validation
if: always()
run: |
set -e
set -u
set -x
if [ "$RUNNER_OS" == "Windows" ];
then
echo "Validating Windows build output..."
echo "CONDA_PREFIX: $CONDA_PREFIX"
echo "Checking for mcstas executable..."
test -f ${CONDA_PREFIX}/bin/mcstas || test -f ${CONDA_PREFIX}/bin/mcstas.bat || { echo "ERROR: mcstas not found"; exit 1; }
echo "Checking for mctest executable..."
test -f ${CONDA_PREFIX}/bin/mctest.bat || { echo "ERROR: mctest.bat not found"; ls -la ${CONDA_PREFIX}/bin/ | grep -i mctest || echo "No mctest found"; exit 1; }
else
echo "Validating Unix build output..."
test -f ${CONDA_PREFIX}/bin/mcstas || { echo "ERROR: mcstas not found"; exit 1; }
test -f ${CONDA_PREFIX}/bin/mctest || { echo "ERROR: mctest not found"; exit 1; }
fi

- name: Post install openmpi hacks macOS
id: post-install-openmpi-hacks-macOS
if: runner.os == 'macOS'
Expand Down Expand Up @@ -225,6 +246,17 @@ jobs:
export MCTEST_EXECUTABLE="mctest"
export PERMISSIVE=" "
export PATH=${PATH}:${PWD}/install_mcstas/bin/:${PWD}/install_mcstas/mcstas/3.99.99/bin/

if [ "$RUNNER_OS" == "Windows" ];
then
echo "Windows build - debugging environment:"
echo "PATH: $PATH"
echo "CONDA_PREFIX: $CONDA_PREFIX"
echo "Available mctest files:"
find ${CONDA_PREFIX}/bin/ -name "*mctest*" -type f || echo "No mctest found"
ls -la ${CONDA_PREFIX}/bin/ | grep -i mctest || echo "No mctest in bin directory"
fi

# Check if any instr files were modified during last commit
cd src
export CHANGEDCOMPS=`git diff --name-only HEAD HEAD~1| grep \.comp\$ | grep mcstas-comps | xargs -n1 basename | sed s/\.comp//g | xargs echo`
Expand All @@ -239,9 +271,9 @@ jobs:
if [ "$NUMMATCH" -gt "0" ];
then
if [ "$RUNNER_OS" != "Windows" ]; then
mctest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose
mctest --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose || { echo "mctest failed with exit code $?"; exit 1; }
else
mctest.bat --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose
mctest.bat --mpi=2 --testdir run_${comp} --comp=${comp} --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE --verbose || { echo "mctest.bat failed with exit code $?"; exit 1; }
fi
else
echo No matching tests found
Expand Down Expand Up @@ -272,10 +304,10 @@ jobs:
fi
mkdir run_mctest && cd run_mctest
if [ "$RUNNER_OS" != "Windows" ]; then
mctest --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE
mctest --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE || { echo "mctest failed with exit code $?"; exit 1; }
mcviewtest --nobrowse $PWD
else
mctest.bat --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE
mctest.bat --mpi=2 --testdir $PWD $SCOPE --suffix=CHANGES_${{ matrix.mpi }} $PERMISSIVE || { echo "mctest.bat failed with exit code $?"; exit 1; }
mcviewtest.bat --nobrowse $PWD
fi
fi
Expand Down Expand Up @@ -303,4 +335,4 @@ jobs:
uses: mxschmitt/action-tmate@v3
if: always() && (inputs.manual-debugging == true)
with:
limit-access-to-actor: true
limit-access-to-actor: true
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* %Example: lambda=1 directbeam=1 SPLITS=5 Detector: Sph_mon_I=4.77847e+09
* %Example: lambda=1 directbeam=1 SPLITS=10 Detector: Sph_mon_I=4.77847e+09
* %Example: lambda=1 directbeam=1 SPLITS=20 Detector: Sph_mon_I=4.77847e+09
* %Example: lambda=5 reflections="stdlib::ZnO_sg186_ZincOxide.ncmat;temp=300K" directbeam=1 SPLITS=20 Detector: Sph_mon_I=2.03816e+8
*
* %Parameters
* lambda: [Angs] Wavelength emitted from source, 1% wl-interval around.
Expand Down
Loading
Loading