From ccf6a65c932a9c0f3fa5935b08b51adaefd5ada3 Mon Sep 17 00:00:00 2001 From: Zaikun ZHANG Date: Fri, 2 Feb 2024 22:22:05 +0800 Subject: [PATCH] Update cmake.yml due to https://github.com/fortran-lang/setup-fortran/pull/58 --- .github/workflows/cmake.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 23b37eac55..992ed24e3a 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -134,22 +134,12 @@ 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 - # 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 - # of libgfortran-5.dll so that the programs pick up the correct version in chocolatey/bin - - name: Move libgfortran-5.dll for gcc11 windows - 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 - shell: bash - - name: Build run: | cmake --version cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="${{ matrix.toolchain.cflags }}" -DCMAKE_Fortran_FLAGS="${{ matrix.toolchain.fflags }}" . cmake --build . --target install - cmake --build . --target tests + cmake --build . --target test】s ctest --output-on-failure -V -E stress env: FC: ${{ steps.setup-fortran.outputs.fc }}