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
Gl-CI integration for master #84
Conversation
2eb663b
to
7d9b0b3
Compare
89ea12c
to
ac66ba6
Compare
…er of DF: - mapgen dest dir needs to be created (according to cpt2CD dir structure)
ac66ba6
to
bdc7ef5
Compare
https://gitlab.com/gitlab-org/gitlab-ce/issues/14728#note_23441832 - ctp2CD/ copy done in install stage such that stages before are compatible with travis docker build, results in one additional layer in the final DI (incr. DI download size) - curl not installed by default - CI_API_V4_URL == https://gitlab.com/api/v4/
bdc7ef5
to
8e3e39f
Compare
OK, jobs succeed on travis and on GL. Took me half a day to get the various incantations right. @MartinGuehmann If you consider accepting this PR, you will need to create an account on GL for the user This shall be my last ctp2 contribution for at least this year... |
I created the user account civctp2.
I haven't created the project, yet. I can import something from an existing project. I just don't know what populate from GitHub mean. Is it important stuff from https://github.com/civctp2/civctp2/? And if yes, what to import?
I think this is clear.
I think, I have seen that option on GitHub.
Here, I have to see what this is, but I think I will ask when I am there.
So when I merge I don't have to worry about this anymore, I guess.
That's a pitty @LynxAbraxas, but well I consider the feedback about this as part of the contribution. |
That's great!
You can either use the import function in the GL UI, or you can just create an empty civctp2 project and push your local civctp2 clone to GL like:
Same for ctp2CD/.
Not on GH but GL because the artifact is downloaded in the GL-CI environment.
I will try to give feedback, just don't expect it regularly nor soon. |
I would say as long as we get it done, eventually: This must be good enough. :D |
I think that I set it up except, that it did not download the CD. But that could be because, I followed your instructions in the order of appearance. I guess I had to create ARTIFACTKEY before I had cloned ctp2CD. |
Did GL create an artifact for ctp2CD after you cloned that? @MartinGuehmann can you invite me under GitLab to the civctp2 repos as a reporter or above, so I can take a look? |
I don't think it created the artifact. Anyway, I invited you as reporter. I would also you give you access above, but since you don't wanna be sucked in more, I went for reporter. I also noticed that the civctp2 project was created public, I should have fixed that. The ctp2CD project was created private as it should be. |
Thanks @MartinGuehmann. So far I can only see civctp2, so I could not check if an artifact was created for ctp2CD. Did you invite me as a reporter also for ctp2CD?
and then check, if there is a pipeline started for |
Actually, I found the problem, since it is a bit confusing, I cloned https://github.com/LynxAbraxas/ctp2DF/, as a private project. The other thing is as far as I can see I can only add projects to the civctp2 account if I login as civctp2. Since, you did not grant access to civctp2, I cannot see the private projects. Well, as MartinGuehmann, I could get the repository file from your GitLab account. I used the URL for importing, which is what it is doing right now. Actually, I expected a password and a username since I imported it as civctp2. Well, let's see if it is just that. |
I can see that GL picked up the merge of the last PR. @MartinGuehmann were you now able to clone ctp2CD? Could you give me reporter status for that as well? |
I could create the project, and give you reporter status. But so far as I can see it fails to import it, I gave the credentials of civctp2 as the manual says. So right now it is important, we will see whether it did import it. |
Thanks @MartinGuehmann, I can see the ctp2CD project now, but it does not contain the repository, so no artifact gets created. Perhaps try it manually with:
|
So I used those commands manually. It didn't like the combination of the --all and --tag flag, so I left out --tag. And I had to set a password on GitLab, so far I logged in via GitHub. It didn't copy that automatically. |
That worked well, the ctp2CD artifact is there: So now only the commits of this PR are missing in https://gitlab.com/civctp2/civctp2/
and you should see a pipeline started under CI-CD: |
Not essential, but can be mended with: 7ef24e9 In regard to #94 (comment) When you merge this PR, the pipeline should run again and populate the DIs for the master branch under: https://gitlab.com/civctp2/civctp2/container_registry If you have docker set up on your local machine, you should then be able to run the DIs locally with e.g.: Which expects the OGGs in ~/ctp2OGGs/ and the videos converted as described here: Lines 254 to 263 in c2dafb8
If the DI does not exist locally docker will pull the image from the GL registry, for that you need to be logged in with docker login -u civctp2 registry.gitlab.com . If the DI exists locally, docker will not check whether a newer DI exists when useing docker run instead used docker pull registry.gitlab.com/civctp2/civctp2/master:latest for that. docker images lists your local images.
As it basically seem to work now, I'd say the PR is ready to go in. |
Then, let's merge. |
Pipeline for master started and nearly finished, only |
Once was enough. Is there an error log to see what it is? |
Thanks @MartinGuehmann, seems to work as expected now. See e.g. |
Should be f8f1c59. (Interesting, the preview eats the final 4.) As far as I can see, it only test master, but not any pull request branches. The GitLab project seems only to mirror master and not any branches or pull requests, either, unless they get merged. |
Yes, each job of a pipeline has its own log (and artifacts) like |
@MartinGuehmann were you able to run ctp2 from the GL DI locally on your PC, as described above in #84 (comment)? |
@MartinGuehmann you can see the CI minutes used so far for the month under https://gitlab.com/profile/pipeline_quota if logged in as civctp2. |
Well it says, unlimited minutes and that the project does not use any shared runners. Which is I guess why that is unlimited. I haven't tried to run the docker image locally, I guess the advantage is that it does not consume server minutes. And that's why it just tests the merges, than the pull requests, too. |
Odd, top left of
Running the DI locally does not correspond to running the GL-CI pipeline and its jobs! You would not have a DI from GL without the GL-CI pipeline (you would have to run docker build from the build job first). Running the DI locally is for testing the readily built cpt2 more extensivily or specificly than the automatic test do, e.g. for /rnd or /wd or the video playing.
Well, GL mirrors GH and that only includes branches and tags that you get with git fetch or git clone but that does not include PR and their branches, so GL does not see the commits of a PR until they are merged into the main repos. You can force testing a PR similar to #84 (comment):
|
@MartinGuehmann be aware that the GL-CI tests are language sensitive! I just stumbled into this trap, i.e. if you ever change https://gitlab.com/civctp2/ctp2CD to use another language than English some tests of civctp2 will fail and some not. The GL-CI configuration of civctp2 is such that it uses the latest artifact from ctp2CD. |
I must read the damn thing, we have used up 7%, which I find already quite a lot. But that should be manageable.
With the quota in mind, I would restrict it to merge commits and won't use it for the other branches. I assume ones we have exhausted the quota it won't just run anymore.
What tests are that in particular, as far as I can see we have now the full set of text files and ldl files (except for Japanese), for English and German we also have the sound files. So I would expect that only playing sound would fail. And right now I am not aware that it is testing sound, of course I could be wrong. |
Further runs should use less due to the caching from previous docker images in the build job, though compilation time is still quite significant, but e.g. pulling packages for the base system will come from the cache as long as there is no newer base image.
Yes, until the 1st of the next month when the 2000 are refreshed.
Those where the button text changes with the language;-) like Cancel <-> Abbrechen. It also depends on how strict Sikuli is configured to match the reference image. For example the start-game test succeeds if the the start screen (https://github.com/civctp2/civctp2/blob/f8f1c594c4edd1b10067b40d009212e12d343605/tests/ctp2start-scr.png) is visible
The overall image is quite large so the actual text and the compile date in the ref-image does not matter. In play-game_build-city, there are quite a view small and similar buttons in the build manager, so sikuli needs to be told to use a high similarity for finding the pattern (
No sound test so far, was intending to do so with #104. |
Well, then I will just go on as I see fit and then see.
That explains a lot, and you can't just click at a certain position of the screen, since these buttons always appear at the same spot of the screen, at least after a restart without moving the windows. |
Just noticed with https://gitlab.com/civctp2/civctp2/pipelines/charts that the pipeline for f8f1c59 took longer than that for e0edb94. Taking a look at the job logs (https://gitlab.com/civctp2/civctp2/-/jobs/167301425/raw and https://gitlab.com/civctp2/civctp2/-/jobs/170573090) shows that the pipeline for f8f1c59 pulled in a newer base image of ubuntu (as expected with Line 26 in e0edb94
@MartinGuehmann for that case it is good to have a monthly schedule, just add one at https://gitlab.com/civctp2/civctp2/pipeline_schedules. That will then run a pipeline that tests if the whole docker config is still compatible with the newest ubuntu:18.04 DI and following pipelines will have a valid cache regarding the new base. |
In regard to #68, this PR integrates the configuration for GL-CI from https://github.com/LynxAbraxas/ctp2DF/ into https://github.com/civctp2/civctp2 to enable automated GUI-smoke tests for new commits (possibly only for master).
It is adjusted to avoid git submodules and use GL-CI artifacts for providing
ctp2CD/
instead.