Convert CI from Travis to GitHub Actions.
Copied and adapted from the master branch, with thanks to umarcor <unai.martinezcorral@ehu.eus> who did the original work.
This commit is contained in:
parent
b415678d5c
commit
9de8577e04
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
suffix=-11
|
||||||
|
|
||||||
|
git clone https://github.com/steveicarus/ivtest.git
|
||||||
|
cd ivtest
|
||||||
|
|
||||||
|
if [ "$OS" = 'Windows_NT' ]; then
|
||||||
|
perl update_msys2_report.pl
|
||||||
|
perl vvp_reg.pl $suffix
|
||||||
|
diff --strip-trailing-cr regression_report-msys2.txt regression_report.txt
|
||||||
|
else
|
||||||
|
perl vvp_reg.pl $suffix
|
||||||
|
diff regression_report-devel.txt regression_report.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
perl vpi_reg.pl $suffix
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
name: test
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
|
||||||
|
lin:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [
|
||||||
|
'18.04',
|
||||||
|
'20.04'
|
||||||
|
]
|
||||||
|
runs-on: ubuntu-${{ matrix.os }}
|
||||||
|
name: '🐧 Ubuntu ${{ matrix.os }}'
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt update -qq
|
||||||
|
sudo apt install -y make g++ git bison flex gperf libreadline-dev autoconf
|
||||||
|
|
||||||
|
- name: Build, install and check
|
||||||
|
run: |
|
||||||
|
autoconf
|
||||||
|
./configure
|
||||||
|
sudo make install
|
||||||
|
make check
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: ./.github/test.sh
|
||||||
|
|
||||||
|
|
||||||
|
win:
|
||||||
|
runs-on: windows-latest
|
||||||
|
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:
|
||||||
|
msystem: ${{ matrix.msystem }}
|
||||||
|
update: true
|
||||||
|
install: >
|
||||||
|
git
|
||||||
|
base-devel
|
||||||
|
mingw-w64-${{ matrix.arch }}-toolchain
|
||||||
|
|
||||||
|
- name: Build and check
|
||||||
|
run: |
|
||||||
|
cd msys2
|
||||||
|
makepkg-mingw --noconfirm --noprogressbar -sCLf
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: pacman -U --noconfirm msys2/*.zst
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
run: ./.github/test.sh
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.msystem }}-${{ matrix.arch }}
|
||||||
|
path: msys2/*.zst
|
||||||
71
.travis.yml
71
.travis.yml
|
|
@ -1,71 +0,0 @@
|
||||||
language: cpp
|
|
||||||
sudo: required
|
|
||||||
dist: xenial
|
|
||||||
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- gperf
|
|
||||||
|
|
||||||
sudo: false
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
|
|
||||||
- stage: Test
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
before_install:
|
|
||||||
- git clone https://github.com/steveicarus/ivtest.git
|
|
||||||
- export PATH=$HOME/bin:$PATH
|
|
||||||
script:
|
|
||||||
- autoconf
|
|
||||||
- ./configure --prefix=$HOME
|
|
||||||
- make install
|
|
||||||
- make check
|
|
||||||
- cd ivtest
|
|
||||||
- perl vvp_reg.pl
|
|
||||||
- diff regression_report-devel.txt regression_report.txt
|
|
||||||
- perl vpi_reg.pl
|
|
||||||
|
|
||||||
- stage: Test
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
before_install:
|
|
||||||
- git clone https://github.com/steveicarus/ivtest.git
|
|
||||||
- export PATH=$HOME/bin:$PATH
|
|
||||||
script:
|
|
||||||
- autoconf
|
|
||||||
- ./configure --prefix=$HOME
|
|
||||||
- make install
|
|
||||||
- make check
|
|
||||||
- cd ivtest
|
|
||||||
- perl vvp_reg.pl
|
|
||||||
- diff regression_report-devel.txt regression_report.txt
|
|
||||||
- perl vpi_reg.pl
|
|
||||||
|
|
||||||
- stage: Test
|
|
||||||
os: windows
|
|
||||||
before_install:
|
|
||||||
- git clone https://github.com/steveicarus/ivtest.git
|
|
||||||
- choco uninstall -y mingw
|
|
||||||
- choco upgrade --no-progress -y msys2
|
|
||||||
- export msys2='cmd //C RefreshEnv.cmd '
|
|
||||||
- export msys2+='& set MSYS=winsymlinks:nativestrict '
|
|
||||||
- export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start'
|
|
||||||
- export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --"
|
|
||||||
- export msys2+=" -msys2 -c "\"\$@"\" --"
|
|
||||||
- $msys2 pacman --sync --noconfirm --needed base-devel mingw-w64-x86_64-toolchain
|
|
||||||
script:
|
|
||||||
- $mingw64 ./autoconf.sh
|
|
||||||
- $mingw64 ./configure
|
|
||||||
- $mingw64 make install
|
|
||||||
- $mingw64 make check
|
|
||||||
- cd ivtest
|
|
||||||
- $mingw64 perl update_msys2_report.pl
|
|
||||||
- $mingw64 perl vvp_reg.pl
|
|
||||||
- diff --strip-trailing-cr regression_report-msys2.txt regression_report.txt
|
|
||||||
- $mingw64 perl vpi_reg.pl
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
_realname=iverilog
|
||||||
|
pkgbase=mingw-w64-${_realname}
|
||||||
|
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||||
|
pkgver=11-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
|
||||||
|
}
|
||||||
|
|
||||||
|
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}"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue