-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from gerlero/openfoam2206
Support OpenFOAM v2206
- Loading branch information
Showing
4 changed files
with
113 additions
and
73 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Build and test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
openfoam-version: | ||
type: string | ||
required: true | ||
app-version: | ||
type: string | ||
default: ${{ github.ref_name }} | ||
required: false | ||
release: | ||
type: boolean | ||
default: false | ||
required: false | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Cache DMG file | ||
id: cache_dmg | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
build/*.dmg | ||
!build/*-build.dmg | ||
key: dmg-${{ inputs.openfoam-version }}-${{ runner.arch }}-${{ hashFiles('Brewfile', 'configure.sh', 'icon.icns', 'Makefile', format('OpenFOAM-v${0}.tgz.sha256', inputs.openfoam-version)) }} | ||
- name: Reuse cached DMG | ||
if: steps.cache_dmg.outputs.cache-hit == 'true' | ||
run: | | ||
touch build/*.dmg | ||
- name: Build | ||
run: | | ||
make zip OPENFOAM_VERSION=${{ inputs.openfoam-version }} APP_VERSION=${{ inputs.app-version }} | ||
- name: Upload ZIP artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: zip-${{ inputs.openfoam-version }} | ||
path: build/*-app-*.zip | ||
if-no-files-found: error | ||
|
||
test: | ||
needs: build | ||
strategy: | ||
matrix: | ||
os: [macos-10.15, macos-11, macos-12] | ||
fail-fast: false | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Download ZIP artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: zip-${{ inputs.openfoam-version }} | ||
path: build | ||
- name: Unzip app | ||
run: | | ||
unzip *-app-$(uname -m).zip | ||
working-directory: build | ||
- name: Test | ||
run: | | ||
make install-dependencies OPENFOAM_VERSION=${{ inputs.openfoam-version }} | ||
make test OPENFOAM_VERSION=${{ inputs.openfoam-version }} | ||
release: | ||
if: inputs.release == 'true' | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download ZIP artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: zip-${{ inputs.openfoam-version }} | ||
- name: Upload ZIP to release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: '*.zip' | ||
tag: ${{ github.ref }} | ||
file_glob: true | ||
overwrite: false |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
db95eda4afb97ca870733b2d4201ef539099d0778e3f3eca9a075d4f1a0eea46 OpenFOAM-v2206.tgz |