diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e83d875..75ed0d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,12 +122,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup OpenFOAM + - name: Set up OpenFOAM uses: ./ with: openfoam-version: ${{ matrix.openfoam-version }} - name: Run icoFoam -help run: icoFoam -help - - name: Regression test + - name: Test shell session + if: matrix.openfoam-version >= 1000 run: | - source $WM_DIR/scripts/AllwmakeParseArguments + openfoam -help + openfoam${{ matrix.openfoam-version }} -help + - name: Regression test + run: source $WM_DIR/scripts/AllwmakeParseArguments diff --git a/action.yml b/action.yml index 510b6a4..aaed411 100644 --- a/action.yml +++ b/action.yml @@ -57,6 +57,16 @@ runs: run: | brew install --no-quarantine gerlero/openfoam/openfoam@${{ inputs.openfoam-version }} shell: bash + - name: Add shell session commands to PATH + if: steps.prep.outputs.openfoam-flavor == 'com' + run: | + source "${{ steps.prep.outputs.openfoam-bashrc }}" || true + + mkdir -p ~/.setup-openfoam/bin + ln -s "$FOAM_ETC/openfoam" ~/.setup-openfoam/bin/openfoam${{ inputs.openfoam-version }} + ln -s "$FOAM_ETC/openfoam" ~/.setup-openfoam/bin/openfoam + echo ~/.setup-openfoam/bin >> "$GITHUB_PATH" + shell: bash - name: Activate OpenFOAM for future steps run: | source "${{ steps.prep.outputs.openfoam-bashrc }}" || true