CI: Update plugindb.yml to allow flexible deps in plugins #123
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: notebooks | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '30 21 * * 0' # 21:30 every Sunday | |
jobs: | |
ncdevtool_check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: src | |
- name: Pip install packages for ncdevtool | |
run: pip install -r ./src/devel/reqs/requirements_devel.txt | |
- name: ncdevtool checks | |
run: ./src/devel/bin/ncdevtool check -n "fix""me" | |
build: | |
needs: [ ncdevtool_check ] | |
strategy: | |
matrix: | |
include: | |
#Note: Python 3.13 works (Aug 2024) because of the | |
#"allow-prereleases: true" below. | |
- { os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.9' } | |
- { os: ubuntu-latest, CC: gcc, CXX: g++, python: '3.13' } | |
- { os: macos-latest, CC: clang, CXX: clang++, python: "3.12" } | |
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_ncrystal | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
allow-prereleases: true #Needed (Aug 2024) for Python 3.13. | |
- name: Enable parallel cmake | |
run: python ./src_ncrystal/devel/bin/ncdevtool nprocs --enable-github-parallel | |
- name: Pip install ncrystal-core | |
run: python3 -m pip install ./src_ncrystal/ncrystal_core | |
- name: Pip install ncrystal-python | |
run: python3 -m pip install ./src_ncrystal/ncrystal_python | |
- name: Pip install ncrystal metapkg | |
run: python3 -m pip install ./src_ncrystal/ncrystal_metapkg | |
- name: nctool --test | |
run: nctool --test | |
- name: Checkout ncrystal-notebooks | |
uses: actions/checkout@v4 | |
with: | |
repository: mctools/ncrystal-notebooks | |
path: src_notebooks | |
- name: Pip install jupyterlab ipympl | |
run: python3 -m pip install jupyterlab ipympl | |
- name: Pip install spglib patch for py3.13 | |
#Workaround for https://github.com/spglib/spglib/issues/553 | |
if: matrix.python == '3.13' | |
run: python -mpip install git+https://github.com/tkittel/spglib.git | |
- name: Pip install optional ncrystal dependencies | |
run: python3 -m pip install -r ./src_ncrystal/devel/reqs/requirements_all.txt | |
- name: Test notebooks | |
env: | |
#TODO: Remove after NCrystal 4 is out and notebooks are updated: | |
NCNOTEBOOKS_FORCE_SKIP_PLUGIN_NB: '1' | |
run: ./src_notebooks/.github/resources/run_notebooks.x | |