Skip to content

Commit

Permalink
Fix multiple installs
Browse files Browse the repository at this point in the history
  • Loading branch information
gerlero committed Oct 19, 2024
1 parent 995f546 commit 8322efe
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 11 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up OpenFOAM
- name: Set up OpenFOAM ${{ matrix.openfoam-version }}
uses: ./
with:
openfoam-version: ${{ matrix.openfoam-version }}
- name: Run icoFoam -help
run: icoFoam -help
- name: Test icoFoam -help
run: icoFoam -help | grep OpenFOAM-${{ matrix.openfoam-version }}
- name: Test shell session
if: matrix.openfoam-version >= 1000
run: |
openfoam -help
openfoam${{ matrix.openfoam-version }} -help
openfoam -help | grep OpenFOAM-${{ matrix.openfoam-version }}
openfoam${{ matrix.openfoam-version }} -help | grep OpenFOAM-${{ matrix.openfoam-version }}
- name: Regression test
run: source $WM_DIR/scripts/AllwmakeParseArguments

Expand Down Expand Up @@ -243,12 +243,32 @@ jobs:
uses: ./
with:
openfoam-version: ${{ matrix.openfoam-version }}
- name: Run icoFoam -help
run: icoFoam -help
- name: Test icoFoam -help
run: icoFoam -help | grep OpenFOAM-${{ matrix.openfoam-version }}
- name: Test shell session
if: matrix.openfoam-version >= 1000
run: |
openfoam -help
openfoam${{ matrix.openfoam-version }} -help
openfoam -help | grep OpenFOAM-${{ matrix.openfoam-version }}
openfoam${{ matrix.openfoam-version }} -help | grep OpenFOAM-${{ matrix.openfoam-version }}
- name: Regression test
run: . $WM_DIR/scripts/AllwmakeParseArguments

multiple-installs:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up OpenFOAM 2406
uses: ./
with:
openfoam-version: 2406
- name: Set up OpenFOAM 2312
uses: ./
with:
openfoam-version: 2312
- name: Test OpenFOAM 2312
run: |
icoFoam -help | grep OpenFOAM-2312
openfoam icoFoam -help | grep OpenFOAM-2312
- name: Test OpenFOAM v2406
run: openfoam2406 icoFoam -help | grep OpenFOAM-2406
9 changes: 7 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ runs:
if: inputs.openfoam-version >= 1000
run: |
mkdir -p ~/.setup-openfoam/bin
ln -s "${{ steps.prep.outputs.openfoam-etc }}/openfoam" ~/.setup-openfoam/bin/openfoam${{ inputs.openfoam-version }}
ln -s "${{ steps.prep.outputs.openfoam-etc }}/openfoam" ~/.setup-openfoam/bin/openfoam
echo '#!/bin/bash' > ~/.setup-openfoam/bin/openfoam${{ inputs.openfoam-version }}
echo 'exec "${{ steps.prep.outputs.openfoam-etc }}/openfoam" "$@"' >> ~/.setup-openfoam/bin/openfoam${{ inputs.openfoam-version }}
chmod +x ~/.setup-openfoam/bin/openfoam${{ inputs.openfoam-version }}
ln -sf ~/.setup-openfoam/bin/openfoam${{ inputs.openfoam-version }} ~/.setup-openfoam/bin/openfoam
echo ~/.setup-openfoam/bin >> "$GITHUB_PATH"
shell: bash

0 comments on commit 8322efe

Please sign in to comment.