Skip to content

CI: Update plugindb.yml to allow flexible deps in plugins #285

CI: Update plugindb.yml to allow flexible deps in plugins

CI: Update plugindb.yml to allow flexible deps in plugins #285

name: systemwideinstall
#Test which does not use CMAKE_INSTALL_PREFIX
on:
push:
pull_request:
schedule:
- cron: '14 15 * * 0' # 14:15 every Sunday
jobs:
build:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
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: Configure
run: cmake -S ./src/ncrystal_core -B ./build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ./build
- name: Install
run: sudo cmake --install ./build
- name: which ncrystal-config
run: which ncrystal-config
- name: ncrystal-config summary
run: ncrystal-config -s
- name: Pip install ncrystal_python (Linux)
if: runner.os == 'Linux'
run: python3 -mpip install ./src/ncrystal_python
- name: Pip install ncrystal_python (macOS)
if: runner.os == 'macOS'
run: sudo python3 -mpip install --break-system-packages ./src/ncrystal_python
- name: Python test
run: python3 -mNCrystal nctool --test
- name: Downstream CMake
run: |
set -eu
mkdir bld_ds inst_ds
cmake -S ./src/examples/downstream_cmake -B ./bld_ds -DCMAKE_INSTALL_PREFIX=./inst_ds -DCMAKE_BUILD_TYPE=Debug
cmake --build ./bld_ds
cmake --install ./bld_ds
export LD_LIBRARY_PATH="$(ncrystal-config --show libdir):${LD_LIBRARY_PATH:-}"
export DYLD_LIBRARY_PATH="$(ncrystal-config --show libdir):${DYLD_LIBRARY_PATH:-}"
./inst_ds/bin/testapp
- name: Pip install ncrystal_verify (Linux)
if: runner.os == 'Linux'
run: python3 -mpip install "./src/ncrystal_verify[all]"
- name: Pip install spglib patch for py3.13 (macOS)
#Workaround for https://github.com/spglib/spglib/issues/553
if: runner.os == 'macOS'
run: sudo python3 -mpip install --break-system-packages git+https://github.com/tkittel/spglib.git
- name: Pip install ncrystal_verify (macOS)
if: runner.os == 'macOS'
run: sudo python3 -mpip install --break-system-packages "./src/ncrystal_verify[all]"
- name: Launch ncrystal-verify
run: ncrystal-verify