sv2v/.github/workflows/test.yaml

39 lines
1.1 KiB
YAML

name: Test
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macOS-latest]
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: |
brew install haskell-stack shunit2 icarus-verilog || ls
sudo apt-get install -y haskell-stack shunit2 flex bison autoconf gperf || ls
- name: Cache iverilog
uses: actions/cache@v1
with:
path: ~/.local
key: ${{ runner.OS }}-iverilog-10-3
restore-keys: ${{ runner.OS }}-iverilog-10-3
- name: Install iverilog
run: |
if [ "${{ runner.OS }}" = "Linux" ] && [ ! -e "$HOME/.local/bin/iverilog" ]; then
curl -L https://github.com/steveicarus/iverilog/archive/v10_3.tar.gz > iverilog-10_3.tar.gz
tar -xzf iverilog-10_3.tar.gz
cd iverilog-10_3
autoconf
./configure --prefix=$HOME/.local
make
make install
cd ..
fi
- name: Build
run: make
- name: Test
run: |
export PATH="$PATH:$HOME/.local/bin"
make test