Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shell session commands to PATH #5

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 10 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading