30ef728·Author: Joseph Parker·Closed by: Peter Hill·2018-10-11
Description
This is a minimally functional version of CI using Bitbucket pipelines. The GS2 repo is now set up so that commits to any branch containing the file bitbucket-pipelines.ymlwill trigger the pipeline. This builds and runs the tests, and reports back failures. At the moment, not all tests pass, so this branch is marked with a red exclamation mark (fixing tests happens in other branches).
This is really only a starting point, but I’m making the PR now because:
it will be useful to have CI when fixing the test suite; and
improving it requires design choices that I’d like some help with!
Notes:
This PR includes all the changes from PR 7, the branch git_info.
This PR requires the makefile Makefile.bitbucket which is in the automated-testing Makefile branch. The test script currently checks out this branch.
This PR requires changes to utils from the git_info branch. Again, the test script checks out this branch.
The pipeline currently uses an image from my dockerhub, currently Ubuntu with gfortran-8. Setting up images for other OS/compilers is relatively straightforward, and switching between them/running tests with multiple images is also possible by setting up the bitbucket-pipelines.ymlfile. Using an image saves ~5 mins per pipeline compared to downloading and installing the necessary compilers and libraries every time. We should probably investigate getting a “gyrokinetics” Dockerhub account, rather than using a personal account.
Test passes and fails are reported in xml files in the folder test-results (this is the directory name that Bitbucket looks for to parse the results). The results files are a bit hacky, and also get overwritten if there is more than one test in a directory. Fixing this involves reworking Makefiles and bash scripts - I don’t want to do this, particularly if the approach to testing is going to be overhauled in the near future. We might choose to write the infrastructure in a more maintainable language…
This is a minimally functional version of CI using Bitbucket pipelines. The GS2 repo is now set up so that commits to any branch containing the file
bitbucket-pipelines.yml
will trigger the pipeline. This builds and runs the tests, and reports back failures. At the moment, not all tests pass, so this branch is marked with a red exclamation mark (fixing tests happens in other branches).This is really only a starting point, but I’m making the PR now because:
it will be useful to have CI when fixing the test suite; and
improving it requires design choices that I’d like some help with!
Notes:
This PR includes all the changes from PR 7, the branch git_info.
This PR requires the makefile
Makefile.bitbucket
which is in the automated-testing Makefile branch. The test script currently checks out this branch.This PR requires changes to utils from the git_info branch. Again, the test script checks out this branch.
The pipeline currently uses an image from my dockerhub, currently Ubuntu with gfortran-8. Setting up images for other OS/compilers is relatively straightforward, and switching between them/running tests with multiple images is also possible by setting up the
bitbucket-pipelines.yml
file. Using an image saves ~5 mins per pipeline compared to downloading and installing the necessary compilers and libraries every time. We should probably investigate getting a “gyrokinetics” Dockerhub account, rather than using a personal account.Test passes and fails are reported in
xml
files in the foldertest-results
(this is the directory name that Bitbucket looks for to parse the results). The results files are a bit hacky, and also get overwritten if there is more than one test in a directory. Fixing this involves reworking Makefiles and bash scripts - I don’t want to do this, particularly if the approach to testing is going to be overhauled in the near future. We might choose to write the infrastructure in a more maintainable language…