Commit 9d15385e by Zachary Snow

switch from Travis CI to GitHub Actions

parent eebe4142
name: Test
on: push
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, macOS-10.14]
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-2
restore-keys: ${{ runner.OS }}-iverilog-10-2
- name: Install iverilog
run: |
if [ "${{ runner.OS }}" = "Linux" ]; then
if [ ! -e "$HOME/.local/bin/iverilog" ]; then
curl --retry-max-time 60 -L https://github.com/steveicarus/iverilog/archive/v10_2.tar.gz > iverilog.tar.gz
tar -xzf iverilog.tar.gz
cd iverilog-10_2
autoconf
./configure --prefix=$HOME/.local
make
make install
cd ..
fi
fi
- name: Cache Build
uses: actions/cache@v1
with:
path: ~/.stack
key: ${{ runner.OS }}-${{ hashFiles('**/stack.yaml') }}-${{ hashFiles('**/sv2v.cabal') }}
restore-keys: |
${{ runner.OS }}-${{ hashFiles('**/stack.yaml') }}-${{ hashFiles('**/sv2v.cabal') }}
${{ runner.OS }}-${{ hashFiles('**/stack.yaml') }}-
${{ runner.OS }}-
- name: Build
run: make
- name: Test
run: |
export PATH="$PATH:$HOME/.local/bin"
make test
language: generic
matrix:
include:
- os: linux
dist: xenial
- os: osx
osx_image: xcode11
cache:
directories:
- $HOME/.stack
- $HOME/.local
addons:
apt:
packages:
- shunit2
# for stack
- libgmp-dev
# for iverilog
- flex
- bison
- autoconf
- gperf
homebrew:
packages:
- haskell-stack
- shunit2
- icarus-verilog
before_install:
- |
set -ex
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
orig_pwd=$PWD
mkdir -p ~/.local/bin
export PATH=$HOME/.local/bin:$PATH
# install the latest version of stack
if [ ! -e "$HOME/.local/bin/stack" ]; then
# based on: https://raw.githubusercontent.com/commercialhaskell/stack/stable/doc/travis-simple.yml
travis_retry curl --retry-max-time 60 -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz > stack.tar.gz
tar -xzf stack.tar.gz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
# install iverilog 10.2
if [ ! -e "$HOME/.local/bin/iverilog" ]; then
travis_retry curl --retry-max-time 60 -L https://github.com/steveicarus/iverilog/archive/v10_2.tar.gz > v10_2.tar.gz
tar -xzf v10_2.tar.gz
cd iverilog-10_2
autoconf
./configure --prefix=$HOME/.local
make
make install
cd ..
fi
cd $orig_pwd
fi
set +ex
- which stack iverilog shunit2
- stack --numeric-version
- iverilog -V 2> /dev/null | head -n 1
install:
make
script:
make test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment