contrib/heptapod-ci.yml
changeset 46414 16c18d5e5dc8
parent 46404 a390c7fcd286
parent 46352 e78dea142968
child 46426 0da465780bba
--- a/contrib/heptapod-ci.yml	Thu Jan 28 00:14:15 2021 -0800
+++ b/contrib/heptapod-ci.yml	Fri Jan 29 17:32:09 2021 +0530
@@ -16,8 +16,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
       - black --version
@@ -27,6 +25,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:
@@ -83,6 +92,7 @@
 
 test-py2-rust:
     <<: *runtests
+    <<: *rust
     variables:
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
@@ -90,6 +100,7 @@
 
 test-py3-rust:
     <<: *runtests
+    <<: *rust
     variables:
         HGWITHRUSTEXT: cpython
         RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"