Skip to content

Commit

Permalink
Update CI to use correct base
Browse files Browse the repository at this point in the history
  • Loading branch information
Ailrun committed Oct 1, 2024
1 parent c79194f commit 68ee200
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,11 @@ jobs:
script: |
startGroup "Build binary"
make pretty-timed
if [[ "${{ env.DOC_DEPLOY }}" == 'true' ]]; then
make coqdoc
fi
endGroup
startGroup "Build HTMLs for GitHub pages"
if [[ "${{ env.DOC_DEPLOY }}" == 'true' ]]; then
make coqdoc
make depgraphdoc
DOC_BASE="${{ env.DOC_DEPLOY_DEST }}" make depgraphdoc
mv theories/html html
mv theories/dep.html html/dep.html
cp assets/styling.css html/styling.css
Expand Down
5 changes: 3 additions & 2 deletions scripts/generate_dep.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import itertools, re, sys, textwrap
import itertools, os, re, sys, textwrap
from pathlib import Path
from typing import Iterable

Expand All @@ -20,6 +20,7 @@

GRAPH_SET: set[str] = set()
RANKED_GRAPH_SET: set[str] = set()
DOC_BASE = os.environ["DOC_BASE"] if "DOC_BASE" in os.environ else ""

def under_subgraph(name: str, body: str) -> str:
return f"""subgraph "{name}" {{ {body} }}"""
Expand Down Expand Up @@ -93,7 +94,7 @@ def gen_graph() -> str:
return textwrap.dedent(f"""
digraph Mcltt {{
graph [center=true,class="depgraph",cluster=true,fontname="Open Sans",fontsize=28,label="Mcltt",labeljust=l,labelloc=t,penwidth=2,size=15,splines=true,tooltip=""];
node [fontsize=18,shape=note,style=filled,URL="https://beluga-lang.github.io/McLTT/\\N.html"];
node [fontsize=18,shape=note,style=filled,URL="https://beluga-lang.github.io/McLTT/{DOC_BASE}/\\N.html"];
{default_subgraph_decl("Algorithmic")}
{default_subgraph_decl("Core")}
{core_subgraph_decl("Completeness")}
Expand Down
3 changes: 2 additions & 1 deletion theories/CoqMakefile.mk.local-late
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ COQDOCFLAGS := \
--index indexpage --no-lib-name --parse-comments \
--with-header $(EXTRA_DIR)/header.html --with-footer $(EXTRA_DIR)/footer.html
export COQDOCFLAGS
DOC_BASE ?= ""

post-all:: $(COQPARSERFILE) $(PARSERMESSAGEEXTRACTIONFILE) check_parserMessages
@echo "Separate Extraction main." | $(COQTOP) $(COQFLAGS) $(COQLIBS) -topfile Entrypoint.v -l Entrypoint.v
Expand Down Expand Up @@ -56,7 +57,7 @@ $(DEPGRAPHDOT): $(VFILES) $(DEPGRAPHSCRIPT)
@coqdep $(VFILES) -f _CoqProject | python3 "$(DEPGRAPHSCRIPT)" | tred > "$@"

$(DEPGRAPHDOC): $(DEPGRAPHDOT) $(DEPPOSTPROCESSSCRIPT)
@dot -T svg "$(DEPGRAPHDOT)" | python3 "$(DEPPOSTPROCESSSCRIPT)" > "$(DEPGRAPHDOC)"
@DOC_BASE=$(DOC_BASE) dot -T svg "$(DEPGRAPHDOT)" | python3 "$(DEPPOSTPROCESSSCRIPT)" > "$(DEPGRAPHDOC)"

.PHONY: depgraphdoc
depgraphdoc: $(DEPGRAPHDOC)
Expand Down

0 comments on commit 68ee200

Please sign in to comment.