# Complete rewrite of setup-fortran, 7 compilers supported

**URL:** <https://fortran-lang.discourse.group/t/complete-rewrite-of-setup-fortran-7-compilers-supported/10893>\
**Category:** Announcements\
**Created:** [May 6, 2026, 9:47pm UTC](https://fortran-lang.discourse.group/t/complete-rewrite-of-setup-fortran-7-compilers-supported/10893 "2026-05-06T21:47:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhdao](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@minhdao](https://fortran-lang.discourse.group/u/minhdao)\
**Post date:** [May 6, 2026, 9:47pm UTC](https://fortran-lang.discourse.group/t/complete-rewrite-of-setup-fortran-7-compilers-supported/10893/1 "2026-05-06T21:47:19Z")

</div>

Hi all,

I was wondering if I could address all the issues we’re having in `fortran-lang/setup-fortran` at once by rewriting the GitHub Action from the ground up and I think it may have worked.

7 Fortran compilers are now supported:

- **gfortran** (16 to 11)
- **ifx** (2026.0.0 to 2021.1.1)
- **ifort** (2021.13 to 2021.1)
- **nvfortran** (26.3 to 20.11, now supports ubuntu-arm)
- **aocc** (5.1 to 4.1)
- **lfortran** (0.63.0 to 0.57.0)
- **flang** (22 to 16, also on ubuntu-arm and windows-arm)

We don’t have a single huge matrix anymore, instead coverage has been quite expanded and we’re running a test matrix per compiler family. This also allows us to exceed the 256 job limit as that limit is per workflow file. Every compiler has its own file now.

The installations should also be more robust as they are now actually tested (more than a “Hello World” example). The integration tests that run Fortran code are basic, but they now include module linking, the use of `iso_fortran_env`, some basic math, an implementation of polymorphism (class), c-interop with cpp and `iso_c_binding` and omp. So every entry that a green check mark means it deterministically passes all these tests (some earlier Flang and lfortran versions have been flagged out for omp and polymorphism).

If hundreds of tests are started at once, it might happen that `apt` feels like it’s being attacked, hence retries have been added. You still might get rate limiting issues if you start too many jobs at once. Caching has been added for our “big download candidates” (Intel compilers, nvfortran, aocc etc.). The first run might be slower but consecutive runs should be quite fast, however, the biggest limitation here is probably the 10 GB cache that GitHub gives you.

I tried it out in combination with `setup-fpm` and it works for me, although I think `setup-fpm` could need some love, too. Next up would probably be adding tests for BLAS/LAPACK.

The Action is written purely in TypeScript now, the Bash script is completely gone, no Python scripts whatsoever.

Please try it out and let me know if it works better for you. Please create an issue with error messages if you have any and I’ll try to address those. Feature requests are always welcome.

This will install gfortran 16 by default:

`- uses: minhqdao/setup-fortran@v1`

You can see the support matrices and options here:

> **[GitHub - minhqdao/setup-fortran: GitHub Action to set up Fortran compilers and...](https://github.com/minhqdao/setup-fortran)**
>
> GitHub Action to set up Fortran compilers and toolchains

See here for a real-world example:

> **[GitHub - minhqdao/version-f: Semantic Versioning 2.0 in Fortran](https://github.com/minhqdao/version-f)**
>
> Semantic Versioning 2.0 in Fortran

---

<div class="post-metadata">

**Author:** ![rfarmer](https://avatars.discourse-cdn.com/v4/letter/r/3d9bf3/32.png) [@rfarmer](https://fortran-lang.discourse.group/u/rfarmer)\
**Post date:** [May 8, 2026, 1:40pm UTC](https://fortran-lang.discourse.group/t/complete-rewrite-of-setup-fortran-7-compilers-supported/10893/2 "2026-05-08T13:40:39Z")

</div>

Is this just a copy to ease testing? Or a fork of the project and going forward this would stay separate to `fortran-lang/setup-fortran`?

---

<div class="post-metadata">

**Author:** ![minhdao](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@minhdao](https://fortran-lang.discourse.group/u/minhdao)\
**Post date:** [August 9, 2026, 9:47am UTC](https://fortran-lang.discourse.group/t/complete-rewrite-of-setup-fortran-7-compilers-supported/10893/4 "2026-08-09T09:47:13Z")

</div>

Update: [This GitHub Action](https://github.com/minhqdao/setup-fortran) now also supports `armflang` from the [Arm Toolchain for Linux](https://github.com/arm/arm-toolchain).

Other recent updates added support for:

- GCC 16
- IFX 2026.1.1
- LFortran 0.64.0
- LLVM Flang 22.1.8
- NVIDIA HPC Fortran 26.5
- AOCC 5.2
- armflang 22.1

You can use this GitHub Action to make sure your Fortran code and tests work across compilers, versions, architectures, and operating systems.

---

<div class="post-metadata">

**Author:** ![minhdao](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@minhdao](https://fortran-lang.discourse.group/u/minhdao)\
**Post date:** [August 22, 2026, 6:56pm UTC](https://fortran-lang.discourse.group/t/complete-rewrite-of-setup-fortran-7-compilers-supported/10893/5 "2026-08-22T18:56:30Z")

</div>

Thanks to @wpbonelli for the invite – this setup action will replace `fortran-lang/setup-fortran` as `v2`.

Test it out: `fortran-lang/setup-fortran@v2.0.0-beta.3`

PR: [Complete Rewrite: Major upgrade to `v2` by minhqdao · Pull Request #245 · fortran-lang/setup-fortran · GitHub](https://github.com/fortran-lang/setup-fortran/pull/245)
