Browse Source

ci: add GitHub Actions workflow 'Test'

umarcor 2 days ago
parent
commit
37619d21ab
5 changed files with 61 additions and 6 deletions
  1. 8
    0
      .github/generate_matrix.sh
  2. 45
    0
      .github/workflows/Test.yml
  3. 1
    1
      Makefile
  4. 2
    0
      README.md
  5. 5
    5
      tests.txt

+ 8
- 0
.github/generate_matrix.sh View File

@@ -0,0 +1,8 @@
1
+#!/usr/bin/env bash
2
+
3
+_matrix=''
4
+for item in $(cat tests.txt); do
5
+  _matrix+="'$item', "
6
+done
7
+
8
+echo "::set-output name=matrix::[$_matrix]"

+ 45
- 0
.github/workflows/Test.yml View File

@@ -0,0 +1,45 @@
1
+name: Test
2
+
3
+on:
4
+  push:
5
+  pull_request:
6
+
7
+jobs:
8
+
9
+
10
+  Matrix:
11
+    runs-on: ubuntu-latest
12
+    name: '🧾 Generate Test matrix'
13
+    outputs:
14
+      matrix: ${{ steps.generate.outputs.matrix }}
15
+    steps:
16
+
17
+    - name: '🧰 Checkout'
18
+      uses: actions/checkout@v2
19
+
20
+    - id: generate
21
+      name: '🧾 generate_matrix.sh'
22
+      run: ./.github/generate_matrix.sh
23
+
24
+
25
+  Test:
26
+    needs: Matrix
27
+    runs-on: ubuntu-20.04
28
+    strategy:
29
+      fail-fast: false
30
+      matrix:
31
+        design: ${{ fromJson(needs.Matrix.outputs.matrix) }}
32
+    name: '🛳️ Test · ${{ matrix.design }}'
33
+    steps:
34
+
35
+    - name: '🧰 Checkout'
36
+      uses: actions/checkout@v1
37
+      with:
38
+        submodules: recursive
39
+
40
+    - name: '🛳️ Execute make ${{ matrix.design }} in hdlc/formal:all'
41
+      uses: docker://hdlc/formal:all
42
+      with:
43
+        args: make ${{ matrix.design }}
44
+      env:
45
+        BUILD_NAME: ACCEPTANCE

+ 1
- 1
Makefile View File

@@ -1,4 +1,4 @@
1
-DESIGNS := $(file < tests.txt)
1
+DESIGNS := $(shell cat tests.txt)
2 2
 
3 3
 .PHONY: ${DESIGNS} all clean
4 4
 

+ 2
- 0
README.md View File

@@ -1,3 +1,5 @@
1
+[![](https://img.shields.io/github/workflow/status/tmeissner/formal_hw_verification/Test/main?longCache=true&style=flat-square&label=Test&logo=GitHub%20Actions&logoColor=fff)](https://github.com/tmeissner/formal_hw_verification/actions?query=workflow%3ATest)
2
+
1 3
 The original repository is located on my own git-server at [https://git.goodcleanfun.de/tmeissner/formal_hw_verification](https://git.goodcleanfun.de/tmeissner/formal_hw_verification)
2 4
 
3 5
 It is mirrored to github with every push, so both should be in sync.

+ 5
- 5
tests.txt View File

@@ -1,5 +1,5 @@
1
-alu \
2
-counter \
3
-fifo \
4
-vai_fifo \
5
-vai_reg
1
+alu
2
+counter
3
+fifo
4
+vai_fifo
5
+vai_reg