Skip to content

GCC

How json2vars-setter handles GCC, and how the example workflow provisions it.

json2vars-setter integration

Item Value
Matrix JSON key versions.gcc
Action output versions_gcc
Dynamic-update strategy input gcc-strategy (stable / latest / both)
Version source see Version Sources

Supported runners

The example matrix runs on Ubuntu / macOS:

ubuntu-latest, macos-latest

Any GitHub-hosted runner the setup action supports also works - the OS list is just the os array in your matrix JSON.

Supported versions

Example matrix (what the example workflow runs):

1
2
3
4
5
6
7
8
{
  "versions": {
    "gcc": [
      "14",
      "13"
    ]
  }
}

Latest values tracked by the dynamic-update tooling (auto-refreshed from the release APIs into the version cache):

Field Version
stable 15.3.0
latest 16.1.0

Cache last updated: 2026-06-24T12:28:47.597015.

Setup action (example workflow)

gcc_test.yml provisions GCC with the matrix value json2vars-setter produced:

1
2
3
4
- name: Set up GCC ${{ matrix.gcc-version }}
  uses: aminya/setup-cpp@v1.10.1
  with:
    compiler: gcc-${{ matrix.gcc-version }}

Note: aminya/setup-cpp installs a specific GCC and exports CC/CXX. GCC's packaging is by major version, so the example matrix pins majors.

References