Travis CI + os: windows + mingw : how to get gnu c/fortran compilers?

Hi all,

In .travis.yml, os windows, I need to get FC/CC (gfortran/gcc compilers) : any clue ?


https://travis-ci.org/opencollab/arpack-ng/jobs/619341305?utm_medium=notification&utm_source=github_status

Franck

Travis’s Windows image comes with the “mingw” Chocolatey package, which may have the gfortran compiler.

Alternatively, you can uninstall the “mingw” Chocolatey package and install MSYS2 as shown here, then install the mingw-w64-x86_64-toolchain package group inside it with pacman -S. (You’ll have to use the mentioned trick to enter a MSYS2 shell from the Git Bash shell that your build starts in.)

@tanzislam : tried many things… Not sure to get what I am missing. Could you have a quick look at the lasts commit CI https://github.com/opencollab/arpack-ng/pull/231 and tell me if you get what’s wrong ? gcc is installed and found by cmake, but, not gfortran ?!.. https://travis-ci.org/opencollab/arpack-ng/jobs/622332733?utm_medium=notification&utm_source=github_status

The apt plugin won’t work on Windows. You’ll need to run choco yourself.

Already tried without success : https://travis-ci.org/opencollab/arpack-ng/jobs/625072649?utm_medium=notification&utm_source=github_status and commit here https://github.com/opencollab/arpack-ng/pull/231/commits/856dad0aad5e6dfe4333afbede3ea36c11eabc03. Is that what you meant ?

What you’re now showing is a build on Linux, with the stage name set to “windows”. You need a os: windows setting to enable the Windows environment.

Also, your choco commands need to be put inside a check for $TRAVIS_OS_NAME == "windows" to avoid it from being run on other platforms.

@tanzislam : thanks. Replacing dist: windows with os: windows was the solution. I belived dist was equivalent to os.

Imprint