Improve Travis to run as a matrix job
authorMichael Neuling <mikey@neuling.org>
Sat, 23 May 2020 07:00:24 +0000 (17:00 +1000)
committerMichael Neuling <mikey@neuling.org>
Fri, 5 Jun 2020 04:29:02 +0000 (14:29 +1000)
Can now run all 999 random tests and unit tests in Travis.

Kudos for this goes to @eine. Based on his input from here:
  https://github.com/antonblanchard/microwatt/pull/182#issuecomment-637926957

Signed-off-by: Michael Neuling <mikey@neuling.org>
.travis.yml

index 8e865e5700dd582f3c1283345bef3c0188586f7b..aa2cd3573e832183d35b4660f65ba5b4618ad5e1 100644 (file)
@@ -1,8 +1,36 @@
-language: minimal
-install: skip
+# global options
+dist: xenial
+os: linux
+language: shell
 
 services: docker
 
 before_install: docker pull ghdl/vunit:llvm
 
-script: docker run --rm -t -v `pwd`:/build -w /build ghdl/vunit:llvm bash -c "apt update && apt install -y python3-pexpect && make GNATMAKE='gnatmake -j'$(nproc) && if [ -n \"$TRAVIS_FULL_CHECK\" ] ; then  make -j$(nproc) check; else make -j$(nproc) check_light ; fi"
+env:
+  matrix:
+    - TASK="tests_unit"
+    - TASK="tests_console"
+    - TASK="; apt update && apt install -y python3-pexpect && make -j$(nproc) test_micropython test_micropython_long"
+    - TASK="{1..99}"
+    - TASK="{100..199}"
+    - TASK="{200..299}"
+    - TASK="{300..399}"
+    - TASK="{400..499}"
+    - TASK="{500..599}"
+    - TASK="{600..699}"
+    - TASK="{700..799}"
+    - TASK="{800..899}"
+    - TASK="{900..999}"
+
+script: docker run -t -v `pwd`:/build -w /build ghdl/vunit:llvm bash -c "make -j$(nproc) $TASK"
+
+stages:
+  - building
+  - test
+
+jobs:
+  include:
+    - stage: building
+      env: NAME="Building core"
+      script: docker run -t -v `pwd`:/build -w /build ghdl/vunit:llvm bash -c "make GNATMAKE='gnatmake -j'$(nproc)"
\ No newline at end of file