Skip to content

Cleanup v0.5.0 releasenote formatting #802

Cleanup v0.5.0 releasenote formatting

Cleanup v0.5.0 releasenote formatting #802

Workflow file for this run

# Preamble
name: Test SaltProc
on:
push:
paths:
- 'saltproc/**'
- 'tests/**'
pull_request:
workflow_run:
workflows: ["Cache dependencies"]
types: [completed]
# enable worflow to be run manually
workflow_dispatch:
env:
CACHE_NUMBER: 6 #change to manually reset cache
jobs:
test-saltproc:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
MPI: no
OMP: no
PHDF5: no
DAGMC: no
EVENT: no
VECTFIT: no
LIBMESH: no
steps:
- uses: actions/checkout@v3
# Setup conda
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge # mamba is faster than base conda
miniforge-version: latest
channels: conda-forge
activate-environment: saltproc-env
use-mamba: true
use-only-tar-bz2: true
- run: |
conda config --env --set pip_interop_enabled True
# check for existing cache
- name: Set cache date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
- uses: actions/cache@v3
id: dependencies-cache
with:
path: |
/usr/share/miniconda3/envs/saltproc-env
~/openmc_src
~/mcpl_src
~/endfb71_hdf5
~/.cache/pip
key: depcache-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
# Install dependencies
- name: Update environment
run: mamba env update -n saltproc-env -f environment.yml
if: steps.dependencies-cache.outputs.cache-hit != 'true'
- name: Install OpenMC cross section library
if: steps.dependencies-cache.outputs.cache-hit != 'true'
run: $GITHUB_WORKSPACE/scripts/ci/openmc-xs.bash
- name: OpenMC dependencies
run: |
sudo apt -y update
sudo apt install -y libhdf5-dev
- name: Download OpenMC
if: steps.dependencies-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: openmc-dev/openmc
path: openmc
submodules: recursive
- name: Build OpenMC from source if no cache is found
if: steps.dependencies-cache.outputs.cache-hit != 'true'
run: $GITHUB_WORKSPACE/tools/ci/build-openmc.sh
- name: Restore OpenMC source build from cache
if: steps.dependencies-cache.outputs.cache-hit == 'true'
run: $GITHUB_WORKSPACE/tools/ci/restore-openmc.sh
- name: Install SaltProc
run: pip install .
- name: Environment variables
run: |
echo "OPENMC_CROSS_SECTIONS=$HOME/endfb71_hdf5/cross_sections.xml" >> $GITHUB_ENV
- name: Test SaltProc
run: |
pytest --ignore tests/integration_tests/run_no_reprocessing_serpent --ignore tests/integration_tests/run_no_reprocessing_openmc --ignore tests/integration_tests/run_constant_reprocessing_serpent --ignore tests/integration_tests/run_constant_reprocessing_openmc tests/