Skip to content

Commit

Permalink
Add GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Dec 8, 2020
1 parent 0eb63c4 commit a5f29b3
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build and test

on: [push, pull_request]

jobs:
build-ubuntu:
name: Ubuntu 18.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install dependencies
run: sudo apt-get install automake flex llvm-dev check lcov
- name: Generate configure script
run: ./autogen.sh
- name: Configure
run: ./configure --enable-gcov --enable-vhpi --with-llvm=/usr/bin/llvm-config
- name: Build
run: make
- name: Test
run: make check
- name: Coverage report
run: make cov-generate
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/nvc.info

build-mac:
name: Mac OS X
runs-on: macos-10.15
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install dependencies
run: brew install llvm check automake
- name: Generate configure script
run: ./autogen.sh
- name: Configure
run: ./configure --enable-vhpi
- name: Build
run: make
- name: Test
run: make check
5 changes: 4 additions & 1 deletion test/Makemodule.am
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ cov-reset:
find $(top_builddir) -name '*.gcda' -exec rm {} \;
lcov --directory $(build) --zerocounters

cov-report:
cov-generate:
mkdir -p $(covdir)
lcov --directory $(build) --capture --output-file $(covdir)/nvc.info
lcov --remove $(covdir)/nvc.info '/usr/*' $(build)/src/lexer.c

cov-report: cov-generate
genhtml -o $(covdir) $(covdir)/nvc.info
-x-www-browser $(covdir)/index.html

Expand Down

0 comments on commit a5f29b3

Please sign in to comment.