Skip to content

Merge pull request #250 from marcfehling/master #446

Merge pull request #250 from marcfehling/master

Merge pull request #250 from marcfehling/master #446

Workflow file for this run

name: github-linux
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * SUN'
permissions:
contents: read
issues: write
jobs:
build:
if: (github.event_name == 'schedule' && github.repository == 'dealii/code-gallery') || github.event_name != 'schedule'
name: Build ${{ matrix.build_type }}-dealii:${{ matrix.dealii_version }}-${{ matrix.ubuntu_version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: ["Debug"]
dealii_version: ["master", "v9.7.1", "v9.6.0"]
ubuntu_version: ["jammy"]
include:
- build_type: "Debug"
dealii_version: "master"
ubuntu_version: "noble"
container:
image: dealii/dealii:${{ matrix.dealii_version }}-${{ matrix.ubuntu_version }}
options: --user root
steps:
- name: Install dependencies from repository
run: |
apt-get -y update
apt-get -y install libarmadillo-dev libconfig++-dev
- name: Install preCICE
run: |
wget -O libprecice.deb https://github.com/precice/precice/releases/download/v3.2.0/libprecice3_3.2.0_${{ matrix.ubuntu_version }}.deb
apt-get -y install ./libprecice.deb
- name: Install XBraid
run: |
wget -O xbraid.tar.gz https://github.com/XBraid/xbraid/archive/refs/tags/v3.1.0.tar.gz
mkdir /opt/xbraid
tar xf xbraid.tar.gz -C /opt/xbraid --strip-components 1
cd /opt/xbraid/braid
make
echo "BRAID_DIR=${PWD}" >> $GITHUB_ENV
- uses: actions/checkout@v7
- name: Compile all projects
run: |
log="\nSummary:"
for dir in */; do
cd ${dir}
log="${log}\n $(printf '%-70s' "${dir}")"
if cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . ; then
if make ; then
log="${log} passed."
else
log="${log} FAILED."
err="${err} ${dir}"
fi
else
log="${log} skipped."
fi
cd ..
done
echo -e "${log}"
if [ -n "${err}" ]; then
echo "error_compile=${err}" >> $GITHUB_ENV
exit 1
fi
- name: Test coupled_laplace_problem
run: |
cd coupled_laplace_problem
(./coupled_laplace_problem 2>&1 & ./fancy_boundary_condition >fbc.log)
sed -i '2d' solution-10.vtk
numdiff solution-10.vtk test_data/reference-10.vtk || (echo "error_test=coupled_laplace_problem/" >> $GITHUB_ENV && exit 1)
- name: Create issue about failure
if: failure() && github.event_name == 'schedule'
uses: JasonEtco/create-an-issue@v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/action-issue-template.md
update_existing: true
search_existing: open
workflow-keepalive:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: liskin/gh-workflow-keepalive@v1