From 270483949e539c78278532872d74463ee575ee01 Mon Sep 17 00:00:00 2001 From: jdhughes-usgs Date: Fri, 1 Jul 2022 17:45:14 -0500 Subject: [PATCH] ci: update windows configuration for gfortran builds (#17) --- .github/common/link-gfortranlib5.sh | 7 +++++++ .github/intel-scripts/build_windows.bat | 6 +++--- .github/workflows/nightly-build.yml | 13 +++++++++---- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100755 .github/common/link-gfortranlib5.sh diff --git a/.github/common/link-gfortranlib5.sh b/.github/common/link-gfortranlib5.sh new file mode 100755 index 0000000..275c2f9 --- /dev/null +++ b/.github/common/link-gfortranlib5.sh @@ -0,0 +1,7 @@ +#! /bin/bash + +FCDIR=/c/ProgramData/Chocolatey/bin +LNDIR=/c/ProgramData/Chocolatey/lib/mingw/tools/install/mingw64/bin +if [ -d "$FCDIR" ] && [ -f "$LNDIR/libgfortran-5.dll" ] && [ ! -f "$FCDIR/libgfortran-5.dll" ]; then + ln -s "$LNDIR/libgfortran-5.dll" "$FCDIR/libgfortran-5.dll" +fi diff --git a/.github/intel-scripts/build_windows.bat b/.github/intel-scripts/build_windows.bat index 398314f..1755708 100755 --- a/.github/intel-scripts/build_windows.bat +++ b/.github/intel-scripts/build_windows.bat @@ -7,8 +7,8 @@ REM SPDX-License-Identifier: MIT for /f "tokens=* usebackq" %%f in (`dir /b "C:\Program Files (x86)\Intel\oneAPI\compiler\" ^| findstr /V latest ^| sort`) do @set "LATEST_VERSION=%%f" @call "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat" -echo %VS_VER% -echo %LATEST_VERSION% +echo "Visual Studio Version: %VS_VER%" +echo "OneAPI version: %LATEST_VERSION%" echo "C:\Program Files (x86)\Intel\oneAPI\compiler\%LATEST_VERSION%\env\vars.bat" -echo %ONEAPI_ROOT% +echo "OneAPI root directory: %ONEAPI_ROOT%" where ifort.exe diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index e928d1c..d75f08d 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -26,7 +26,7 @@ jobs: - os: macos-latest artifact_name: mac.zip body_name: bodyFileMac - - os: windows-2019 + - os: windows-latest artifact_name: win64.zip body_name: bodyFileWindows defaults: @@ -50,6 +50,11 @@ jobs: run: | pip list + - name: Workaround for windows-2022 v20220626.1 gfortran executable run failures + if: runner.os == 'Windows' + run: | + .github/common/link-gfortranlib5.sh + - name: Setup symbolic link to gfortran on Linux if: runner.os == 'Linux' run: | @@ -60,9 +65,9 @@ jobs: - name: Setup symbolic link to gfortran on macOS if: runner.os == 'macOS' run: | - sudo ln -fs /usr/local/bin/gfortran-10 /usr/local/bin/gfortran - sudo ln -fs /usr/local/bin/gcc-10 /usr/local/bin/gcc - sudo ln -fs /usr/local/bin/g++-10 /usr/local/bin/g++ + sudo ln -fs /usr/local/bin/gfortran-11 /usr/local/bin/gfortran + sudo ln -fs /usr/local/bin/gcc-11 /usr/local/bin/gcc + sudo ln -fs /usr/local/bin/g++-11 /usr/local/bin/g++ - name: Print GNU compiler versions shell: bash