Wrote a more comprehensive Build action.
This commit is contained in:
parent
701b21bf49
commit
20a928f74e
1 changed files with 31 additions and 3 deletions
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue