Wrote a more comprehensive Build action.

This commit is contained in:
Wen Kokke 2021-09-01 19:42:29 +01:00
parent 701b21bf49
commit 20a928f74e
No known key found for this signature in database
GPG key ID: 7EB7DBBCEB539DB8

View file

@ -5,11 +5,39 @@ name: Build
jobs: jobs:
build: build:
runs-on: macOS-latest runs-on: macOS-latest
strategy: strategy:
matrix: matrix:
ghc: ['8.10.5'] ghc: ['8.10.5']
steps: steps:
- name: Get Gem Installation Directory
id: get-gemdir
run: |
echo "::set-output name=gemdir::$(gem env gemdir)"
shell: bash
- name: Get Agda version
id: get-agda-version
run: |
echo "::set-output name=agda-version::$(cat plfa.cabal | sed -n -e 's/^.*Agda\s*==\(\S*\)\s*/\1/p')"
shell: bash
- uses: actions/cache@v2
name: Cache files
id: cache
with:
path: |
~/.stack
~/.local
${{ steps.get-gemdir.outputs.gemdir }}
$GITHUB_WORKSPACE/.stack-work
$GITHUB_WORKSPACE/_build
$GITHUB_WORKSPACE/_cache
$GITHUB_WORKSPACE/_site
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ steps.get-agda-version.outputs.agda-version }}
- name: Setup Haskell - name: Setup Haskell
uses: haskell/actions/setup@v1 uses: haskell/actions/setup@v1
with: with:
@ -17,6 +45,9 @@ jobs:
enable-stack: true enable-stack: true
stack-version: 'latest' stack-version: 'latest'
- name: Setup HTMLProofer
run: sudo gem install html-proofer
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@ -25,8 +56,5 @@ jobs:
- name: Build website - name: Build website
run: make build run: make build
- name: Install HTMLProofer
run: sudo gem install html-proofer
- name: Test website - name: Test website
run: make test run: make test