update programming environment: spack support, cmake preset, gpu and external libs #941
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: Feelpp CI | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
check_skip: | |
runs-on: self-docker | |
outputs: | |
check_skip_components: ${{ steps.check_skip_components.outputs.SKIP_COMPONENTS }} | |
check_skip_feelpp: ${{ steps.check_skip_components.outputs.SKIP_FEELPP }} | |
check_skip_tests: ${{ steps.check_skip_components.outputs.SKIP_TESTS }} | |
check_skip_toolboxes: ${{ steps.check_skip_components.outputs.SKIP_TOOLBOXES }} | |
check_skip_mor: ${{ steps.check_skip_components.outputs.SKIP_MOR }} | |
check_skip_python: ${{ steps.check_skip_components.outputs.SKIP_PYTHON }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Check if skip components | |
id: check_skip_components | |
run: | | |
if [[ $(git show -s --format=%B) =~ "skip components" ]]; then | |
echo "SKIP_COMPONENTS=true" >> $GITHUB_OUTPUT | |
else | |
echo "SKIP_COMPONENTS=false" >> $GITHUB_OUTPUT | |
fi | |
if [[ $(git show -s --format=%B) =~ "skip feelpp" ]]; then | |
echo "SKIP_FEELPP=true" >> $GITHUB_OUTPUT | |
echo "SKIP_FEELPP=true" | |
else | |
echo "SKIP_FEELPP=false" >> $GITHUB_OUTPUT | |
echo "SKIP_FEELPP=false" | |
fi | |
if [[ $(git show -s --format=%B) =~ "skip tests" ]]; then | |
echo "SKIP_TESTS=true" >> $GITHUB_OUTPUT | |
echo "SKIP_TESTS=true" | |
else | |
echo "SKIP_TESTS=false" >> $GITHUB_OUTPUT | |
echo "SKIP_TESTS=false" | |
fi | |
if [[ $(git show -s --format=%B) =~ "skip toolboxes" ]]; then | |
echo "SKIP_TOOLBOXES=true" >> $GITHUB_OUTPUT | |
echo "SKIP_TOOLBOXES=true" | |
else | |
echo "SKIP_TOOLBOXES=false" >> $GITHUB_OUTPUT | |
echo "SKIP_TOOLBOXES=false" | |
fi | |
if [[ $(git show -s --format=%B) =~ "skip mor" ]]; then | |
echo "SKIP_MOR=true" >> $GITHUB_OUTPUT | |
echo "SKIP_MOR=true" | |
else | |
echo "SKIP_MOR=false" >> $GITHUB_OUTPUT | |
echo "SKIP_MOR=false" | |
fi | |
if [[ $(git show -s --format=%B) =~ "skip python" ]]; then | |
echo "SKIP_PYTHON=true" >> $GITHUB_OUTPUT | |
echo "SKIP_PYTHON=true" | |
else | |
echo "SKIP_PYTHON=false" >> $GITHUB_OUTPUT | |
echo "SKIP_PYTHON=false" | |
fi | |
feelpp: | |
needs: [check_skip] | |
runs-on: self-spack | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Configure Feelpp | |
id: configure-feelpp | |
run: | | |
source /data/cemosis/spack/share/spack/setup-env.sh | |
spack env activate feelpp-openmpi4 | |
cmake --preset feelpp-spack | |
- name: Build Feelpp | |
run: | | |
source /data/cemosis/spack/share/spack/setup-env.sh | |
spack env activate feelpp-openmpi4 | |
cmake --build --preset feelpp-spack -j60 | |
- name: Test Feelpp | |
run: | | |
source /data/cemosis/spack/share/spack/setup-env.sh | |
spack env activate feelpp-openmpi4 | |
ctest --preset feelpp-spack -j4 -R feelpp | |