Skip to content
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++ standards to CI config (Linux) #1992

Closed
wants to merge 2 commits into from

Conversation

alexezeder
Copy link
Contributor

For Linux workflow, I added several C++ standards with excluding unsupported/excess standard for each presented compiler.
This is related to the issue #1987.
Also, I fixed 1 compile warning (-Werror,-Wsign-conversion) for clang++ with C++17 standard, otherwise, CI build fails.

@alexezeder alexezeder force-pushed the feature/add_cpp_standard branch from c1494bc to a4cbd92 Compare November 8, 2020 20:57
standard: 20

### gcc 8
# has c++14 as default mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't mean someone won't use c++11 on gcc-8.
If resources aren't a constrain I wouldn't exclude it from checks.

Same comment for other excludes like this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just impressed by the number of configurations without any filtering.
Maybe I over-filtered them.
But I don't know if they make any sense, for example, is it possible that c++11 on gcc-8 fails while c++11 on gcc-4.8 doesn't? It can be possible of course, because of some bugs, but if we are hunting for bugs here then this config should have a huge number of configurations.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point.
However following this though, standard shouldn't be a matrix parameter.
Check default on each compiler and have separate matrix for all cpp standards tested on newest compilers only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this is a good suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I think it will be better to create a new PR with the described logic because the logic here and the logic you proposed differ. I can create it, or maybe you want to do this?

@jgopel
Copy link
Contributor

jgopel commented Nov 10, 2020

A quick note here in case this is preferred over #1999: You may want to consider disabling C++20 support on gcc-8 builds. gcc-8 only has partial support for 20 and it will never fully support it. The GCC folks have kindly documented this for us here: https://gcc.gnu.org/projects/cxx-status.html.

@alexezeder
Copy link
Contributor Author

@jgopel hmm... but C++20 on gcc-8 is disabled.

I'm closing this PR. #1999 is better because it has additional fixes.

I think the most important thing in this PR is the idea proposed by @darklukee that standard shouldn't be a matrix parameter

Following this idea I would make a configuration with several jobs inside, like:

jobs:
  cxx11:
    ...

  cxx14:
    ...

  cxx17_cxx20: # it's combined because no compilers have c++17 as default standard, better be separated
    ...

Where the cxx11 job should run on ubuntu 16.04 to use the lowest possible compilers: gcc-4.8 (also available on 18.04) and clang-3.5. Maybe instead of this prepared image, this job should use a Docker container with gcc-4.8 and clang-3.0. Why these compilers? Because the documentation says:

These are available in GCC 4.8, Clang 3.0, MSVC 19.0 (2015) and more recent compiler version. For older compilers use {fmt} version 4.x which is maintained and only requires C++98.

Off-top: what a shame that GitHub Action doesn't support YAML anchors.

@alexezeder alexezeder closed this Nov 10, 2020
@alexezeder alexezeder deleted the feature/add_cpp_standard branch November 10, 2020 15:18
@jgopel
Copy link
Contributor

jgopel commented Nov 10, 2020

@jgopel hmm... but C++20 on gcc-8 is disabled.

I totally missed the additional blocks after the gcc-4.8 block - I stand corrected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants