Skip to content

feat: incremental elaboration of Verso documents #222

feat: incremental elaboration of Verso documents

feat: incremental elaboration of Verso documents #222

Workflow file for this run

on:
push:
pull_request:
name: Continuous Integration
jobs:
build:
name: test
runs-on: ubuntu-latest
steps:
- name: install elan
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v3.0.0/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- name: List all files
run: |
find . -name "*.lean" -type f
- name: lean version
run: |
lean --version
- name: Cache .lake
uses: actions/cache@v3
with:
path: .lake
key: ${{ runner.os }}-${{ hashFiles('lake-manifest.json') }}-${{ hashFiles('lean-toolchain') }}
- name: Build the project
run: |
lake build
- name: Generate the example website
run: |
lake exe demosite --output _out/examples/demosite
- name: Check internal links on the example website
uses: lycheeverse/[email protected]
with:
format: markdown
jobSummary: true
args: --base './_out/examples/demosite' --no-progress --offline './_out/examples/demosite/**/*.html'
- name: Check for consistent Subverso versions in all manifests
run: |
echo "Subverso versions:"
find . -name lake-manifest.json -print0 | xargs -0 jq '.packages[] | select(.name == "subverso") | {"file": input_filename, "subverso": .rev}'
find . -name lake-manifest.json -print0 | xargs -0 jq -e -s 'map(.packages[] | select(.name == "subverso").rev) | .[0] as $x | all(.[]; . == $x)'
- name: Install PDF Dependencies
run: sudo apt update && sudo apt install -y pandoc texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-luatex fonts-dejavu
- name: Generate the manual
run: |
./generate.sh
cp _out/tex/main.pdf ./manual.pdf
cp -r _out/html-single html-single-page
zip -r html-single-page.zip html-single-page
- name: Upload docs to artifact storage
if: github.ref != 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: "Verso manual (PDF and HTML)"
path: |
manual.pdf
html-single-page.zip
- uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/main'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Verso manual (PDF and HTML)"
files: |
manual.pdf
html-single-page.zip