-
Notifications
You must be signed in to change notification settings - Fork 19
76 lines (64 loc) · 2.18 KB
/
plugin.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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"