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

Detect compiler version from gcc output if not specified. #686

Merged
merged 9 commits into from Oct 30, 2022

Conversation

Spacetown
Copy link
Member

This PR selects the latest GCC version on the system for the tests. If only gcc is available the version is detected from the output of gcc --version.

If using qa_compiler session the default is switched from gcc-5 to gcc-11 (the current latest version for the reference data).

@Spacetown Spacetown added Type: Enhancement QA related to testing, build infrastructure, etc labels Oct 24, 2022
@Spacetown Spacetown added this to the Upcoming release milestone Oct 24, 2022
@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Base: 95.22% // Head: 95.22% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (f059af0) compared to base (28e5c88).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #686   +/-   ##
=======================================
  Coverage   95.22%   95.22%           
=======================================
  Files          24       24           
  Lines        3495     3498    +3     
  Branches      615      615           
=======================================
+ Hits         3328     3331    +3     
- Misses         94       95    +1     
+ Partials       73       72    -1     
Flag Coverage Δ
ubuntu-18.04 ?
ubuntu-20.04 94.13% <ø> (?)
windows-2019 94.90% <ø> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gcovr/tests/test_gcovr.py 97.72% <ø> (ø)
gcovr/gcov.py 74.54% <0.00%> (-1.46%) ⬇️
gcovr/writer/html.py 95.29% <0.00%> (ø)
gcovr/utils.py 91.21% <0.00%> (+2.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Spacetown Spacetown requested a review from latk October 24, 2022 20:02
Copy link
Member

@latk latk left a comment

Choose a reason for hiding this comment

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

Thank you for working on this! A couple of minor comments though.

Do the changes to the compiler selection interact with the set_environment() function?

FYI, the Github Actions logs are full of deprecation warnings, we should eventually address those. This is actually partially related to the GCC version problem since the Actions rely on some really ancient Ubuntu versions in order to install some compilers.

CHANGELOG.rst Outdated Show resolved Hide resolved
CONTRIBUTING.rst Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
@Spacetown
Copy link
Member Author

The following warnigng is not resolvable yet since PR seanmiddleditch/gha-setup-ninja#15 is still open.

Node.js 12 actions are deprecated. For more information see: 
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. 
Please update the following actions to use Node.js 16: seanmiddleditch/gha-setup-ninja

@Spacetown Spacetown force-pushed the detect_gcc_version branch 3 times, most recently from 8018369 to f5cc5d6 Compare October 25, 2022 20:12
@Spacetown
Copy link
Member Author

@latk Most warnings are fixed but the following warning I don't understand:

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files.
For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

We don't use set-output we only use the environment files linked in the information linked above. In this documentation following syntax is used:

echo "VARIABLE=MyValue" >> $GITHUB_ENV

But we use a different quoting since a long time:

echo VARIABLE="MyValue" >> $GITHUB_ENV

With the quoting from the documentation it doesn't work. The environment isn't set.

@Spacetown Spacetown merged commit c83215a into gcovr:master Oct 30, 2022
@Spacetown Spacetown deleted the detect_gcc_version branch October 30, 2022 20:42
Spacetown added a commit to Spacetown/gcovr that referenced this pull request Nov 5, 2022
Since gcovr#686 the command `python3 -m nox -s 'docker_qa_compiler(all)' --reuse-existing-virtualenvs -- --update_reference` is working from newest to oldest version of compiler. Now the reuse of the test data doesn't work anymore.
Only the detection of the compiler shall use the newest one, all other commands shall start with oldest version first.
Spacetown added a commit that referenced this pull request Nov 16, 2022
* Fix update of reference for all compilers:

Since #686 the command `python3 -m nox -s 'docker_qa_compiler(all)' --reuse-existing-virtualenvs -- --update_reference` is working from newest to oldest version of compiler. Now the reuse of the test data doesn't work anymore.
Only the detection of the compiler shall use the newest one, all other commands shall start with oldest version first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA related to testing, build infrastructure, etc Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants