Trevis CI: use commit bench number as a reference
authorMarco Costalba <mcostalba@gmail.com>
Mon, 9 Jan 2017 11:40:07 +0000 (12:40 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 9 Jan 2017 11:51:28 +0000 (12:51 +0100)
No functional change.

.travis.yml

index a0673b8..3e5aec9 100644 (file)
@@ -47,8 +47,9 @@ script:
   #
   # checking bench for various build types
   #
-  # obtain reference
-  - make clean && make ARCH=x86-64 optimize=no debug=yes build > /dev/null && export benchref=$(../tests/signature.sh)
+  # obtain reference from git log
+  - git log | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed -rn "s/[^0-9]*([0-9]+)/\1/p" > git_sig
+  - export benchref=$(cat git_sig)
   - echo "Reference bench:" $benchref
   # verify against reference
   - make clean && make ARCH=x86-64 build > /dev/null && ../tests/signature.sh $benchref