diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b62d8df78..32d2ae3d0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,6 @@ jobs: lin: - strategy: fail-fast: false matrix: @@ -27,7 +26,7 @@ jobs: sudo apt update -qq sudo apt install -y make g++ git bison flex gperf libreadline-dev autoconf - - name: Build + - name: Build, install and check run: | autoconf ./configure @@ -40,30 +39,47 @@ jobs: win: runs-on: windows-latest - name: '🧊 Windows' + strategy: + fail-fast: false + matrix: + include: [ + { msystem: MINGW64, arch: x86_64 }, + { msystem: MINGW32, arch: i686 } + ] + name: 🟪 ${{ matrix.msystem}} · ${{ matrix.arch }} + defaults: + run: + shell: msys2 {0} + env: + MINGW_INSTALLS: ${{ matrix.msystem }} steps: - run: git config --global core.autocrlf input + shell: bash - uses: actions/checkout@v2 - uses: msys2/setup-msys2@v2 with: - release: false - msystem: MINGW64 - install: > - base-devel - mingw-w64-x86_64-toolchain + msystem: ${{ matrix.msystem }} update: true + install: > + git + base-devel + mingw-w64-${{ matrix.arch }}-toolchain - - name: Build and test - shell: bash + - name: Build and check run: | - export mingw64='cmd //C RefreshEnv.cmd & set MSYS=winsymlinks:nativestrict & C:\\msys64\\msys2_shell.cmd -defterm -no-start -mingw64 -full-path -here -c "$@" --' + cd msys2 + makepkg-mingw --noconfirm --noprogressbar -sCLf - $mingw64 ./autoconf.sh - $mingw64 ./configure - $mingw64 make install - $mingw64 make check + - name: Install + run: pacman -U --noconfirm msys2/*.zst - $mingw64 ./.github/test.sh + - name: Test + run: ./.github/test.sh + + - uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.msystem }}-${{ matrix.arch }} + path: msys2/*.zst diff --git a/msys2/PKGBUILD b/msys2/PKGBUILD new file mode 100644 index 000000000..36f52b212 --- /dev/null +++ b/msys2/PKGBUILD @@ -0,0 +1,37 @@ +_realname=iverilog +pkgbase=mingw-w64-${_realname} +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=ci +pkgrel=1 +pkgdesc="Icarus Verilog, a Verilog simulation and synthesis tool (mingw-w64)" +arch=('any') +url="http://iverilog.icarus.com/" +license=('GPLv2+') +depends=("${MINGW_PACKAGE_PREFIX}-readline" + "${MINGW_PACKAGE_PREFIX}-gcc-libs") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" + "${MINGW_PACKAGE_PREFIX}-ghostscript") + +source=() +sha256sums=() + +build() { + cd "${srcdir}"/../.. + sh autoconf.sh + ./configure \ + --prefix="${MINGW_PREFIX}" \ + --host="$CARCH"-w64-mingw32 + mingw32-make LDFLAGS="-pipe" +} + +check() { + cd "${srcdir}"/../.. + mingw32-make check +} + +package() { + cd "${srcdir}"/../.. + mingw32-make DESTDIR="${pkgdir}" install + mkdir -p "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" + mv "${pkgdir}${MINGW_PREFIX}"/*.pdf "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}" +}