Skip to content

Clang / LLVM

How json2vars-setter handles Clang / LLVM, and how the example workflow provisions it.

json2vars-setter integration

Item Value
Matrix JSON key versions.clang
Action output versions_clang
Dynamic-update strategy input clang-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": {
    "clang": [
      "20.1.8",
      "19.1.7"
    ]
  }
}

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

Field Version
stable 21.1.8
latest 22.1.8

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

Setup action (example workflow)

clang_test.yml provisions Clang / LLVM with the matrix value json2vars-setter produced:

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

Note: aminya/setup-cpp is the de-facto cross-platform compiler installer (no official Clang setup action exists); it exports CC/CXX pointing at the installed LLVM clang. The C++ standard (-std=c++20, ...) is a static list you hand-write in the matrix JSON - it needs no fetcher.

References