-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
74 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,77 @@ | ||
# This workflow inspired by the workflow at | ||
# jonsterling/agda-calf | ||
on: [push] | ||
|
||
jobs: | ||
typechecking: | ||
runs-on: ubuntu-latest | ||
name: Typechecking | ||
steps: | ||
- name: "Clone repository" | ||
uses: actions/checkout@v2 | ||
- name: Run Agda | ||
id: typecheck | ||
uses: ayberkt/[email protected] | ||
with: | ||
main-file: index.agda | ||
source-dir: src | ||
unsafe: true | ||
- name: Upload HTML | ||
id: html-upload | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: html | ||
path: html | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
strategy: | ||
matrix: | ||
agda-ref: ["v2.6.3"] | ||
ghc-ver: ["8.10.2"] | ||
cabal-ver: ["3.4.0.0"] | ||
cubical-ref: ["rahulc29/realizability"] | ||
steps: | ||
- uses: actions/cache@v2 | ||
name: Cache cabal packages | ||
id: cache-cabal | ||
with: | ||
path: | | ||
~/.cabal/packages | ||
~/.cabal/store | ||
~/.cabal/bin | ||
~/.local/bin | ||
dist-newstyle | ||
key: ${{ runner.os }}-${{ matrix.ghc-ver }}-${{ matrix.cabal-ver }}-${{ matrix.agda-ref }} | ||
- name: Install cabal | ||
if: steps.cache-cabal.outputs.cache != 'true' | ||
uses: actions/[email protected] | ||
with: | ||
ghc-version: ${{ matrix.ghc-ver }} | ||
cabal-version: ${{ matrix.cabal-ver }} | ||
- name: Put cabal binaries in PATH | ||
run: echo "~/.cabal/bin" >> $GITHUB_PATH | ||
- name: Download Agda from Github | ||
if: steps.cache-cabal.outputs.cache-hit != 'true' | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: agda/agda | ||
path: agda | ||
ref: ${{ matrix.agda-ref }} | ||
- name: Install Agda | ||
if: steps.cache-cabal.outputs.cache-hit != 'true' | ||
run: | | ||
cabal update | ||
cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' alex-3.2.5 | ||
cabal install --overwrite-policy=always --ghc-options='-O2 +RTS -M6G -RTS' happy-1.19.12 | ||
cd agda | ||
mkdir -p doc | ||
touch doc/user-manual.pdf | ||
cabal install --overwrite-policy=always --ghc-options='-O1 +RTS -M6G -RTS' | ||
- name: Checkout realizability fork of Cubical | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: rahulc29/cubical | ||
path: cubical | ||
ref: ${{ matrix.cubical-ref }} | ||
- name: Put cubical library in Agda library list | ||
run: | | ||
mkdir -p ~/.agda/ | ||
touch ~/.agda/libraries | ||
echo "$GITHUB_WORKSPACE/cubical/cubical.agda-lib" > ~/.agda/libraries | ||
- name: Checkout master | ||
uses: actions/checkout@v2 | ||
with: | ||
path: master | ||
|
||
- name: Compile main library | ||
run: | | ||
mkdir -p ~/main-build/_build | ||
cp -f -R ~/main-build/_build $GITHUB_WORKSPACE/main/_build | ||
rm -r ~/main-build | ||
cd master | ||
cd src | ||
agda --html --html-dir=../docs index.agda | ||
cp -f -R main/ ~/main-build/ |