Move from travis to github workflow
authorMichael Neuling <mikey@neuling.org>
Tue, 9 Jun 2020 23:57:15 +0000 (09:57 +1000)
committerMichael Neuling <mikey@neuling.org>
Thu, 11 Jun 2020 03:12:15 +0000 (13:12 +1000)
Github workflow gives us longer run times and faster startup.

Major kudos for this goes to @eine for the initial version and for
pushing us in this direction.

Signed-off-by: Michael Neuling <mikey@neuling.org>
.github/workflows/test.yml [new file with mode: 0644]
.travis.yml [deleted file]

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644 (file)
index 0000000..7fb8512
--- /dev/null
@@ -0,0 +1,48 @@
+name: 'test'
+
+on:
+  push:
+  pull_request:
+  schedule:
+    - cron: '0 0 * * 5'
+
+jobs:
+
+  build:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: docker pull ghdl/vunit:llvm
+    - run: docker run -t -v $PWD:/build -w /build ghdl/vunit:llvm bash -c "make GNATMAKE='gnatmake -j'$(nproc)"
+
+  py:
+    needs: [build]
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: docker run -t -v $PWD:/build -w /build ghdl/vunit:llvm bash -c "apt update && apt install -y python3-pexpect && make -j$(nproc) test_micropython test_micropython_long"
+
+  test:
+    needs: [build]
+    strategy:
+      fail-fast: false
+      max-parallel: 3
+      matrix:
+        task: [
+          "tests_unit",
+          "tests_console",
+          "{1..99}",
+          "{100..199}",
+          "{200..299}",
+          "{300..399}",
+          "{400..499}",
+          "{500..599}",
+          "{600..699}",
+          "{700..799}",
+          "{800..899}",
+          "{900..999}",
+        ]
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+    - run: docker run -t -v $PWD:/build -w /build ghdl/vunit:llvm bash -c "make -j$(nproc) ${{ matrix.task }}"
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index aa2cd35..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# global options
-dist: xenial
-os: linux
-language: shell
-
-services: docker
-
-before_install: docker pull ghdl/vunit:llvm
-
-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