Skip to content

Example: Treap data structure #118

Example: Treap data structure

Example: Treap data structure #118

Workflow file for this run

name: Compile Agda and Deploy HTML
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
timeout-minutes: 60
strategy:
matrix:
agda-ref: ["v2.6.3"]
stdlib-ref: ["fc473ec905ab1a11a16718a7e8b628f1ab7eb435"]
ghc-ver: ["8.10.2"]
cabal-ver: ["3.4.0.0"]
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-hit != 'true'
uses: actions/[email protected]
with:
ghc-version: ${{ matrix.ghc-ver }}
cabal-version: ${{ matrix.cabal-ver }}
- name: Put cabal programs 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 standard library
uses: actions/checkout@v2
with:
repository: agda/agda-stdlib
path: stdlib
ref: ${{ matrix.stdlib-ref }}
- name: Put standard library in Agda library list
run: |
mkdir -p ~/.agda/
touch ~/.agda/libraries
echo "$GITHUB_WORKSPACE/stdlib/standard-library.agda-lib" > ~/.agda/libraries
- name: Checkout main
uses: actions/checkout@v2
with:
path: main
- 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 main
agda --html --html-dir=docs src/index.agda
cp Agda.css docs/
cd ..
cp -f -R main/ ~/main-build/
- name: Deploy html to github pages
if: ${{ github.event_name == 'push' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: main/docs