From fea912fe7f026ba37f24457d3e79952bbd46780d Mon Sep 17 00:00:00 2001 From: Gabriel Gerlero Date: Sun, 28 Jul 2024 10:33:06 -0300 Subject: [PATCH] Add shell session commands to PATH --- .github/workflows/ci.yml | 10 +++++++--- action.yml | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) 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..8fad3bb 100644 --- a/action.yml +++ b/action.yml @@ -57,6 +57,14 @@ runs: run: | brew install --no-quarantine gerlero/openfoam/openfoam@${{ inputs.openfoam-version }} shell: bash + - name: Set up shell session commands + if: steps.prep.outputs.openfoam-flavor == 'com' + run: | + 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