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 failing job on gcc 11 #123

Merged
merged 1 commit into from
Dec 20, 2023
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
2 changes: 2 additions & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2134,3 +2134,5 @@ lang
archnorma
orthtol
nouninit
libgfortran
chocolatey
14 changes: 14 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ jobs:
- name: Install Ninja / MacOS
if: ${{ matrix.os == 'macos-latest' }}
run: brew install ninja
- name: Install Ninja / Windows
if: ${{ matrix.os == 'windows-latest' }}
run: choco install ninja
- uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
Expand All @@ -99,6 +102,16 @@ jobs:
if: ${{ matrix.toolchain.cc }}
run: echo "CC=${{ matrix.toolchain.cc }}" >> $env:GITHUB_ENV

# gcc 12 is installed on windows runners by default. setup-fortran moves gfortran, gcc, and g++ to a temp directory
# so that they do not get picked up by CMake, but it doesn't move libgfortran-5.dll, and because /c/mingw64/bin is
Fixed Show fixed Hide fixed
# on the path ahead of /c/ProgramData/chocolatey/bin (setup-fortran uses chocolatey to install gcc11), the programs
# that are compiled with gcc11 try to use libgfortran-5.dll from gcc12 and crash. For now we rename the gcc12 version
Fixed Show fixed Hide fixed
# of libgfortran-5.dll so that the programs pick up the correct version in chocolatey/bin
Fixed Show fixed Hide fixed
- name: Move libgfortran-5.dll for gcc11 windows
Fixed Show fixed Hide fixed
if: ${{ matrix.os == 'windows-latest' && matrix.toolchain.compiler == 'gcc' && matrix.toolchain.version == '11' }}
run: mv /c/mingw64/bin/libgfortran-5.dll /c/mingw64/bin/libgfortran-5.dll.old
Fixed Show fixed Hide fixed
shell: bash

- name: Build
run: |
cmake --version
Expand All @@ -108,6 +121,7 @@ jobs:
ctest --output-on-failure -V -j4 -E stress
env:
FC: ${{ steps.setup-fortran.outputs.fc }}
shell: bash

- name: Stress test
if: ${{ github.event_name == 'schedule' || github.event.inputs.stress-test == 'true' }}
Expand Down