Merge pull request #398 from umarcor/ci/msys2

CI: test on MINGW64 and MINGW32, use PKGBUILD recipe
This commit is contained in:
Stephen Williams 2020-12-03 15:44:11 -08:00 committed by GitHub
commit df72e1d362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 69 additions and 16 deletions

View File

@ -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

37
msys2/PKGBUILD Normal file
View File

@ -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}"
}