2 # vim: set expandtab shiftwidth=4:
4 # This file generates the .gitlab-ci.yml file that defines the pipeline.
9 {'name': 'fedora', 'version': '30'},
10 {'name': 'fedora', 'version': '31'},
11 {'name': 'ubuntu', 'version': '19.10'},
12 {'name': 'ubuntu', 'version': '19.04'},
13 {'name': 'arch', 'version': 'rolling'},
15 'name': 'alpine', 'version': 'latest',
18 'MESON_ARGS: \'-Ddocumentation=false\' # alpine does not have python-recommonmark',
19 # We don't run the tests on alpine. The litest-selftest fails
20 # for any tcase_add_exit_test/tcase_add_test_raise_signal
21 # but someone more invested in musl will have to figure that out.
22 'MESON_TEST_ARGS: \'\' # litest-selftest fails on musl',
28 templates = sorted(set([x['name'] for x in distributions]))
30 # in reverse order of duration to get the slowest ones started first
32 {'name': 'touchpad', 'suites': 'touchpad'},
33 {'name': 'tap', 'suites': 'tap'},
34 {'name': 'tablet', 'suites': 'tablet'},
35 {'name': 'gestures-device', 'suites': 'gestures device'},
37 'suites': 'context config misc events totem udev lid log timer tablet-mode quirks trackball pad path keyboard switch touch trackpoint'},
38 {'name': 'pointer', 'suites': 'pointer'}
42 def generate_template():
43 env = jinja2.Environment(loader=jinja2.FileSystemLoader('./.gitlab-ci'),
44 trim_blocks=True, lstrip_blocks=True)
46 template = env.get_template('gitlab-ci.tmpl')
47 config = {'distributions': distributions,
48 'test_suites': test_suites,
49 'templates': templates}
50 with open('.gitlab-ci.yml', 'w') as fd:
51 template.stream(config).dump(fd)
54 if __name__ == '__main__':