-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add C++ support (GCC and Clang) on all platforms #104
Comments
I would prefer to have clang-9 installed. Most people should be using the latest release. We could also have both the default |
@stevencpp , yes, I would prefer that the latest compiler (as determined by the package manager), be installed by default. Can you let me know on which OS clang-9 is available via the package manager? Thank you; I will update my issue. |
On Ubuntu I use this to install it as
and on windows I use this (takes 25 seconds):
I haven't tried setting it up on macOS yet. |
Interesting; even though Clang-9 is not in Ubuntu's 19.04 baseline APT repo, nor in macOS's Brew or MacPorts repos, nor in MSYS2's pacman repo -- I do see that these are official releases from LLVM.org. I would prefer to use latest version per the repos due to the level of integration they provide (ie: pacman under msys2 will pull in dependencies and allow most autotools packages to build - where as a standalone exe installer might be totally disconnected from the msys2 environment). I realize the trade-off here is having to wait a bit longer for the lastest version to be supported by the various operating system repositories. The main goal of this request is to allow the vast majority of open source C/C++ packages to be ./configure'd and built with either compiler (assuming the user pulls in any package-specific dependencies), as well as support the creation or modifications of similar autotools/cmake type C++ projects "out of the box". I've amended the version line in the request with a mix of this goal combined with your suggestion; thanks @stevencpp! |
Chocolatey https://chocolatey.org/packages/llvm and scoop https://github.com/ScoopInstaller/Main/blob/master/bucket/llvm.json have 9.0.0. |
@stevencpp, you've got more experience with Clang under windows than myself; thanks for all of this! I've updated the version block. I left out mentioning that Scoop or MSYS2 could be used to install Clang 9 because it seems like Chocolatey is the prefered approach (want to keep this to the "best" recommended installations only). Does it read OK now? |
Seems alright. There's a proposed llvm-toolchain-9 package for apt https://launchpad.net/ubuntu/+source/llvm-toolchain-9/1:9-2~ubuntu18.04.1 so that might land as well soon ? |
If you're going to install the latest stable GCC it would be really nice to include GFortran along with C/C++. On some package managers (Homebrew) you get gfortran and g++ with gcc (e.g., |
Good day! |
Thank you @ivan-nosar ! This will dramatically reduce our workflow times. |
Hello, All We have added GCC and Clang for Ubuntu in #369 and MacOs. We are going to add Windows support in scope of MSYS2 feature, after #355 PR will be merged. It should start rolling out early next week, once the rollout start it shows up as a pre-release here: https://github.com/actions/virtual-environments/releases After that it takes about 6-7 days to reach all accounts (assuming no delays). |
@al-cheb , excellent! Will monitor the release status and am looking forward to putting this to use. |
@krcroft FYI ubuntu and macOS images have been rolled out. |
Confirmed in the latest CI workflows. macOS:
Ubuntu:
Our package install phases have dropped from mutliple minutes to sub-60s for macOS and roughly 15s in the case of Linux! Huge win for our (personal) time and GitHub's power usage :-). Thank you @miketimofeev . |
Would it be possible to have |
Adding LLVM's clang-8 packages seems to have broken Ubuntu 18.04's clang-8 dependency chains. I have trouble with previously working tasks, such as
or
|
Hello, @dg0yt
|
@al-cheb The proposed code works for clang-tidy-8. I will test the other case later.
|
@dg0yt,
|
Failed only on windos beacuse no Is there any way to save this?
|
@GalAster it seems you need to install LLVM for Windows, otherwise I had the same error for Rust. Fixed with the following step:
|
I found
Note you'll maybe need to pass in
to subsequent actions. |
does anyone here know how to force clang to build for mac? |
@Lewiscowles1986, Could you please take a look - #658 (comment) |
Got it. I fixed last night by overriding |
Clang is installed on windows-latest, but it is not on the PATH. Any solution? I even tried installing it using choco, but I got the same error. Is there an llvm-setup action? Installing multiple LLVM versions on different operating |
@aminya Hello, x64 In order to add them into the system PATH, please follow the steps below: GitHub Actions: Azure DevOps In case of any questions, do not hesitate to contact us. |
In case of additional questions, do not hesitate to contact us, we will be glad to assist you further. I'm going to close the issue. |
It's great that a lot of clang tools are available on |
@sbeyer , in scope of this request, only base tools were installed. Feel free to create the separate request and we will consider adding |
I am curious if there any plans to support Clang 11.0 9 (and corresponding version of lld) ? |
Tool information
Tool names: defacto C++ compilers: GCC and Clang
Add or update? Add
Desired versions: Latest version available in standard package repositories. Currently these are:
Approximate size: Clang depends on GCC (that's why it often makes sense to simply install both; in addition to their technical differences). Typically the combo is a couple GB on Windows and smaller on macOS and Linux.
Brief description of packages: These C++ compilers are used to build literally every C++ autotools/cmake project out there (tens of thousands of open-source applications and tools; perhaps more on GitHub).
The main goal of this request is to allow the vast majority of open source C/C++ packages to be ./configure'd and built with either compiler (assuming the user pulls in any package-specific dependencies) "out of the box".
Homepages: GCC - https://gcc.gnu.org/, Clang - https://clang.llvm.org/
Virtual environments affected
Can they be installed during the build?
Yes. I'm currently installing the following in my workflow:
Compiling my application takes less time than installing these.
Because of this excessive time and resource usage, I made use of GitHub's new cache feature available in CI workflows, however, the cache limit is (currently) too small to save most of these development stacks.
Because it seems absurd that GitHub's cache size cannot accommodate C++ "hello world", I flagged
it here to which GitHub staff member @chrispat suggested that I shouldn't be caching C++ dependencies and instead they should be available in the baseline VMs.
Are you willing to submit a PR?
Yes
The text was updated successfully, but these errors were encountered: