annotate .gitlab-ci.yml @ 5358:db1dfa818187

ci: print exact version of used Python In parentheses because YAML.
author Anton Shestakov <av6@dwimlabs.net>
date Sun, 07 Jun 2020 18:17:08 +0800
parents 474bcce6cef1
children bbd1e2f4e7a1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4873
91116cec0a67 gitlab-ci: basic test with flake8
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
1 flake8:
4923
d18908c5642a heptapod-ci: point to our own docker images
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4874
diff changeset
2 image: octobus/ci-py2-hgext3rd
4873
91116cec0a67 gitlab-ci: basic test with flake8
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
3 script:
4923
d18908c5642a heptapod-ci: point to our own docker images
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4874
diff changeset
4 - hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' -X hgext3rd/evolve/thirdparty | xargs -0 flake8
4926
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
5
5076
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
6 pytype:
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
7 image: octobus/ci-py3-hgext3rd
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
8 script:
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
9 - hg pull -R /ci/repos/mercurial/
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
10 - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
11 - hg -R /ci/repos/mercurial/ update "$hg_rev"
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
12 - jobs=$(python -c 'import multiprocessing; print multiprocessing.cpu_count()')
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
13 - pytype -P /ci/repos/mercurial/:hgext3rd -k hgext3rd -x hgext3rd/evolve/thirdparty -j $jobs || true
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
14 when: manual
43b448bb1a57 heptapod-ci: add pytype job, allow it to fail for now
Anton Shestakov <av6@dwimlabs.net>
parents: 4986
diff changeset
15
5341
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
16 variables:
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
17 PY: py2
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
18 PYTHON: python
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
19 RUNTEST_ARGS: ""
5342
4a958a7bb138 ci: set HGMODULEPOLICY when running specific variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5341
diff changeset
20 TEST_HGMODULEPOLICY: "allow"
4925
dbeb04ee6679 heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4924
diff changeset
21
5341
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
22 .runtests_template: &runtests
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
23 image: octobus/ci-$PY-hgext3rd
4925
dbeb04ee6679 heptapod-ci: add a --pure variant for the CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4924
diff changeset
24 script:
4959
edc29a909339 heptapod-ci: simpler CI
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4958
diff changeset
25 - hg pull -R /ci/repos/mercurial/
4966
4f3c87584a4a heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents: 4959
diff changeset
26 - hg_rev=$(tests/testlib/map-hg-rev.sh "$(hg log -r . -T '{branch}')")
4f3c87584a4a heptapod-ci: add a script to map evolve branch to mercurial revision for tests
Anton Shestakov <av6@dwimlabs.net>
parents: 4959
diff changeset
27 - hg -R /ci/repos/mercurial/ update "$hg_rev"
5358
db1dfa818187 ci: print exact version of used Python
Anton Shestakov <av6@dwimlabs.net>
parents: 5352
diff changeset
28 - ("$PYTHON" --version)
5343
f464b29898e3 ci: use set -x to echo the whole run-tests.py command string
Anton Shestakov <av6@dwimlabs.net>
parents: 5342
diff changeset
29 - (cd tests; set -x; HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" /ci/repos/mercurial/tests/run-tests.py --color=always $RUNTEST_ARGS)
5341
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
30
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
31 tests-py2-cext:
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
32 <<: *runtests
5342
4a958a7bb138 ci: set HGMODULEPOLICY when running specific variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5341
diff changeset
33 variables:
5351
dd88c127ad81 ci: add --no-rust to -cext variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5343
diff changeset
34 RUNTEST_ARGS: "--no-rust"
5342
4a958a7bb138 ci: set HGMODULEPOLICY when running specific variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5341
diff changeset
35 TEST_HGMODULEPOLICY: "c"
5341
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
36
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
37 tests-py2-pure:
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
38 <<: *runtests
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
39 variables:
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
40 RUNTEST_ARGS: "--pure"
5342
4a958a7bb138 ci: set HGMODULEPOLICY when running specific variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5341
diff changeset
41 TEST_HGMODULEPOLICY: "py"
4926
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
42
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
43 tests-py3-cext:
5341
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
44 <<: *runtests
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
45 variables:
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
46 PY: py3
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
47 PYTHON: python3
5351
dd88c127ad81 ci: add --no-rust to -cext variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5343
diff changeset
48 RUNTEST_ARGS: "--no-rust"
5342
4a958a7bb138 ci: set HGMODULEPOLICY when running specific variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5341
diff changeset
49 TEST_HGMODULEPOLICY: "c"
4926
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
50
0fad1d376814 heptapod-ci: test with python3 too
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4925
diff changeset
51 tests-py3-pure:
5341
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
52 <<: *runtests
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
53 variables:
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
54 PY: py3
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
55 PYTHON: python3
efb8ae4419b2 ci: use a template + variables for defining tests
Anton Shestakov <av6@dwimlabs.net>
parents: 5076
diff changeset
56 RUNTEST_ARGS: "--pure"
5342
4a958a7bb138 ci: set HGMODULEPOLICY when running specific variants
Anton Shestakov <av6@dwimlabs.net>
parents: 5341
diff changeset
57 TEST_HGMODULEPOLICY: "py"
4986
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
58
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
59 doc:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
60 image: octobus/ci-py2-evolve-doc
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
61 script:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
62 - cd docs/
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
63 - make
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
64 variables:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
65 LANG: en_us.UTF-8
5352
474bcce6cef1 ci: add /ci/repos/mercurial to $PYTHONPATH for docs
Anton Shestakov <av6@dwimlabs.net>
parents: 5351
diff changeset
66 PYTHONPATH: "/ci/repos/mercurial:$PYTHONPATH"
4986
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
67 artifacts:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
68 paths:
1214f3d085a9 ci: add job to build and archive the documentation
Boris Feld <boris.feld@octobus.net>
parents: 4966
diff changeset
69 - html/*