-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (40 loc) · 977 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Tests
on:
push:
branches:
- master
pull_request:
defaults:
run:
shell: bash
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
version: [latest, 5.024]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup verilator
uses: ./
with:
version: ${{ matrix.version }}
- name: Capture verilator version installed
run: |
verilator --version
echo 'VERILATOR_VERSION_INSTALLED<<EOF' >> $GITHUB_ENV
verilator --version >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Verify
shell: python
if: ${{ matrix.version != 'latest' }}
env:
VERILATOR_VERSION_EXPECTED: ${{ matrix.version }}
run: |
import sys, os
sys.exit(
int(not os.environ["VERILATOR_VERSION_EXPECTED"] in os.environ["VERILATOR_VERSION_INSTALLED"])
)