Skip to content

Prepare pypi.yml for ncrystal-verify pkgs #242

Prepare pypi.yml for ncrystal-verify pkgs

Prepare pypi.yml for ncrystal-verify pkgs #242

Workflow file for this run

name: plugins
on:
push:
pull_request:
schedule:
- cron: '30 18 * * 1' # 18:30 every Monday
jobs:
build:
strategy:
matrix:
include:
- { os: ubuntu-latest, CC: gcc, CXX: g++ }
- { os: macos-latest, CC: clang, CXX: clang++ }
name: ${{ matrix.os }}.${{ matrix.CC }}
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: src
- name: Enable parallel cmake
run: python ./src/devel/bin/ncdevtool nprocs --enable-github-parallel
- name: CMake cfg NCrystal
run: >
cmake -S ./src -B ./build -DCMAKE_INSTALL_PREFIX=./install
-DCMAKE_BUILD_TYPE=Release
-DNCRYSTAL_ENABLE_EXAMPLES=ON
-DNCRYSTAL_BUILD_STRICT=ON
- name: Build NCrystal
run: cmake --build ./build --config Release
- name: Install NCrystal
run: cmake --install ./build
- name: Run NCrystal examples
run: |
./install/bin/ncrystal-config -s
./install/bin/ncrystal_example_customphysics
./install/bin/ncrystal_example_cpp
./install/bin/ncrystal_example_c
- name: CMake cfg plugin
run: >
cmake -S ./src/examples/plugin -B ./build_plugin -DCMAKE_INSTALL_PREFIX=./install_plugin
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_BUILD_TYPE=Release
"-DNCrystal_DIR=$(./install/bin/ncrystal-config --show cmakedir)"
- name: Build plugin
run: cmake --build ./build_plugin --config Release
- name: Install plugin
run: cmake --install ./build_plugin
- name: Test plugin load
run: |
set -eux
ls -l ./install_plugin/lib
export NCRYSTAL_PLUGIN_LIST="$(cd ./install_plugin/lib; echo `pwd`/*NCPlugin_DummyPlugin*)"
export NCRYSTAL_PLUGIN_DATADIRS="DummyPlugin@$PWD/install_plugin/data"
export NCRYSTAL_REQUIRED_PLUGINS="DummyPlugin"
export NCRYSTAL_PLUGIN_RUNTESTS="1"
env | grep "NCRYSTAL"
#Now run anything which triggers plugin-loading, to have the plugin-availability
#test carried out:
./install/bin/ncrystal_example_c
echo "All ok"