github-linux #70
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: 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.5.0"] | |
ubuntu_version: ["jammy"] | |
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/v2.5.0/libprecice2_2.5.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@v3 | |
- name: Compile all projects | |
run: | | |
for dir in */ | |
do | |
cd ${dir} | |
if [ -e CMakeLists.txt ] | |
then | |
echo "Current project: ${dir}" | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} . | |
make | |
else | |
echo "Skipping project: ${dir}" | |
fi | |
cd .. | |
done | |
- 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 | |
- name: Create issue about failure | |
if: failure() && github.event_name == 'schedule' | |
uses: JasonEtco/create-an-issue@v2.9.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
filename: .github/action-issue-template.md | |
update_existing: true | |
search_existing: open |