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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
name: Windows MSYS2
on:
workflow_call:
jobs:
Build:
name: '🚧${{ matrix.icon }} ${{ matrix.sys }} ${{ matrix.pkg }} (build)'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
# - {icon: '🟪', pkg: 'llvm', sys: 'MINGW32' } ! not yet functional
- {icon: '🟦', pkg: 'llvm', sys: 'MINGW64' }
- {icon: '🟨', pkg: 'llvm', sys: 'UCRT64' } #! experimental
- {icon: '🟪', pkg: 'mcode', sys: 'MINGW32' }
# - {icon: '🟦', pkg: 'mcode', sys: 'MINGW64' } #! simulation with mcode is not yet supported on win64
- {icon: '🟨', pkg: 'mcode', sys: 'UCRT64' } #! experimental; simulation with mcode is not yet supported on win64
env:
MINGW_ARCH: ${{ matrix.sys }}
defaults:
run:
shell: msys2 {0}
steps:
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
update: true
install: base-devel git
pacboy: toolchain:p
- name: '⚙ git config'
run: git config --global core.autocrlf input
shell: bash
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
# The command 'git describe' (used for version) needs the history.
fetch-depth: 0
- name: '🚧 Build package'
run: |
cd scripts/msys2-${{ matrix.pkg }}
makepkg-mingw --noconfirm --noprogressbar -sCLf
for item in src pkg; do
tar czf msys2-${{ matrix.pkg }}."$item".tar.gz "$item"
done
- name: '📤 Upload artifact: builddir'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.sys }}-${{ matrix.pkg }}-builddir
path: |
scripts/msys2-${{ matrix.pkg }}/msys2-${{ matrix.pkg }}.src.tar.gz
scripts/msys2-${{ matrix.pkg }}/msys2-${{ matrix.pkg }}.pkg.tar.gz
- name: '📤 Upload artifact: package'
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.sys }}-${{ matrix.pkg }}
path: scripts/msys2-${{ matrix.pkg }}/mingw-*ghdl*.pkg.tar.zst
if-no-files-found: error
Test:
name: '🚦${{ matrix.sys.icon }} ${{ matrix.sys.sys }} ${{ matrix.sys.pkg }} ${{ matrix.suite }}'
runs-on: windows-latest
needs:
- Build
strategy:
fail-fast: false
matrix:
sys:
# - {icon: '🟪', pkg: 'llvm', sys: 'MINGW32' } ! not yet functional
- {icon: '🟦', pkg: 'llvm', sys: 'MINGW64' }
- {icon: '🟨', pkg: 'llvm', sys: 'UCRT64' } #! experimental
- {icon: '🟪', pkg: 'mcode', sys: 'MINGW32' }
# - {icon: '🟦', pkg: 'mcode', sys: 'MINGW64' } ! simulation with mcode is not yet supported on win64
# - {icon: '🟨', pkg: 'mcode', sys: 'UCRT64' } ! experimental; simulation with mcode is not yet supported on win64
suite:
- 'sanity pyunit vpi vhpi'
- 'gna'
- 'vests'
- 'synth'
defaults:
run:
shell: msys2 {0}
steps:
- name: '${{ matrix.sys.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys.sys }}
update: true
pacboy: >
diffutils:p
gcc:p
python-pip:p
python-setuptools:p
- name: '⚙ git config'
run: git config --global core.autocrlf input
shell: bash
- name: '🧰 Checkout'
uses: actions/checkout@v3
- name: '📥 Download artifact: package'
uses: actions/download-artifact@v3
with:
path: artifact
name: ${{ matrix.sys.sys }}-${{ matrix.sys.pkg }}
- name: '🛠 Install package and 🐍 Python dependencies'
run: |
pacman --noconfirm -U artifact/mingw-w64-*-ghdl-${{ matrix.sys.pkg }}-*.zst
pip3 install -r testsuite/requirements.txt
- name: '🚦 Test package'
run: GHDL=ghdl ./testsuite/testsuite.sh ${{ matrix.suite }}
|