Skip to content

Commit

Permalink
240609.175126.HKT [skip ci] try fixing compile_mex.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zaikunzhang committed Jun 9, 2024
1 parent 9bbc828 commit 7c5c427
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/compile_mex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Miscellaneous setup
run: bash .github/scripts/misc_setup

- name: Link gfortran for MATLAB on Linux
- name: Decide gfortran version for MATLAB on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
GFVER=${{ env.GFORTRAN_VERSION }}
Expand All @@ -89,10 +89,24 @@ jobs:
if [[ "${{ matrix.matlab }}" = "R2020b" || "${{ matrix.matlab }}" = "R2021a" || "${{ matrix.matlab }}" = "R2021b" ]] ; then
GFVER=9
fi
bash .github/scripts/link_gfortran "$GFVER"
echo "GFVER=$GFVER" >> $GITHUB_ENV
- name: Set up gfortran on Linux
if: startsWith(matrix.os, 'ubuntu')
uses: fortran-lang/setup-fortran@main
with:
compiler: gcc
version: ${{ env.GFVER }}

- name: Link gfortran for MATLAB on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo ln -sf $(which gfortran-${{ env.GFVER }}) $(dirname $(which gfortran-${{ env.GFVER }}))/gfortran
which gfortran && gfortran --version
- name: Decide the version of oneAPI to use
- name: Decide the version of oneAPI to use on macOS and Windows
shell: bash
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'windows') }}
run: |
ONEAPI_VERSION=
if [[ "${{ matrix.os }}" = "windows-"* ]] ; then
Expand Down

0 comments on commit 7c5c427

Please sign in to comment.