Repository: randombit/botan
Pull request #2176 (2019-10-24 01:04:28)

Reorganize Travis matrix. Add aarch64 and ppc64le builds

codecov-io: # [Codecov](https://codecov.io/gh/randombit/botan/pull/2176?src=pr&el=h1) Report
> Merging [#2176](https://codecov.io/gh/randombit/botan/pull/2176?src=pr&el=desc) into [master](https://codecov.io/gh/randombit/botan/commit/7f084620e9c2c5ac82b4c71b23e098dd25a636db?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/randombit/botan/pull/2176/graphs/tree.svg?width=650&token=VR6iYmSPH8&height=150&src=pr)](https://codecov.io/gh/randombit/botan/pull/2176?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master    #2176      +/-   ##
==========================================
- Coverage   92.35%   92.35%   -0.01%     
==========================================
  Files         553      553              
  Lines       60190    60190              
  Branches     6376     6376              
==========================================
- Hits        55589    55587       -2     
- Misses       4601     4603       +2
```


| [Impacted Files](https://codecov.io/gh/randombit/botan/pull/2176?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/lib/asn1/der\_enc.cpp](https://codecov.io/gh/randombit/botan/pull/2176/diff?src=pr&el=tree#diff-c3JjL2xpYi9hc24xL2Rlcl9lbmMuY3Bw) | `83.85% <0%> (-2.49%)` | :arrow_down: |
| [src/lib/pbkdf/bcrypt\_pbkdf/bcrypt\_pbkdf.cpp](https://codecov.io/gh/randombit/botan/pull/2176/diff?src=pr&el=tree#diff-c3JjL2xpYi9wYmtkZi9iY3J5cHRfcGJrZGYvYmNyeXB0X3Bia2RmLmNwcA==) | `91.66% <0%> (ø)` | :arrow_up: |
| [src/lib/misc/cryptobox/cryptobox.cpp](https://codecov.io/gh/randombit/botan/pull/2176/diff?src=pr&el=tree#diff-c3JjL2xpYi9taXNjL2NyeXB0b2JveC9jcnlwdG9ib3guY3Bw) | `95.23% <0%> (+1.58%)` | :arrow_up: |
| [src/lib/pk\_pad/emsa\_raw/emsa\_raw.cpp](https://codecov.io/gh/randombit/botan/pull/2176/diff?src=pr&el=tree#diff-c3JjL2xpYi9wa19wYWQvZW1zYV9yYXcvZW1zYV9yYXcuY3Bw) | `74.28% <0%> (+2.85%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/randombit/botan/pull/2176?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/randombit/botan/pull/2176?src=pr&el=footer). Last update [7f08462...d904532](https://codecov.io/gh/randombit/botan/pull/2176?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/src/scripts/ci/setup_travis.sh b/src/scripts/ci/setup_travis.sh
index 50ca2c630..e8fcf3bb5 100755
--- a/src/scripts/ci/setup_travis.sh
+++ b/src/scripts/ci/setup_travis.sh
@@ -11,7 +11,11 @@ set -ev
 
 if [ "$TRAVIS_OS_NAME" = "linux" ]; then
 
-    if [ "$TARGET" = "valgrind" ]; then
+    if [ "$TARGET" = "shared" ] && [ "$TRAVIS_ARCH" = "aarch64" ]; then
+        sudo apt-get -qq update
+        sudo apt-get install liblzma-dev libbz2-dev ccache
+
+    elif [ "$TARGET" = "valgrind" ]; then
         sudo apt-get -qq update
         sudo apt-get install valgrind
 
diff --git a/src/scripts/ci/travis.yml b/src/scripts/ci/travis.yml
index 341f2982f..015b1611a 100644
--- a/src/scripts/ci/travis.yml
+++ b/src/scripts/ci/travis.yml
@@ -1,109 +1,150 @@
 language: cpp
 
-os:
-  - osx
-  - linux
-
 dist: xenial
 sudo: required
 
-compiler:
-  - clang
-  - gcc
-
 env:
   global:
     - CCACHE_MAXSIZE=1G
-    - ANDROID_NDK=android-ndk-r20
-
-  matrix:
-    - TARGET="shared"
-    - TARGET="coverage"
-    - TARGET="fuzzers"
-    - TARGET="valgrind"
-    - TARGET="cross-i386"
-    - TARGET="cross-ppc32"
-    - TARGET="cross-ppc64"
-    - TARGET="cross-arm32"
-    - TARGET="cross-arm64"
-    - TARGET="cross-mips64"
-    - TARGET="cross-win64"
-    - TARGET="cross-android-arm32"
-    - TARGET="cross-android-arm64"
-    - TARGET="gcc4.8"
-    - TARGET="static"
-    - TARGET="mini-shared"
-    - TARGET="bsi"
-    - TARGET="nist"
-    - TARGET="docs"
-    - TARGET="lint"
-
-matrix:
-  exclude:
-    # Skip GCC on OS X entirely
-    - os: osx
+
+jobs:
+  include:
+    - os: linux
+      name: Linux/GCC
       compiler: gcc
+      env:
+       - TARGET="shared"
 
-    # XCode 9.4 ICEs on 32-bit ARM builds
-    - os: osx
-      env: TARGET="cross-arm32"
-
-    # Run static, docs, lint, bsi, nist, fuzzers, coverage, valgrind,
-    # sanitizer, minimized and non-ARM cross builds only on Linux/gcc.
-    # The sanitizer builds under Clang run the tests very slowly and
-    # cause CI timeouts.
-
-    - compiler: clang
-      env: TARGET="static"
-    - compiler: clang
-      env: TARGET="bsi"
-    - compiler: clang
-      env: TARGET="nist"
-    - compiler: clang
-      env: TARGET="lint"
-    - compiler: clang
-      env: TARGET="docs"
-    - compiler: clang
-      env: TARGET="coverage"
-
-    - compiler: clang
-      env: TARGET="fuzzers"
-    - compiler: clang
-      env: TARGET="valgrind"
-    - compiler: clang
-      env: TARGET="mini-shared"
-    - compiler: clang
-      env: TARGET="cross-win64"
-    - compiler: clang
-      env: TARGET="cross-ppc32"
-    - compiler: clang
-      env: TARGET="cross-ppc64"
-    - compiler: clang
-      env: TARGET="cross-mips64"
-    - compiler: clang
-      env: TARGET="cross-i386"
-    - compiler: clang
-      env: TARGET="gcc4.8"
-
-   # No ARM Clang compiler on Linux
     - os: linux
+      name: Linux/Clang
       compiler: clang
-      env: TARGET="cross-arm32"
+      env:
+       - TARGET="shared"
+
     - os: linux
+      name: Coverage
+      compiler: gcc
+      env:
+       - TARGET="coverage"
+
+    - os: linux
+      name: Fuzzers
+      compiler: gcc
+      env:
+       - TARGET="fuzzers"
+
+    - os: linux
+      name: Valgrind
+      compiler: gcc
+      env:
+       - TARGET="valgrind"
+
+    - os: linux
+      name: Linux arm64
+      arch: arm64
+      compiler: gcc
+      env:
+       - TARGET="shared"
+
+    - os: linux
+      dist: bionic
+      name: Linux ppc64le
+      arch: ppc64le
+      compiler: gcc
+      env:
+       - TARGET="shared"
+
+    - os: linux
+      name: Linux i386 cross
+      compiler: gcc
+      env:
+       - TARGET="cross-i386"
+
+    - os: linux
+      name: Linux ppc32 cross
+      compiler: gcc
+      env:
+       - TARGET="cross-ppc32"
+
+    - os: linux
+      name: Linux arm32 cross
+      compiler: gcc
+      env:
+       - TARGET="cross-arm32"
+
+    - os: linux
+      name: Linux mips64 cross
+      compiler: gcc
+      env:
+       - TARGET="cross-mips64"
+
+    - os: linux
+      name: Android arm32 cross
+      compiler: clang
+      env:
+       - TARGET="cross-android-arm32"
+       - ANDROID_NDK=android-ndk-r20
+
+    - os: linux
+      name: Android arm64 cross
       compiler: clang
-      env: TARGET="cross-arm64"
+      env:
+       - TARGET="cross-android-arm64"
+       - ANDROID_NDK=android-ndk-r20
+
+    - os: linux
+      name: MinGW x86-64 cross
+      compiler: gcc
+      env:
+       - TARGET="cross-win64"
 
-   # Android NDK is Linux/clang only
     - os: osx
-      env: TARGET="cross-android-arm32"
+      name: macOS
+      compiler: clang
+      env:
+       - TARGET="shared"
+
     - os: osx
-      env: TARGET="cross-android-arm64"
+      name: iOS
+      compiler: clang
+      env:
+       - TARGET="cross-arm64"
+
+    - os: linux
+      name: Linux GCC 4.8
+      compiler: gcc
+      env:
+       - TARGET="gcc4.8"
+
+    - os: linux
+      name: Minimized
+      compiler: gcc
+      env:
+       - TARGET="mini-shared"
+
     - os: linux
+      name: BSI policy
       compiler: gcc
-      env: TARGET="cross-android-arm32"
+      env:
+       - TARGET="bsi"
+
+    - os: linux
+      name: NIST policy
+      compiler: gcc
+      env:
+       - TARGET="nist"
+
+    - os: linux
+      name: Pylint
+      compiler: gcc
+      env:
+       - TARGET="lint"
+
     - os: linux
+      name: Documentation
       compiler: gcc
-      env: TARGET="cross-android-arm64"
+      env:
+       - TARGET="docs"
 
 install:
   - ./src/scripts/ci/setup_travis.sh


Test patch:
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py
index 06a315baa..c0f8677d1 100755
--- a/src/scripts/test_cli.py
+++ b/src/scripts/test_cli.py
@@ -1118,7 +1118,7 @@ def cli_speed_tests(_tmp_dir):
             logging.error("Unexpected line %s", line)
 
     output = test_cli("speed", ["--msec=%d" % (msec), "AES-128/GCM"], None).split('\n')
-    format_re_ks = re.compile(r'^AES-128/GCM\(16\) .* [0-9]+ key schedule/sec; [0-9]+\.[0-9]+ ms/op .*\([0-9]+ (op|ops) in [0-9]+ ms\)')
+    format_re_ks = re.compile(r'^AES-128/GCM\(16\).* [0-9]+ key schedule/sec; [0-9]+\.[0-9]+ ms/op .*\([0-9]+ (op|ops) in [0-9\.]+ ms\)')
     format_re_cipher = re.compile(r'^AES-128/GCM\(16\) .* buffer size [0-9]+ bytes: [0-9]+\.[0-9]+ MiB\/sec .*\([0-9]+\.[0-9]+ MiB in [0-9]+\.[0-9]+ ms\)')
     for line in output:
         if format_re_ks.match(line) is None:
@@ -1132,7 +1132,7 @@ def cli_speed_tests(_tmp_dir):
     output = test_cli("speed", ["--msec=%d" % (msec)] + pk_algos, None).split('\n')
 
     # ECDSA-secp256r1 106 keygen/sec; 9.35 ms/op 37489733 cycles/op (1 op in 9 ms)
-    format_re = re.compile(r'^.* [0-9]+ ([A-Za-z ]+)/sec; [0-9]+\.[0-9]+ ms/op .*\([0-9]+ (op|ops) in [0-9]+ ms\)')
+    format_re = re.compile(r'^.* [0-9]+ ([A-Za-z ]+)/sec; [0-9]+\.[0-9]+ ms/op .*\([0-9]+ (op|ops) in [0-9\.]+ ms\)')
     for line in output:
         if format_re.match(line) is None:
             logging.error("Unexpected line %s", line)
@@ -1152,7 +1152,7 @@ def cli_speed_tests(_tmp_dir):
 
     output = test_cli("speed", ["--msec=%d" % (msec), "scrypt"], None).split('\n')
 
-    format_re = re.compile(r'^scrypt-[0-9]+-[0-9]+-[0-9]+ \([0-9]+ MiB\) [0-9]+ /sec; [0-9]+\.[0-9]+ ms/op .*\([0-9]+ (op|ops) in [0-9]+ ms\)')
+    format_re = re.compile(r'^scrypt-[0-9]+-[0-9]+-[0-9]+ \([0-9]+ MiB\) [0-9]+ /sec; [0-9]+\.[0-9]+ ms/op .*\([0-9]+ (op|ops) in [0-9\.]+ ms\)')
 
     for line in output:
         if format_re.match(line) is None:
@@ -1168,7 +1168,7 @@ def cli_speed_tests(_tmp_dir):
 
     # Entropy source rdseed output 128 bytes estimated entropy 0 in 0.02168 ms total samples 32
     output = test_cli("speed", ["--msec=%d" % (msec), "entropy"], None).split('\n')
-    format_re = re.compile(r'^Entropy source [_a-z]+ output [0-9]+ bytes estimated entropy [0-9]+ in [0-9]+\.[0-9]+ ms .*total samples [0-9]+')
+    format_re = re.compile(r'^Entropy source [_a-z0-9]+ output [0-9]+ bytes estimated entropy [0-9]+ in [0-9]+\.[0-9]+ ms .*total samples [0-9]+')
     for line in output:
         if format_re.match(line) is None:
             logging.error("Unexpected line %s", line)