Tidy '.travis.yml' by moving scripts into separate files

• Feb 7, 2016 - 00:26
Type
Functional
Severity
S4 - Minor
Status
closed
Project

MuseScore uses Travis CI (continuous integration) to test code submitted by contributors before it is merged into the project. Travis uses a YAML configuration file '.travis.yml' in the root directory. This file contains instructions to tell Travis how to build MuseScore and the tests, how to do the tests, and who should be alerted when the tests pass or fail.

Most sections of the file are required and cannot be moved to separate files (e.g. Travis-specific syntax, or anything that requires root privileges, like installing dependencies via apt). However, some sections simply contain commands that are passed to a Bash shell. Putting these sections in separate script files has the following advantages:

  • The Travis configuration file '.travis.yml' itself would be smaller and more readable.
  • Clearer separation of generic build steps from Travis-specific steps.
  • Avoid conflicts with characters that have special meanings in YAML and Bash.
  • Syntax highlighting of Bash commands in text editors.

Comments