Skip to content

Commit

Permalink
Merge pull request #320 from precice/release-v1.3.0
Browse files Browse the repository at this point in the history
Release v1.3.0
  • Loading branch information
MakisH committed Mar 20, 2024
2 parents 0acfa0f + ff087bc commit 74b8719
Show file tree
Hide file tree
Showing 76 changed files with 2,629 additions and 379 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
65 changes: 38 additions & 27 deletions .github/workflows/build-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
required: true
type: choice
options:
- ubuntu-22.04
- ubuntu-20.04
- ubuntu-18.04
refAdapter:
Expand All @@ -19,6 +20,8 @@ on:
required: true
type: choice
options:
- OpenFOAMv2312
- OpenFOAMv2306
- OpenFOAMv2212
- OpenFOAMv2206
- OpenFOAMv2112
Expand All @@ -34,7 +37,7 @@ on:
- OpenFOAM5
versionpreCICE:
description: 'Version of preCICE to build with'
default: '2.3.0'
default: 'v3.0.0'
required: true
runTutorialHeatedPlate:
description: Run tutorial flow-over-heated-plate
Expand Down Expand Up @@ -72,96 +75,104 @@ jobs:
echo "Run tutorial partitioned-pipe: ${{ github.event.inputs.runTutorialPartitionedPipe }}"
echo "Tutorials branch: ${{ github.event.inputs.branchTutorials }}"
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.refAdapter }}
- name: Install preCICE (no cache)
uses: precice/setup-precice-action@main
with:
precice-version: ${{ github.event.inputs.versionpreCICE }}
- name: Install OpenFOAM (no cache)
id: installOpenFOAM
run: |
case "${{ github.event.inputs.versionOpenFOAM }}" in
OpenFOAMv2312)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2312-dev
echo "{openfoam_exec}={/usr/bin/openfoam2312}" >> $GITHUB_OUTPUT;;
OpenFOAMv2306)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2306-dev
echo "{openfoam_exec}={/usr/bin/openfoam2306}" >> $GITHUB_OUTPUT;;
OpenFOAMv2212)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2212-dev
echo "::set-output name=openfoam_exec::/usr/bin/openfoam2212";;
echo "{openfoam_exec}={/usr/bin/openfoam2212}" >> $GITHUB_OUTPUT;;
OpenFOAMv2206)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2206-dev
echo "::set-output name=openfoam_exec::/usr/bin/openfoam2206";;
echo "{openfoam_exec}={/usr/bin/openfoam2206}" >> $GITHUB_OUTPUT;;
OpenFOAMv2112)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2112-dev
echo "::set-output name=openfoam_exec::/usr/bin/openfoam2112";;
echo "{openfoam_exec}={/usr/bin/openfoam2112}" >> $GITHUB_OUTPUT;;
OpenFOAMv2106)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2106-dev
echo "::set-output name=openfoam_exec::/usr/bin/openfoam2106";;
echo "{openfoam_exec}={/usr/bin/openfoam2106}" >> $GITHUB_OUTPUT;;
OpenFOAMv2012)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2012-dev
echo "::set-output name=openfoam_exec::/usr/bin/openfoam2012";;
echo "{openfoam_exec}={/usr/bin/openfoam2012}" >> $GITHUB_OUTPUT;;
OpenFOAMv2006)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam2006-dev
echo "::set-output name=openfoam_exec::/usr/bin/openfoam2006";;
echo "{openfoam_exec}={/usr/bin/openfoam2006}" >> $GITHUB_OUTPUT;;
OpenFOAMv1912)
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get install openfoam1912-dev
echo "::set-output name=openfoam_exec::/usr/bin/openfoam1912";;
echo "{openfoam_exec}={/usr/bin/openfoam1912}" >> $GITHUB_OUTPUT;;
OpenFOAM10)
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam10
echo "::set-output name=openfoam_exec::. /opt/openfoam10/etc/bashrc &&";;
echo "{openfoam_exec}={. /opt/openfoam10/etc/bashrc &&}" >> $GITHUB_OUTPUT;;
OpenFOAM9)
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam9
echo "::set-output name=openfoam_exec::. /opt/openfoam9/etc/bashrc &&";;
echo "{openfoam_exec}={. /opt/openfoam9/etc/bashrc &&}" >> $GITHUB_OUTPUT;;
OpenFOAM8)
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam8
echo "::set-output name=openfoam_exec::. /opt/openfoam8/etc/bashrc &&";;
echo "{openfoam_exec}={. /opt/openfoam8/etc/bashrc &&}" >> $GITHUB_OUTPUT;;
OpenFOAM7)
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam7
echo "::set-output name=openfoam_exec::. /opt/openfoam7/etc/bashrc &&";;
echo "{openfoam_exec}={. /opt/openfoam7/etc/bashrc &&}" >> $GITHUB_OUTPUT;;
OpenFOAM6)
echo "OpenFOAM 6 is only available on Ubuntu 18.04 or older."
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam6
echo "::set-output name=openfoam_exec::. /opt/openfoam6/etc/bashrc &&";;
echo "{openfoam_exec}={. /opt/openfoam6/etc/bashrc &&}" >> $GITHUB_OUTPUT;;
OpenFOAM5)
echo "OpenFOAM 5 is only available on Ubuntu 18.04 or older."
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key | apt-key add -"
sudo add-apt-repository http://dl.openfoam.org/ubuntu
sudo apt-get update
sudo apt-get -y install openfoam5
echo "::set-output name=openfoam_exec::. /opt/openfoam5/etc/bashrc &&";;
echo "{openfoam_exec}={. /opt/openfoam5/etc/bashrc &&}" >> $GITHUB_OUTPUT;;
*)
echo "I cannot find ${{ github.event.inputs.refAdapter }} in my known options."
exit 1;;
esac
- name: Install preCICE (no cache)
- name: Sanity check
run: |
if [ "${{ github.event.inputs.virtualEnvironment }}" == "ubuntu-20.04" ]
then
wget "https://github.com/precice/precice/releases/download/v${{ github.event.inputs.versionpreCICE }}/libprecice2_${{ github.event.inputs.versionpreCICE }}_focal.deb"
sudo apt install "./libprecice2_${{ github.event.inputs.versionpreCICE }}_focal.deb"
elif [ "${{ github.event.inputs.virtualEnvironment }}" == "ubuntu-18.04" ]
then
wget "https://github.com/precice/precice/releases/download/v${{ github.event.inputs.versionpreCICE }}/libprecice2_${{ github.event.inputs.versionpreCICE }}_bionic.deb"
sudo apt install "./libprecice2_${{ github.event.inputs.versionpreCICE }}_bionic.deb"
fi
ls /usr/bin/openfoam* || echo "No /usr/bin/openfoam* directories."
ls /opt/openfoam* || echo "No /opt/openfoam* directories."
echo "GitHub Actions step output openfoam_exec:"
echo ${{steps.installOpenFOAM.outputs.openfoam_exec}}
- name: Build OpenFOAM-preCICE adapter
run: |
echo "OpenFOAM environment: ${{steps.installOpenFOAM.outputs.openfoam_exec}}"
${{steps.installOpenFOAM.outputs.openfoam_exec}} ./Allwmake
- name: Get tutorials
run: |
Expand Down Expand Up @@ -210,7 +221,7 @@ jobs:
wait $PIDfluid
fi
- name: Archive logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: logs
path: |
Expand All @@ -224,7 +235,7 @@ jobs:
tutorials/partitioned-pipe/fluid1-openfoam-pimplefoam/fluid1-openfoam-pimplefoam.log
tutorials/partitioned-pipe/fluid2-openfoam-pimplefoam/fluid2-openfoam-pimplefoam.log
- name: Archive case files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: case-files
path: |
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build with OpenFOAM v2212
name: Build with OpenFOAM v2312
on:
push:
branches-ignore:
Expand All @@ -20,23 +20,28 @@ on:
- 'README.md'
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container: precice/precice:nightly
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install action dependencies
run: |
apt-get update -qq
apt-get install -qq sudo wget
- name: Setup caches
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-id
with:
path: ${{ runner.temp }}/cache-directory
key: ${{ runner.os }}-cache-dependencies-v1.0
- name: Install dependencies (considering cache)
- name: Install OpenFOAM (considering cache)
uses: airvzxf/[email protected]
with:
script: 'install-dependencies.sh'
script: 'install-openfoam.sh'
is_cached: ${{ steps.cache-id.outputs.cache-hit }}
cache: ${{ runner.temp }}/cache-directory
snapshot: '/'
exclude: '/boot /data /dev /mnt /proc /run /sys'
- name: Build OpenFOAM-preCICE adapter
run: /usr/bin/openfoam2212 ./Allwmake
run: /usr/bin/openfoam2312 ./Allwmake
2 changes: 1 addition & 1 deletion .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
name: Check formatting (clang-format)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@main
with:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/check-links.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/check-markdown.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/check-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Lint shell scripts (shellcheck)
uses: ludeeus/action-shellcheck@master
9 changes: 0 additions & 9 deletions .github/workflows/install-dependencies.sh

