@@ -84,43 +84,26 @@ jobs:
84
84
init-shell : >-
85
85
powershell
86
86
87
- # - name: Set the PREFIX environment variable
88
- # run: |
89
- # echo "PREFIX=$env:MAMBA_ROOT_PREFIX\envs\fbld\Library" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
90
-
87
+ # The Fortran conda compiler, flang, needs to be set over the gfortran installed by chocolatety.
91
88
- name : Set the FC environment variable
92
89
run : |
93
90
echo "FC=$env:CONDA_PREFIX\Library\bin\flang-new.exe" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
94
91
95
- # - name: Make a LINKER environment variable
96
- # run: |
97
- # echo "LINKER=$env:VCToolsInstallDir\bin\Host$env:RUNNER_ARCH\$env:Platform\link.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
98
-
99
- # - name: Make a LINK_DIR environment variable for MSVC link.exe
100
- # run: |
101
- # echo "LINK_DIR=$env:VCToolsInstallDir\bin\Host$env:RUNNER_ARCH\$env:Platform" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
102
-
103
- # - name: Push location of MSVC link.exe to the front of the path
104
- # run: |
105
- # echo "Path=$env:LINK_DIR;$env:Path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
106
-
107
- # - name: Force location of MSVC link.exe to the front of the path
108
- # run: |
109
- # echo "$env:VCToolsInstallDir\bin\Host$env:RUNNER_ARCH\$env:Platform" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
110
-
92
+ # A link.exe installed by chocolatey was ahead of the MSVC link.exe in the path.
111
93
- name : Remove link.exe in the Git install
112
94
run : |
113
95
Remove-Item -Path "C:\Program Files\Git\usr\bin\link.exe" -Force
114
96
97
+ # The flang FortranRuntime.lib wasn't being found. This recommendation comes from the Meson docs.
115
98
- name : Add conda environment libpath to Windows LIB (not LIBPATH)
116
99
run : |
117
100
echo "LIB=$env:LIB;$env:CONDA_PREFIX\Library\lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
118
101
119
102
- name : View environment variables
120
103
run : |
121
104
ls env:
122
- ls env:LIB
123
105
106
+ # The install prefix must be quoted.
124
107
- name : Configure, build, and install HeatModelF
125
108
run : |
126
109
pushd ./external/bmi-example-fortran
@@ -138,6 +121,7 @@ jobs:
138
121
python -c 'import pymt_heatf'
139
122
python -c 'from pymt.models import HeatModelF'
140
123
124
+ # Weird Windows stuff here. If the examples in the next step run to completion, the BMI works.
141
125
# - name: Test BMI
142
126
# working-directory: ${{ github.workspace }}
143
127
# run: |
0 commit comments