Skip to content

Commit

Permalink
WIP more github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Jun 13, 2021
1 parent 5da768f commit 59e55d3
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build and test

on: [push, pull_request]
on: [push, pull_request, release]

jobs:
build-ubuntu:
Expand Down Expand Up @@ -77,3 +77,36 @@ jobs:
run: make
- name: Test
run: make check

release:
name: Release
if: github.event_name != 'pull_request'
#needs: [ build-ubuntu, build-mac, build-windows ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Install dependencies
run: sudo apt-get install automake flex llvm-dev lcov libdw-dev
- name: Generate configure script
run: ./autogen.sh
- name: Configure
run: >-
./configure --enable-vhpi --with-llvm=/usr/bin/llvm-config \
--prefix=/opt/nvc-${{ steps.get_version.outputs.VERSION }}
- name: Build
run: make
- name: Install
run: sudo make install
- name: Archive
run: >-
tar -czf nvc-${{ steps.get_version.outputs.VERSION }}.tar.gz \
/opt/nvc-${{ steps.get_version.outputs.VERSION }}
- name: 'Upload artefact'
uses: actions/upload-artifact@v2
with:
path: nvc-${{ steps.get_version.outputs.VERSION }}.tar.gz

0 comments on commit 59e55d3

Please sign in to comment.