This file was deleted.

6 changes: 6 additions & 0 deletions .github/workflows/install-openfoam.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash -e

# Install OpenFOAM v2312
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get update -y
sudo apt-get install -y openfoam2312-dev
31 changes: 31 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pre-commit hook checks
on:
push:
branches:
- main
- develop
pull_request:
branches:
- "*"

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout preCICE
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
check-latest: true
- name: Install pre-commit
run: pip install pre-commit
- name: Run checks
run: pre-commit run -a -v
- name: Git status
if: always()
run: git status
- name: Full diff
if: always()
run: git diff
29 changes: 29 additions & 0 deletions .github/workflows/system-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: System tests

on:
pull_request:
types: [labeled]

jobs:
gather-refs:
if: ${{ github.event.label.name == 'trigger-system-tests' }}
runs-on: ubuntu-latest
outputs:
reftutorials: ${{ steps.reftutorials.outputs.shorthash }}
steps:
- id: reftutorials
uses: nmbgeek/github-action-get-latest-commit@main
with:
owner: precice
repo: tutorials
branch: develop

run-system-tests:
if: ${{ github.event.label.name == 'trigger-system-tests' }}
needs: gather-refs
uses: precice/tutorials/.github/workflows/run_testsuite_workflow.yml@develop
with:
suites: openfoam_adapter_pr
build_args: TUTORIALS_REF:${{ needs.gather-refs.outputs.reftutorials }},PRECICE_REF:v3.0.0,OPENFOAM_EXECUTABLE:openfoam2312,OPENFOAM_ADAPTER_REF:${{ github.event.pull_request.head.sha }}
systests_branch: develop
loglevel: "DEBUG"
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
# Official repo for default hooks
- repo: https://github.com/precice/precice-pre-commit-hooks
rev: 'v3.3'
hooks:
- id: format-precice-config
- id: check-image-prefix
args: [ --prefix=docs-adapter-openfoam- ]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.30.0
hooks:
- id: markdownlint
files: "^docs/.*.md"
- id: markdownlint-fix
files: "^docs/.*.md"
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
args: [ --external-sources, --exclude=SC1091 ]
Loading

0 comments on commit 74b8719

Please sign in to comment.