changeset 46352:e78dea142968 stable

contrib: stop building rust for every job This is just wasteful for all steps that do not use Rust. Differential Revision: https://phab.mercurial-scm.org/D9717
author Raphaël Gomès <rgomes@octobus.net>
date Fri, 08 Jan 2021 16:58:23 +0100
parents 085294a8c0e0
children a6c5ec6b4728
files contrib/heptapod-ci.yml
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/heptapod-ci.yml	Thu Jan 21 23:24:58 2021 -0500
+++ b/contrib/heptapod-ci.yml	Fri Jan 08 16:58:23 2021 +0100
@@ -15,8 +15,6 @@
     before_script:
       - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
       - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
-      - cd /tmp/mercurial-ci/rust/rhg
-      - cargo build
       - cd /tmp/mercurial-ci/
       - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
     script:
@@ -24,6 +22,17 @@
         - echo "$RUNTEST_ARGS"
         - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
 
+
+.rust_template: &rust
+    before_script:
+      - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
+      - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
+      - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
+      - cd /tmp/mercurial-ci/rust/rhg
+      - cargo build
+      - cd /tmp/mercurial-ci/
+
+
 checks-py2:
     <<: *runtests
     variables:
@@ -80,6 +89,7 @@
 
 test-py2-rust:
     <<: *runtests
+    <<: *rust
     variables:
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
@@ -87,6 +97,7 @@
 
 test-py3-rust:
     <<: *runtests
+    <<: *rust
     variables:
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"