-
Notifications
You must be signed in to change notification settings - Fork 1
110 lines (97 loc) · 2.84 KB
/
ci.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: CI
on:
workflow_dispatch:
workflow_call:
pull_request:
jobs:
# ------------------------------------------------------------
# build
# ------------------------------------------------------------
build:
strategy:
matrix:
os: ["ubuntu-22.04"]
runs-on: ${{ matrix.os }}
steps:
# checkout git repository
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
# node
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install
# compile
- run: npm run compile
# ------------------------------------------------------------
# test
# ------------------------------------------------------------
test:
needs: build
strategy:
matrix:
os: ["ubuntu-22.04"]
runs-on: ${{ matrix.os }}
steps:
# checkout git repository
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
# node
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: npm install
# ----------------------------------
# download dependencies for testing
# ----------------------------------
# python
- name: Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python packages
# VUnit
run: |
python -m pip install --upgrade pip
pip install vunit_hdl
# GHDL
- name: Install GHDL Ubuntu
if: startsWith(matrix.os, 'ubuntu')
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
mkdir ghdl
cd ghdl
wget https://github.com/ghdl/ghdl/releases/download/v0.37/ghdl-0.37-ubuntu16-mcode.tgz
tar -xvzf ghdl-0.37-ubuntu16-mcode.tgz
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gnat-4.9/gnat-4.9-base_4.9.3-3ubuntu5_amd64.deb
sudo dpkg --install gnat-4.9-base_4.9.3-3ubuntu5_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gnat-4.9/libgnat-4.9_4.9.3-3ubuntu5_amd64.deb
sudo dpkg --install libgnat-4.9_4.9.3-3ubuntu5_amd64.deb
echo "::set-env name=VUNIT_GHDL_PATH::$(pwd)/bin"
cd ..
- name: Install GHDL Windows
if: startsWith(matrix.os, 'windows')
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: |
mkdir ghdl
cd ghdl
Invoke-WebRequest https://github.com/ghdl/ghdl/releases/download/v0.37/ghdl-0.37-mingw32-mcode.zip -OutFile ghdl.zip
Expand-Archive .\ghdl.zip .;
echo "::set-env name=VUNIT_GHDL_PATH::$(pwd)/GHDL/0.37-mingw32-mcode/bin"
cd ..
- run: echo $VUNIT_GHDL_PATH
# --------
# testing
# --------
- name: Test
uses: coactions/setup-xvfb@v1
with:
run: npm run test