-
Notifications
You must be signed in to change notification settings - Fork 9
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 CircleCI template #28
Conversation
79ebff7
to
3db4713
Compare
It seems to me that there are differences with the other CI templates that should not be specific to CircleCI like the use of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Zimmi48 @liyishuai (sorry for late reply)
It seems to me that there are differences with the other CI templates that should not be specific to CircleCI like the use of
extra-dev
Indeed. Actually the extra-dev
repo (as well as core-dev
) is already included in coqorg/coq:dev
based images, while coqorg/coq:latest
and other stable images only contain released
.
I see no objection of adding extra-dev
as well in other templates (e.g. in this PR as well) because I guess the master branch of some coq-community repos could have some dependency in extra-dev
(even if maybe this situation did not occur up to now).
and the coinstability testing. Should we also add these to the other templates?
Regarding coinstability testing:
- if we want to merge that feature, indeed the templates for Travis/CircleCI/GitHub-Actions should be consistent and updated accordingly.
- However I'm a bit split on merging this feature, because unlike e.g. Coq's CI, this test is not really "reproducible", as (i) the packages to be tested are not specified, (ii) if one of an un-specified coinstallable package is not compatible and no release comes up to fix the build test, basically the build will always fail.
So I'd suggest to:
- add a line
opam repository add --all-switches --set-default coq-extra-dev https://coq.inria.fr/opam/extra-dev
in all templates (I suggest to add the--set-default
CLI flag) - remove the code
if ! [ -z "$PACKAGES" ]; then opam install -t $PACKAGES; fi
(or at least, comment-out this code and document its drawbacks)
Also, as mentioned in the original post, the script |
config.yml.mustache
Outdated
- checkout | ||
- run: | ||
name: Pull submodules | ||
command: git submodule update --init --remote |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this yet another subtle difference between this template and the other CI templates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so… Maybe adding this git submodule
part is unneeded for the default coq-community templates? at least for the time being (IMHO the three CI templates should be as close as possible semantically one from the other, and later on other PRs could just as well add features that enhance them, in a row?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis CI clones Git submodules by default. I've added submodule for GitHub Actions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK! have you checked that this is exactly that command triggered by Travis for git submodule cloning?
(I'm not very submodule-savvy, but e.g. this blog https://mgalgs.github.io/2014/07/03/git-submodule-update-init-remote-recursive-considered-harmful.html mentions the following commands: git submodule update --init --recursive; git submodule update --remote
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis uses git submodule update --init --recursive
. Should I just drop --remote
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe yes − this option is documented here:
https://git-scm.com/docs/git-submodule#Documentation/git-submodule.txt---remote ;
it appears to be related to remote-tracking branches (which would be a bit off-topic in the context of CI builds?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this complies with the doc of GitLab CI as well:
https://docs.gitlab.com/ee/ci/git_submodules.html#using-git-submodules-in-your-ci-jobs
so git submodule update --init --recursive
seems the way to go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(actually the GItLab CI page I mentioned suggests two lines)
git submodule sync --recursive
git submodule update --init --recursive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, the fact to add an option ci_test_dependants
@liyishuai do you plan to add a similar script in Travis / GitHub Actions templates? or in a later PR.
Added to Travis.
|
Hi @liyishuai
Good point. So this can be done in a later PR maybe, indeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liyishuai the PR LGTM, thanks! (you just might want to further simplify the opam-list command to PINS=$(opam list -s --pinned --columns=package | xargs | tr ' ' ,)
, but that's a detail)
Resolve #1
Todo
generate.sh