Skip to content

Update to PETSIRD v0.2.0 and adapt Python documentation #14

Update to PETSIRD v0.2.0 and adapt Python documentation

Update to PETSIRD v0.2.0 and adapt Python documentation #14

Workflow file for this run

name: CI
on:
push:
branches: [main]
paths-ignore:
- '**/*.md'
pull_request:
branches: [main]
defaults:
run:
# See https://github.com/marketplace/actions/setup-miniconda#important
shell: bash -el {0}
jobs:
validate:
strategy:
matrix:
cppVersion: [17]
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {submodules: recursive}
- name: strip environment.yml
run: |
cat environment.yml | grep -v "#.*\<\local\>" > temp-ci-environment.yml
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: yardl
environment-file: temp-ci-environment.yml
- name: Install yardl
run: |
rm temp-ci-environment.yml
YARDL_DIR=${{github.workspace}}/yardl
mkdir ${YARDL_DIR}
YARDL_VERSION=0.6.2
wget --quiet "https://github.com/microsoft/yardl/releases/download/v${YARDL_VERSION}/yardl_${YARDL_VERSION}_linux_x86_64.tar.gz"
tar -xzf "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz" -C "${YARDL_DIR}"
rm "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz"
echo "${YARDL_DIR}" >> $GITHUB_PATH
- name: Build model
run: |
cd PETSIRD/model
yardl generate
- name: Python
run: |
cd python
pip install .
python start.py
- name: Cpp
run: |
cd cpp && mkdir -p build && cd build
cmake -G Ninja -S .. -DHDF5_ROOT="$CONDA_PREFIX"
ninja