Setup Clang
Set up a specific version of a Clang compiler and add it to the PATH. In most workflows, this is used as an auxiliary action for the setup-cpp action.
This allows us to test a C++ library with any Clang version, and not only the versions circumstantially provided by apt-get.
This action uses a number of alternatives to find or install Clang:
-
The Clang path provided to 'path'
-
Any other version of Clang it can find in the system
-
Any other version of Clang available from APT
-
A version of Clang from our own binary releases
Input Parameters
Parameter |
Description |
Default |
|
Version range or exact version of Clang to use, using SemVer’s version range syntax. By default, it uses any version available in the environment. . |
|
|
The clang or clang++ executable. We attempt to find Clang at this path first. |
|
|
Used to specify whether the Clang installation should be cached in the case Clang needs to be downloaded." . |
|
|
The target architecture (x86, x64). By default, this value is inferred. . |
|
|
By default, when Clang is not available, this action will install the minimum version in the version spec. This ensures the code respects its contract in terms of what minimum Clang version is supported. Set this option if you want the action to check for the latest available version that satisfies the version spec instead. . |
|
|
Set this option if you want the action to update environment variables. |
|
|
Trace commands executed by the workflow. |
|
Outputs
Output |
Description |
|
The absolute path to the clang executable. |
|
The absolute path to the clang++ executable. |
|
The absolute path to the Clang directory containing the executable. |
|
The installed Clang version. Useful when given a version range as input. |
|
The installed Clang version major. Useful when given a version range as input. |
|
The installed Clang version minor. Useful when given a version range as input. |
|
The installed Clang version patch. Useful when given a version range as input. |
|
A boolean value to indicate a cache entry was found |