Comments (4)
After looking through the github action CI, I found out that the git submodule failed to clone into external/doctest
where it later led to errors in cmake. As indicated by the messages in logging:
Successful run:
Run auth_header="$(git config --local --get http.https://github.com/.extraheader)"
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
Submodule 'external/doctest' (https://github.com/onqtam/doctest.git) registered for path 'external/doctest'
Cloning into '/home/runner/work/cpp-project/cpp-project/external/doctest'...
Submodule path 'external/doctest': checked out '503de03ee2cbbfc58c2063dce36dc96f917f2da3'
Failed run (without git submodule)
Run auth_header="$(git config --local --get http.https://github.com/.extraheader)"
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
shell: /bin/bash --noprofile --norc -e -o pipefail {0}
from cpp-project.
Hi!
Thanks for reporting this. Submodules in git always cause issues. Still, I realize it is not made as clear as it should that you need submodules for the build to work. I also noticed that the setup.sh
script could fail under some versions of sh
(I changed computer, and now it fails) due to me using bash
syntax. This would cause the submodule stuff to be skipped.
I've made some changes to both the README and the setup script to improve this (#22). It seems to do the trick, at least on my machine.
In summary: When cloning, use git clone --recurse-submodules <url>
. If you already cloned without, it should be enough to do git submodule update --init --recursive
. But the safest is to clone the "right" way.
Hope it helps!
from cpp-project.
Thanks a lot for the tips, forgot to mention the setup.sh
but great that you fixed it!
I would suggested made some twists in the github action as checkout support recursive when cloning
So the modified workflow would start with:
- uses: actions/checkout@master
with:
submodules: true
It works on other example but I have no luck with that since they just merged it into master branch 4 days ago. But textbook/git-checkout-submodule-action@master
should works in theory
from cpp-project.
Thanks for the input about the simplified action - I don't remember where I got the code I use now, but in any case this is cleaner. It works fine. As soon as all the CI checks complete I'll merge the PR and master
should be good to go.
from cpp-project.
Related Issues (17)
- mvcc and icc support? Visual studio support HOT 2
- Error: with linker (template class) HOT 3
- Convert this repository into template repository HOT 1
- Typos in CMakeLists.txt HOT 5
- C++20 modules
- fatal error: doctest.h: No such file or directory HOT 2
- Add code format target HOT 1
- Fail build after use template on init commit HOT 1
- Create a Website for this Repo HOT 1
- CMake minimum version HOT 1
- No rule to make target 'doc' HOT 2
- How to integrate Conan HOT 1
- doctest - verbose information after `make test` HOT 1
- Humble request for help HOT 1
- node.js 12/16 warnings
- Code Coverage fails in Mac OS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp-project.