Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Set up GitLab/Travis CI #105

Closed
dzhoshkun opened this issue May 28, 2018 · 22 comments
Closed

Set up GitLab/Travis CI #105

dzhoshkun opened this issue May 28, 2018 · 22 comments

Comments

@dzhoshkun
Copy link
Collaborator

dzhoshkun commented May 28, 2018

Related to https://cmiclab.cs.ucl.ac.uk/CMIC/NiftyNet/issues/269

We should set up CPU-only CI tests on Travis until a long-term solution for GPU testing has been found.

@dzhoshkun
Copy link
Collaborator Author

dzhoshkun commented May 28, 2018

  • would the Travis matrix work for the different scripts currently available?

@dzhoshkun
Copy link
Collaborator Author

@tomdoel
Copy link
Contributor

tomdoel commented May 29, 2018

For the ImageSplit project, I wanted to avoid different testing paths for travis, gitlab-ci and local testing. So I set up tox.ini to do most of the CI steps using virtualenvs, and then configured .travis.yml and .gitlab-ci.yml to run the tests using the tox command. Another advantage is I can run any of the CI stages locally; e.g. tox will run all the tests; tox -e lint will run the linting etc.

@dzhoshkun
Copy link
Collaborator Author

@tomdoel Thanks for letting me know! This looks quite useful for avoiding duplication. Do you have any failing tests? I'd like to see what the log looks like. In the past I had difficulties tracing problems in failing CI builds when running the CI commands e.g. off a shell script. I wonder whether tox provides more useful output in such cases.

@tomdoel
Copy link
Contributor

tomdoel commented May 30, 2018

A failing test example with tox: https://cmiclab.cs.ucl.ac.uk/GIFT-Surg/ImageSplit/-/jobs/42111

@dzhoshkun
Copy link
Collaborator Author

dzhoshkun commented May 30, 2018

  • configure tox: sample only!
  • set up Travis to use tox script
  • consider opening a new issue for translating the existing CI scripts to tox (or maybe multiple issues, with one for each part)

@dzhoshkun
Copy link
Collaborator Author

dzhoshkun commented May 30, 2018

  • testenv:lint not run

dzhoshkun pushed a commit that referenced this issue May 31, 2018
@dzhoshkun
Copy link
Collaborator Author

dzhoshkun commented May 31, 2018

  • revert above commit (tox-lint)

dzhoshkun pushed a commit that referenced this issue May 31, 2018
dzhoshkun pushed a commit that referenced this issue May 31, 2018
@dzhoshkun
Copy link
Collaborator Author

redefined-variable-type was deprecated already in 2017, might have just been removed by now.

@dzhoshkun
Copy link
Collaborator Author

redefined-variable-type became an extension (unavailable by default) as of pylint 1.7

dzhoshkun pushed a commit that referenced this issue Jun 4, 2018
dzhoshkun pushed a commit that referenced this issue Jun 4, 2018
dzhoshkun pushed a commit that referenced this issue Jun 5, 2018
@dzhoshkun
Copy link
Collaborator Author

dzhoshkun commented Jun 5, 2018

@wyli As of bdc6655, Travis CI is set up and the pylintjob and quicktest sections of GitLab CI have been translated to Travis CI. You can actually click the red cross next to the commit hash above and see the result for yourself 😄

There are two issues, though:

  • I haven't been able to get pylint to run, mainly due to version incompatibilities (current version: 1.9.1, on Adelie we have 1.5.2)
  • But the actual problem is that it takes about 30 mins to run even the quicktest section, due to the absence of GPU computing on Travis.

@wyli
Copy link
Member

wyli commented Jun 5, 2018

@dzhoshkun Looks nice! I'll send you a merge request to fix the pylint tests (we could take this opportunity to disucss/test the new workflow for contributors #98 ).

@dzhoshkun
Copy link
Collaborator Author

There seems to be another, (given the current setup) possibly easier, way to continue testing with our custom hardware (since GitLab v10.6 on 22 March as far as I can see).

@dzhoshkun
Copy link
Collaborator Author

dzhoshkun commented Jun 6, 2018

@dzhoshkun
Copy link
Collaborator Author

@wyli @tomdoel I've managed to set up GitLab CI for one of my personal projects on GitHub, running its CI pipelines on Adelie. For the result, please see this commit (click the green tick!) and also this PR showing "All checks passed".

For the record, this feature has been around for a while, but involved a manual setup, and did not transmit the CI pipeline result back to GitHub.

Also for the record, I've imported the project not from CmicLab to GitLab, but from GitHub to GitLab. Mentioning this explicitly, as currently there seems to be an issue exporting projects from CmicLab.

@wyli
Copy link
Member

wyli commented Jun 7, 2018

Cool, looks like a feasible solution for GPU tests.

@wyli
Copy link
Member

wyli commented Jul 10, 2018

Sometimes CI runner couldn't find pylint command (https://gitlab.com/NifTK/NiftyNet/-/jobs/80703023) any idea?

@wyli wyli changed the title Set up Travis CI Set up GitLab/Travis CI Jul 11, 2018
@wyli wyli closed this as completed in 74f75ec Jul 12, 2018
wyli added a commit that referenced this issue Jul 12, 2018
Merging GitHub pr 132; closes #120, closes #136, closes #105, closes #98.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants