Skip to content

Commit

Permalink
Various documentation and CI updates (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
MakisH committed Mar 20, 2024
1 parent ac79b78 commit fa8a71d
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 52 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build-custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
required: true
type: choice
options:
- OpenFOAMv2312
- OpenFOAMv2306
- OpenFOAMv2212
- OpenFOAMv2206
Expand All @@ -36,7 +37,7 @@ on:
- OpenFOAM5
versionpreCICE:
description: 'Version of preCICE to build with'
default: '2.5.0'
default: 'v3.0.0'
required: true
runTutorialHeatedPlate:
description: Run tutorial flow-over-heated-plate
Expand Down Expand Up @@ -77,10 +78,18 @@ jobs:
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
Expand Down Expand Up @@ -155,23 +164,15 @@ jobs:
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-22.04" ]
then
wget "https://github.com/precice/precice/releases/download/v${{ github.event.inputs.versionpreCICE }}/libprecice2_${{ github.event.inputs.versionpreCICE }}_jammy.deb"
sudo apt install "./libprecice2_${{ github.event.inputs.versionpreCICE }}_jammy.deb"
elif [ "${{ 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
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build with OpenFOAM v2306
name: Build with OpenFOAM v2312
on:
push:
branches-ignore:
Expand All @@ -21,9 +21,14 @@ on:
jobs:
build:
runs-on: ubuntu-22.04
container: precice/precice:nightly
steps:
- name: Check out repository
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@v4
id: cache-id
Expand All @@ -38,9 +43,5 @@ jobs:
cache: ${{ runner.temp }}/cache-directory
snapshot: '/'
exclude: '/boot /data /dev /mnt /proc /run /sys'
- name: Install preCICE
uses: precice/setup-precice-action@main
with:
precice-version: develop
- name: Build OpenFOAM-preCICE adapter
run: /usr/bin/openfoam2306 ./Allwmake
run: /usr/bin/openfoam2312 ./Allwmake
14 changes: 0 additions & 14 deletions .github/workflows/check-links.yml

This file was deleted.

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

# Install OpenFOAM v2306
# Install OpenFOAM v2312
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash
sudo apt-get update
sudo apt-get install openfoam2306-dev
sudo apt-get update -y
sudo apt-get install -y openfoam2312-dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Check code style
name: Pre-commit hook checks
on:
push:
branches:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ jobs:
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:openfoam2306,OPENFOAM_ADAPTER_REF:${{ github.event.pull_request.head.sha }}
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"
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ repos:
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 ]
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# OpenFOAM-preCICE adapter

[![Build with OpenFOAM v2306](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml)
[![Ask questions in the forum](https://img.shields.io/badge/community-discourse_forum-orange?link=https%3A%2F%2Fprecice.discourse.group%2F)](https://precice.discourse.group/)
[![Build with OpenFOAM v2312](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml/badge.svg?branch=develop)](https://github.com/precice/openfoam-adapter/actions/workflows/build.yml)
[![Changelog](https://img.shields.io/badge/Keep%20a%20Changelog--555.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiNmMTVkMzAiIHZpZXdCb3g9IjAgMCAxODcgMTg1Ij48cGF0aCBkPSJNNjIgN2MtMTUgMy0yOCAxMC0zNyAyMmExMjIgMTIyIDAgMDAtMTggOTEgNzQgNzQgMCAwMDE2IDM4YzYgOSAxNCAxNSAyNCAxOGE4OSA4OSAwIDAwMjQgNCA0NSA0NSAwIDAwNiAwbDMtMSAxMy0xYTE1OCAxNTggMCAwMDU1LTE3IDYzIDYzIDAgMDAzNS01MiAzNCAzNCAwIDAwLTEtNWMtMy0xOC05LTMzLTE5LTQ3LTEyLTE3LTI0LTI4LTM4LTM3QTg1IDg1IDAgMDA2MiA3em0zMCA4YzIwIDQgMzggMTQgNTMgMzEgMTcgMTggMjYgMzcgMjkgNTh2MTJjLTMgMTctMTMgMzAtMjggMzhhMTU1IDE1NSAwIDAxLTUzIDE2bC0xMyAyaC0xYTUxIDUxIDAgMDEtMTItMWwtMTctMmMtMTMtNC0yMy0xMi0yOS0yNy01LTEyLTgtMjQtOC0zOWExMzMgMTMzIDAgMDE4LTUwYzUtMTMgMTEtMjYgMjYtMzMgMTQtNyAyOS05IDQ1LTV6TTQwIDQ1YTk0IDk0IDAgMDAtMTcgNTQgNzUgNzUgMCAwMDYgMzJjOCAxOSAyMiAzMSA0MiAzMiAyMSAyIDQxLTIgNjAtMTRhNjAgNjAgMCAwMDIxLTE5IDUzIDUzIDAgMDA5LTI5YzAtMTYtOC0zMy0yMy01MWE0NyA0NyAwIDAwLTUtNWMtMjMtMjAtNDUtMjYtNjctMTgtMTIgNC0yMCA5LTI2IDE4em0xMDggNzZhNTAgNTAgMCAwMS0yMSAyMmMtMTcgOS0zMiAxMy00OCAxMy0xMSAwLTIxLTMtMzAtOS01LTMtOS05LTEzLTE2YTgxIDgxIDAgMDEtNi0zMiA5NCA5NCAwIDAxOC0zNSA5MCA5MCAwIDAxNi0xMmwxLTJjNS05IDEzLTEzIDIzLTE2IDE2LTUgMzItMyA1MCA5IDEzIDggMjMgMjAgMzAgMzYgNyAxNSA3IDI5IDAgNDJ6bS00My03M2MtMTctOC0zMy02LTQ2IDUtMTAgOC0xNiAyMC0xOSAzN2E1NCA1NCAwIDAwNSAzNGM3IDE1IDIwIDIzIDM3IDIyIDIyLTEgMzgtOSA0OC0yNGE0MSA0MSAwIDAwOC0yNCA0MyA0MyAwIDAwLTEtMTJjLTYtMTgtMTYtMzEtMzItMzh6bS0yMyA5MWgtMWMtNyAwLTE0LTItMjEtN2EyNyAyNyAwIDAxLTEwLTEzIDU3IDU3IDAgMDEtNC0yMCA2MyA2MyAwIDAxNi0yNWM1LTEyIDEyLTE5IDI0LTIxIDktMyAxOC0yIDI3IDIgMTQgNiAyMyAxOCAyNyAzM3MtMiAzMS0xNiA0MGMtMTEgOC0yMSAxMS0zMiAxMXptMS0zNHYxNGgtOFY2OGg4djI4bDEwLTEwaDExbC0xNCAxNSAxNyAxOEg5NnoiLz48L3N2Zz4K)](https://github.com/precice/openfoam-adapter/blob/develop/CHANGELOG.md)
<a style="text-decoration: none" href="https://github.com/precice/openfoam-adapter/blob/master/LICENSE" target="_blank">
<img src="https://img.shields.io/github/license/precice/openfoam-adapter.svg" alt="GNU GPL license">
</a>
<!-- <a style="text-decoration: none" href="https://travis-ci.org/precice/openfoam-adapter" target="_blank">
<img src="https://travis-ci.org/precice/openfoam-adapter.svg?branch=master" alt="Build status">
</a> -->
[![License](https://img.shields.io/github/license/precice/openfoam-adapter.svg)](https://github.com/precice/openfoam-adapter/blob/master/LICENSE)

## Start here

Expand Down
3 changes: 2 additions & 1 deletion docs/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ summary: "Get the code from GitHub and run ./Allwmake. If this fails, look into
To build the adapter, you need to install a few dependencies and then execute the `Allwmake` script.

1. Install [a compatible OpenFOAM distribution](https://precice.org/adapter-openfoam-support.html).
2. Install [preCICE v3](https://precice.org/installation-overview.html). In case you need preCICE v2, please install an older version of the adapter (v1.2.3 is the latest release to support preCICE v2).
2. Install [preCICE v3](https://precice.org/installation-overview.html).
* In case you need preCICE v2, please install an older version of the adapter ([v1.2.3](https://github.com/precice/openfoam-adapter/releases/tag/v1.2.3) was the last release to support preCICE v2).
3. [Download the latest release](https://github.com/precice/openfoam-adapter/releases/latest) for your OpenFOAM version.
4. Execute the build script: `./Allwmake`.
* See and adjust the configuration in the beginning of the script first, if needed.
Expand Down
8 changes: 4 additions & 4 deletions docs/openfoam-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ summary: Recent OpenFOAM.com versions work out-of-the-box. Recent OpenFOAM.org v

## How to get OpenFOAM

The easiest way to start is to get binary packages for your Linux distribution. For example, to [get OpenFOAM v2306 on Ubuntu](https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian#precompiled-packages-debianubuntu):
The easiest way to start is to get binary packages for your Linux distribution. For example, to [get OpenFOAM v2312 on Ubuntu](https://develop.openfoam.com/Development/openfoam/-/wikis/precompiled/debian#precompiled-packages-debianubuntu):

```bash
# Add the signing key, add the repository, update:
wget -q -O - https://dl.openfoam.com/add-debian-repo.sh | sudo bash

# Install OpenFOAM v2306:
sudo apt-get install openfoam2306-dev
# Install OpenFOAM v2312:
sudo apt-get install openfoam2312-dev
```

As these steps change your `.profile`, you need to log out and in again to make OpenFOAM fully discoverable.
Expand All @@ -26,7 +26,7 @@ OpenFOAM is a project with long history and many forks, of which we try to suppo
We provide version-specific [release archives](https://github.com/precice/openfoam-adapter/releases/latest) and respective Git branches for:

- OpenCFD / ESI (openfoam.com) - main focus:
- [OpenFOAM v1812-v2306](https://github.com/precice/openfoam-adapter) or newer
- [OpenFOAM v1812-v2312](https://github.com/precice/openfoam-adapter) or newer
- OpenFOAM v2212 and newer is only supported since v1.2.2 of the adapter.
- [OpenFOAM v1612-v1806](https://github.com/precice/openfoam-adapter/tree/OpenFOAMv1806) (not tested)
- OpenFOAM Foundation (openfoam.org) - secondary, consider experimental:
Expand Down

0 comments on commit fa8a71d

Please sign in to comment.