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

Fix CI issues #3906

Merged
merged 3 commits into from
Jan 31, 2023
Merged

Fix CI issues #3906

merged 3 commits into from
Jan 31, 2023

Conversation

barcode
Copy link
Contributor

@barcode barcode commented Jan 4, 2023

I looked a bit at the ci_test_compilers_clang (10) issue.
This PR did not change the affected test and it worked in earlier builds.

It seems the compiler and changed to a newer version.

old:

Compiler: clang version 10.0.0; Target: x86_64-unknown-linux-gnu; Thread model: posix; InstalledDir: /usr/local/bin

new:

Compiler: Debian clang version 10.0.1-++20210313014605+ef32c611aa21-1~exp1~20210313125208.190; Target: x86_64-pc-linux-gnu; Thread model: posix; InstalledDir: /usr/bin

Pull request checklist

Read the Contribution Guidelines for detailed information.

  • [ x] Changes are described in the pull request, or an existing issue is referenced.
  • The test suite compiles and runs without error.
  • [x ] Code coverage is 100%. Test cases can be added by editing the test suite.
  • [x ] The source code is amalgamated; that is, after making changes to the sources in the include/nlohmann directory, run make amalgamate to create the single-header files single_include/nlohmann/json.hpp and single_include/nlohmann/json_fwd.hpp. The whole process is described here.

@coveralls
Copy link

coveralls commented Jan 4, 2023

Coverage Status

Coverage: 100.0%. Remained the same when pulling 03f655d on barcode:fix_ci_issue into da6b908 on nlohmann:develop.

@barcode
Copy link
Contributor Author

barcode commented Jan 4, 2023

The error makes it pretty clear that libstdc++-8 is used.

/usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/fs_path.h

but span is only supported starting with libstdc++-10.

I guess the old version of the docker container had this or a more recent version installed, but i can't confirm, since i don't know how to get the old version of the image.

@github-actions github-actions bot added M and removed S labels Jan 4, 2023
@github-actions github-actions bot added S and removed M labels Jan 4, 2023
@barcode barcode changed the title Fix issue of ci_test_compilers_clang (10) Fix CI issues Jan 5, 2023
@barcode barcode mentioned this pull request Jan 5, 2023
2 tasks
@barcode barcode force-pushed the fix_ci_issue branch 2 times, most recently from 57affc6 to 13c1ce8 Compare January 10, 2023 23:22
@nlohmann nlohmann linked an issue Jan 14, 2023 that may be closed by this pull request
2 tasks
@barcode barcode force-pushed the fix_ci_issue branch 2 times, most recently from 6820780 to d278b97 Compare January 14, 2023 16:28
@barcode
Copy link
Contributor Author

barcode commented Jan 14, 2023

@nlohmann
To get cirrus working you need to add their app to the repo. (I don't have the permissions to do this)

Also the .cirrus.yml has to be in the root dir of the repo.

@barcode barcode force-pushed the fix_ci_issue branch 4 times, most recently from 41cb3c3 to fe470ad Compare January 15, 2023 07:27
@barcode
Copy link
Contributor Author

barcode commented Jan 15, 2023

It seems filesystem in libstdc++-8 does not really work when linking (even though -lstdc++fs is set):

https://github.com/nlohmann/json/actions/runs/3922291644/jobs/6705139818

  [148/166] : && /usr/bin/clang++ -g -lstdc++fs tests/CMakeFiles/test_main.dir/src/unit.cpp.o tests/CMakeFiles/test-regression2_cpp20.dir/src/unit-regression2.cpp.o -o tests/test-regression2_cpp20   && :
  FAILED: tests/test-regression2_cpp20 
  : && /usr/bin/clang++ -g -lstdc++fs tests/CMakeFiles/test_main.dir/src/unit.cpp.o tests/CMakeFiles/test-regression2_cpp20.dir/src/unit-regression2.cpp.o -o tests/test-regression2_cpp20   && :
  ...
  /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/fs_path.h:184: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
  ...
  /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/fs_path.h:545: undefined reference to 

To fix this we would need to build out own version of libstdc++ (there are no backports for debian buster). I deactivated filesystem for ci_test_compilers_clang (10), since building libstdc++ would take a lot of time in the runner.

Now we only need to finish replacing drone with cirrus. (Since cirrus is currently deactivated, I reactivated drone to prevent the checks from succeeding.)

@nlohmann
Copy link
Owner

@nlohmann To get cirrus working you need to add their app to the repo. (I don't have the permissions to do this)

I just did this.

Also the .cirrus.yml has to be in the root dir of the repo.

This should be done after merging, right?

@barcode
Copy link
Contributor Author

barcode commented Jan 29, 2023

I just did this.

Ok, now i have to figure out why cirrus does not want to build this branch...

This should be done after merging, right?

This will be done by this PR. It was meant as an explanation why the cirrus file is not placed in .github/external_ci.

@barcode
Copy link
Contributor Author

barcode commented Jan 29, 2023

There is clearly some strangeness going on with cirrus. If i change the file and already have the cirrus repo page open It gets updated with an entry:
Screenshot from 2023-01-29 21-35-00

When clicking on it i get a not found error and on reloading it disappears.

@nlohmann Maybe there is some setting you can change. (not sure what it would be, but maybe the repo setting Require approval for builds from users without write permissions is activated)

Just in case you do not find some setting, I will try to contact the cirrus support. Maybe they can help.

@nlohmann
Copy link
Owner

There is clearly some strangeness going on with cirrus. If i change the file and already have the cirrus repo page open It gets updated with an entry: Screenshot from 2023-01-29 21-35-00

When clicking on it i get a not found error and on reloading it disappears.

@nlohmann Maybe there is some setting you can change. (not sure what it would be, but maybe the repo setting Require approval for builds from users without write permissions is activated)

Just in case you do not find some setting, I will try to contact the cirrus support. Maybe they can help.

This is how it looks like:

image

I switched on Require approval for builds from users without write permissions. Let me know if I should try anything else.

@barcode
Copy link
Contributor Author

barcode commented Jan 30, 2023

At least now the build job stays in https://cirrus-ci.com/github/nlohmann/json instead of disappearing again.
I tried setting it up in my fork, but there i got the same issues. The builds disappear (even a manually triggered one.
Maybe it has something to do with the current issues with github actions:
https://www.githubstatus.com/

Investigating - We are investigating reports of degraded performance for Actions.
Jan 30, 2023 - 12:07 UTC

@barcode
Copy link
Contributor Author

barcode commented Jan 30, 2023

@nlohmann can you try approving one of the jobs listed on https://cirrus-ci.com/github/nlohmann/json? Maybe this fixes some strangeness in their back end.

/edit
Ok, i figured it out..
I accidentally named the file ' .cirrus.yml' (there was a space at the start of the file name) and this confused cirrus-ci.
Now the jobs do not disappear anymore.
@nlohmann can you turn of require approval?
I will fix the pipeline for cirrus.

@nlohmann
Copy link
Owner

Done. I approved three builds and then turned off approvals.

@barcode
Copy link
Contributor Author

barcode commented Jan 30, 2023

Great it seems like we finally have a working CI again.
Now this PR is ready for review.

Copy link
Owner

@nlohmann nlohmann left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@nlohmann nlohmann added this to the Release 3.11.3 milestone Jan 31, 2023
@nlohmann nlohmann merged commit 233d233 into nlohmann:develop Jan 31, 2023
@nlohmann
Copy link
Owner

Thanks a lot!!!!!

@raphael-grimm raphael-grimm deleted the fix_ci_issue branch August 4, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check Drone CI
3 participants