diff --git a/.github/actions/test-fc/action.yml b/.github/actions/test-fc/action.yml index 9732e680..36c49696 100644 --- a/.github/actions/test-fc/action.yml +++ b/.github/actions/test-fc/action.yml @@ -52,7 +52,8 @@ runs: set -x # Move the old libgfortran-5.dll back to its original place. - mv "$RUNNER_TEMP/mingw64/libgfortran-5.dll" /c/mingw64/bin/libgfortran-5.dll + mkdir -p /c/mingw64/bin/ + [ -f "$RUNNER_TEMP/mingw64/bin/libgfortran-5.dll" ] && mv "$RUNNER_TEMP/mingw64/bin/libgfortran-5.dll" /c/mingw64/bin/libgfortran-5.dll # Confirm that we find the gcc12 one ahead of the gcc11 one. which -a libgfortran-5.dll diff --git a/setup-fortran.sh b/setup-fortran.sh index 3bd32774..13002430 100755 --- a/setup-fortran.sh +++ b/setup-fortran.sh @@ -87,11 +87,7 @@ install_gcc_choco() echo "GCC $version already installed" else # otherwise hide preinstalled mingw compilers - mkdir "$RUNNER_TEMP/mingw64" - mv /c/mingw64/bin/gfortran "$RUNNER_TEMP/mingw64/gfortran" - mv /c/mingw64/bin/libgfortran-5.dll "$RUNNER_TEMP/mingw64/libgfortran-5.dll" - mv /c/mingw64/bin/gcc "$RUNNER_TEMP/mingw64/gcc" - mv /c/mingw64/bin/g++ "$RUNNER_TEMP/mingw64/g++" + mv /c/mingw64 "$RUNNER_TEMP/" # ...and install selected version case $version in 13)