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

fix(mac/lfortran): only install micromamba if needed #79

Merged
merged 1 commit into from
Mar 27, 2024
Merged
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
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
Loading