Jelajahi Sumber

Merge branch 'feature/travis' into develop

Steffen Jaeckel 11 tahun lalu
induk
melakukan
722c128051
5 mengubah file dengan 43 tambahan dan 17 penghapusan
  1. 19 1
      .travis.yml
  2. 16 0
      printinfo.sh
  3. 4 0
      run.sh
  4. 4 0
      testbuild.sh
  5. 0 16
      testme.sh

+ 19 - 1
.travis.yml

@@ -1,7 +1,23 @@
 language: c
 compiler:
   - gcc
-script: ./testme.sh "makefile" "-DUSE_LTM -DLTM_DESC -DLTC_NO_ASM -I/usr/include" /usr/lib/libtommath.a
+script: bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile" "-DUSE_LTM -DLTM_DESC -I/usr/include" "/usr/lib/libtommath.a"
+env:
+  - BUILDSCRIPT="run.sh"        BUILDNAME="STOCK"                       BUILDOPTIONS=" "
+  - BUILDSCRIPT="run.sh"        BUILDNAME="SMALL"                       BUILDOPTIONS="-DLTC_SMALL_CODE"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="NOTABLES"                    BUILDOPTIONS="-DLTC_NO_TABLES"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="SMALL+NOTABLES"              BUILDOPTIONS="-DLTC_SMALL_CODE -DLTC_NO_TABLES"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="CLEANSTACK"                  BUILDOPTIONS="-DLTC_CLEAN_STACK"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="CLEANSTACK+SMALL"            BUILDOPTIONS="-DLTC_SMALL_CODE -DLTC_CLEAN_STACK"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="CLEANSTACK+NOTABLES"         BUILDOPTIONS="-DLTC_NO_TABLES -DLTC_CLEAN_STACK"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="CLEANSTACK+NOTABLES+SMALL"   BUILDOPTIONS="-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="NO_FAST"                     BUILDOPTIONS="-DLTC_NO_FAST"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="NO_FAST+NOTABLES"            BUILDOPTIONS="-DLTC_NO_FAST -DLTC_NO_TABLES"
+  - BUILDSCRIPT="run.sh"        BUILDNAME="NO_ASM"                      BUILDOPTIONS="-DLTC_NO_ASM"
+  - BUILDSCRIPT="testbuild.sh"  BUILDNAME="NOTEST"                      BUILDOPTIONS="-DLTC_NO_TEST"
+  - BUILDSCRIPT="testbuild.sh"  BUILDNAME="NOFILE"                      BUILDOPTIONS="-DLTC_NO_TEST"
+matrix:
+  fast_finish: true
 branches:
   only:
     - develop
@@ -9,3 +25,5 @@ before_script:
   - sudo apt-get install libtommath-dev
 after_script:
   - cat gcc_2.txt
+notifications:
+  irc: "chat.freenode.net#libtom"

+ 16 - 0
printinfo.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+
+version=$(git describe --tags --always --dirty 2>/dev/null)
+if [ ! -e ".git" ] || [ -z $version ]
+then
+	version=$(grep "^VERSION=" makefile | sed "s/.*=//")
+fi
+echo "Testing version:" $version
+#grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"`
+
+# get uname
+echo "uname="`uname -a`
+
+# get gcc name
+echo "gcc="`gcc -dumpversion`
+echo

+ 4 - 0
run.sh

@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# output version
+bash printinfo.sh
+
 bash build.sh " $1" "$2 -O2" "$3 IGNORE_SPEED=1" "$4" "$5"
 if [ -a testok.txt ] && [ -f testok.txt ]; then
    echo

+ 4 - 0
testbuild.sh

@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# output version
+bash printinfo.sh
+
 echo "$1 (Build Only, $2, $3)..."
 make clean 1>/dev/null 2>/dev/null
 echo -n "building..."

+ 0 - 16
testme.sh

@@ -10,22 +10,6 @@ fi
 # date
 echo "date="`date`
 
-# output version
-version=$(git describe --tags --always --dirty 2>/dev/null)
-if [ ! -e ".git" ] || [ -z $version ]
-then
-	version=$(grep "^VERSION=" makefile | sed "s/.*=//")
-fi
-echo "Testing version:" $version
-#grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"`
-
-# get uname 
-echo "uname="`uname -a`
-
-# get gcc name
-echo "gcc="`gcc -dumpversion`
-echo
-
 # stock build
 bash run.sh "STOCK" " " "$1" "$2" "$3" || exit 1