diff options
Diffstat (limited to '.github/workflows/Windows-MSYS2.yml')
-rw-r--r-- | .github/workflows/Windows-MSYS2.yml | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/.github/workflows/Windows-MSYS2.yml b/.github/workflows/Windows-MSYS2.yml new file mode 100644 index 000000000..48eb8dce1 --- /dev/null +++ b/.github/workflows/Windows-MSYS2.yml @@ -0,0 +1,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 }}
|