Skip to content

Commit

Permalink
fix(mac/lfortran): only install micromamba if needed (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli authored Mar 27, 2024
1 parent b4cbf37 commit af739fe
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,20 @@ runs:
path: ${{ env.ONEAPI_ROOT }}
key: ${{ runner.os }}-${{ inputs.compiler }}-${{ inputs.version }}-${{ steps.get-date.outputs.date }}

# used to install lfortran on mac
- uses: mamba-org/setup-micromamba@v1
# Use micromamba for lfortran install on mac. Check if micromamba already
# exists, only install it if needed. If we install it, clean it up after.
- name: Check for micromamba
id: check-umamba
if: runner.os == 'macOS' && contains(inputs.compiler, 'lfortran')
shell: bash
run: |
if [ "$(command -v micromamba)" ]; then
echo "install=false" >> $GITHUB_OUTPUT
else
echo "install=true" >> $GITHUB_OUTPUT
fi
- uses: mamba-org/setup-micromamba@v1
if: runner.os == 'macOS' && contains(inputs.compiler, 'lfortran') && steps.check-umamba.outputs.install == 'true'
with:
init-shell: bash
post-cleanup: 'all'
Expand Down

0 comments on commit af739fe

Please sign in to comment.