-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (92 loc) · 2.73 KB
/
push.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
name: 'push'
on: [ push, pull_request ]
env:
DOCKER_REGISTRY: docker.pkg.github.com
# https://github.com/tox-dev/tox/issues/1468
PY_COLORS: 1
CLONE_VUNIT: git clone --recurse-submodules -j4 https://github.com/VUnit/vunit ../vunit
jobs:
lin:
strategy:
fail-fast: false
max-parallel: 2
matrix:
task: [
"38-fmt -- --check",
"38-lint -- --color=yes",
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: install VUnit
run: $CLONE_VUNIT
- name: install dependencies
run: |
pip install -U pip --progress-bar off
pip install -U virtualenv tox --progress-bar off
- name: run job
run: tox -e py${{ matrix.task }}
docker:
strategy:
fail-fast: false
max-parallel: 2
matrix:
task: [
{ py: 38, img: "docker.pkg.github.com/vunit/vunit/dev:llvm" },
{ py: 38, img: "docker.pkg.github.com/vunit/vunit/dev:mcode" },
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- name: docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u vunit-gha --password-stdin "$DOCKER_REGISTRY"
- name: run job
run: |
$CLONE_VUNIT
docker run --rm -tv $(pwd)/..:/src -w /src/cosim ${{ matrix.task.img }} tox -e py${{ matrix.task.py }}-acceptance-ghdl
- name: docker logout
run: docker logout "$DOCKER_REGISTRY"
if: always()
win:
strategy:
fail-fast: false
max-parallel: 2
matrix:
task: [
38-acceptance-ghdl,
38-lint,
]
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: git submodule update
run: git submodule update --init --recursive
if: (endsWith( matrix.task, '-lint' ) || endsWith( matrix.task, '-unit' )) == false
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: install dependencies
run: |
pip install -U pip --progress-bar off
pip install -U virtualenv tox --progress-bar off
- name: install VUnit
shell: bash
run: $CLONE_VUNIT
- name: install GHDL
if: endsWith( matrix.task, '-ghdl' )
shell: bash
run: |
curl -fsSL -o ghdl.zip https://github.com/ghdl/ghdl/releases/download/v0.36/ghdl-0.36-mingw32-mcode.zip
7z x ghdl.zip "-o../ghdl" -y
mv ../ghdl/GHDL/0.36-mingw32-mcode/ ../ghdl-v0.36
rm -rf ../ghdl ghdl.zip
- name: run job
shell: bash
run: |
export PATH=$PATH:$(pwd)/../ghdl-v0.36/bin
tox -e py${{ matrix.task }} -- --color=yes