More whitespace (re-)alignment #29
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: basictest | |
on: push | |
jobs: | |
build: | |
strategy: | |
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-latest, CC: gcc, CXX: g++, python: '3.10' } | |
- { os: ubuntu-latest, CC: clang, CXX: clang++, python: '3.11' } | |
- { os: ubuntu-latest, CC: gcc-12, CXX: g++-12, python: '3.11' } | |
- { os: macos-11, CC: clang, CXX: clang++, python: "3.10" } | |
- { os: macos-12, CC: clang, CXX: clang++, python: "3.11" } | |
- { os: macos-13, CC: clang, CXX: clang++, python: "3.11" } | |
name: ${{ matrix.os }}.${{ matrix.CC }}.python-${{ matrix.python }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CC: ${{ matrix.CC }} | |
CXX: ${{ matrix.CXX }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: src | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Setup Bison | |
run: | | |
if [ "x$(uname)" == "xDarwin" ]; then brew install bison flex; fi | |
- name: Check versions | |
run: | | |
which python3 | |
python3 --version | |
which cmake | |
cmake --version | |
#NB: bison and flex in path are actually too old, we will install the | |
# keg-only recipes for them later: | |
#bison --version | |
#flex --version | |
- name: Configure build and install mcstas | |
run: | | |
if [ "x$(uname)" == "xDarwin" ]; then export SDKROOT=$(xcrun --sdk macosx --show-sdk-path); fi | |
set -e | |
set -u | |
set -x | |
mkdir build_mcstas | |
cd build_mcstas | |
export EXTRA_ARGS_FOR_CMAKE="" | |
if [ "x$(uname)" == "xDarwin" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=/usr/local/opt/bison/bin/bison -DFLEX_EXECUTABLE=/usr/local/opt/flex/bin/flex"; fi | |
cmake \ | |
-DCMAKE_INSTALL_PREFIX=../install_mcstas \ | |
-S ../src \ | |
-G "Unix Makefiles" \ | |
-DMCVERSION="3.99.99" \ | |
-DMCCODE_BUILD_CONDA_PKG=ON \ | |
-DBUILD_SHARED_LIBS=ON \ | |
-DCMAKE_INSTALL_LIBDIR=lib \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBUILD_MCSTAS=ON \ | |
-DMCCODE_USE_LEGACY_DESTINATIONS=OFF \ | |
-DBUILD_TOOLS=ON \ | |
-DENABLE_COMPONENTS=ON \ | |
-DENSURE_MCPL=OFF \ | |
-DENSURE_NCRYSTAL=OFF \ | |
-DENABLE_CIF2HKL=OFF \ | |
-DENABLE_NEUTRONICS=OFF \ | |
${EXTRA_ARGS_FOR_CMAKE} | |
cmake --build . --config Release | |
cmake --build . --target install --config Release | |
test -f "../install_mcstas/bin/mcstas" | |
test -f "../install_mcstas/bin/mcrun" | |
test -f "../install_mcstas/share/mcstas/tools/Python/mccodelib/__init__.py" | |
test -d "../install_mcstas/share/mcstas/resources/data" | |
- name: Pip install PyYAML | |
run: | | |
set -e | |
set -u | |
set -x | |
python3 -mpip install PyYAML | |
- name: Launch test instrument | |
run: | | |
set -e | |
set -u | |
set -x | |
test -f ./install_mcstas/bin/mcstas | |
./install_mcstas/bin/mcstas --version | |
mkdir run_BNL_H8 && cd run_BNL_H8 | |
cp ../install_mcstas/share/mcstas/resources/examples/BNL_H8.instr . | |
#Not a final solution!!!: | |
if [ "x$(uname)" == "xDarwin" ]; then export MCSTAS_CC_OVERRIDE=/usr/bin/clang; fi | |
../install_mcstas/bin/mcrun BNL_H8.instr lambda=2.36 |