Open praynaud opened 10 months ago
Thanks for raising, ideally this could be tested (planned in #31).
Does anything here help? https://github.com/modflowpy/install-intelfortran-action/issues/10 issues with cmake discovery have been reported before. See also https://github.com/fortran-lang/setup-fortran/issues/6
@wpbonelli Thank you for the links. It does seem like some people have found workarounds by using a different generator. I will investigate and report back if I find a solution.
In the meantime, I fully support the work planned in #31 !
@praynaud does your issue occur consistently, or only on cache restore? If the latter, perhaps #48 may resolve it
@wpbonelli It's been a minute since I looked into this. Let me give it a try with this new version. I will report back ASAP.
@wpbonelli Unfortunately, the cache restore still does not work. I used the action with @main
instead of @v1
(see below). I will let you know tomorrow if a fresh install works, because unfortunately something downstream was wrong with my script upon the first run, so the cache was created but the script failed because of something unrelated. The cache should be 'gone' by tomorrow...
jobs:
CI_Windows:
runs-on: [windows-latest]
strategy:
fail-fast: false
- name: Setup Fortran
uses: fortran-lang/setup-fortran@main
id: setup-fortran
with:
compiler: intel-classic
version: '2021.10'
@wpbonelli The fresh install also fails, but I'm now looking into other generators. As mentioned above, the modflowpy/install-intelfortran-action@v1
action worked on fresh install (not cache restore), so there must be a difference between the two actions that causes the failure for fresh installations using the new action.
@zbeekman I am tagging because you might be able to help...
I'm on Windows and using fortran-lang/setup-fortran@main and have a similar problem. When there isn't a cache the build will work but once the cache is hit cmake fails to find the fortran compiler. I briefly tried '-G Ninja' in my local environment and that caused my local build to fail in ways I didn't know how to solve. I was hopeful that #48 was going to fix my build issue but something in my setup still isn't quite right. I'd appreciate any suggestions or next steps I could try to improve the build configuration.
https://github.com/rma-rripken/AnnLineGen_RMA
Summary
This is for a Windows
fortran
project that usescmake
to build and test and usesVisual Studio 17 2022
as the generator. I need to install theintel-classic
compiler, preferably the latest version, which is2021.10
. The compiler seemingly installs, but thencmake
does not know the Fortran compiler identification and the build fails.Details
My CI script (relevant parts):
My
build_and_test.bat
script is as follows:The output/error in the GitHub CI is:
I tried other GitHub Actions and the
modflowpy/install-intelfortran-action@v1
action works for my project by takes a very long time. It appears this action is an ancestor of the currentfortran-lang/setup-fortran
action, so I'm hoping there is something in that older action that could be added to the current action to properly set environment variables such thatcmake
can correctly detect the Fortran compiler.For information, here is the output of my successful CI when using the older Action:
Thanks for helping and for creating these great tools!