Skip to content

Commit 88ed518

Browse files
authored
Merge branch 'main' into eHoare-example
2 parents 5fdfc42 + a0bf172 commit 88ed518

120 files changed

Lines changed: 5464 additions & 1495 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Build documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- "main"
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "refman"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v6
28+
with:
29+
node-version: "20"
30+
31+
- name: Install npm dependencies
32+
run: |
33+
make -C doc ecproof-deps
34+
35+
- name: Set up Python
36+
uses: actions/setup-python@v6
37+
with:
38+
python-version: "3.13"
39+
40+
- name: Install Python dependencies
41+
run: |
42+
make -C doc sphinx-deps
43+
44+
- name: Set-up OCaml
45+
uses: ocaml/setup-ocaml@v3
46+
with:
47+
ocaml-compiler: 5.4
48+
opam-disable-sandboxing: true
49+
dune-cache: true
50+
51+
- name: Install EasyCrypt dependencies
52+
run: |
53+
opam pin add -n easycrypt .
54+
opam install --deps-only --depext-only --confirm-level=unsafe-yes easycrypt
55+
opam install --deps-only easycrypt
56+
57+
- name: Compile & Install EasyCrypt
58+
run: |
59+
opam exec -- make PROFILE=release install
60+
61+
- name: Build Sphinx HTML
62+
run: |
63+
opam exec -- make -C doc ecproof-bundle sphinx-html
64+
65+
- name: Upload documentation (artifact)
66+
uses: actions/upload-artifact@v6
67+
with:
68+
name: refman
69+
path: doc/_build/html
70+
71+
deploy:
72+
runs-on: ubuntu-latest
73+
needs: build
74+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
75+
76+
steps:
77+
- name: Download documentation (artifact)
78+
uses: actions/download-artifact@v7
79+
with:
80+
name: refman
81+
path: _refman
82+
83+
- name: Deploy documentation
84+
env:
85+
PAGES_TOKEN: ${{ secrets.PAGES_REPO_TOKEN }}
86+
PAGES_REPO: EasyCrypt/refman
87+
TARGET_DIR: refman
88+
BUILD_DIR: _refman
89+
90+
run: |
91+
set -euo pipefail
92+
93+
git config --global user.name "github-actions[bot]"
94+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
95+
96+
git clone --depth 1 https://x-access-token:${PAGES_TOKEN}@github.com/${PAGES_REPO}.git pages-repo
97+
98+
rm -rf "pages-repo/${TARGET_DIR}"
99+
mkdir -p "pages-repo/${TARGET_DIR}"
100+
touch "pages-repo/${TARGET_DIR}"/.keep
101+
102+
cp -a "${BUILD_DIR}/." "pages-repo/${TARGET_DIR}/"
103+
104+
git -C pages-repo add -A
105+
106+
if git -C pages-repo diff --cached --quiet; then
107+
echo "No changes to deploy."
108+
exit 0
109+
fi
110+
111+
git -C pages-repo commit -m "Update docs: ${GITHUB_REPOSITORY}@${GITHUB_SHA}"
112+
git -C pages-repo push origin main

INSTALL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,9 @@ proceed to [install EasyCrypt from Source](#installing-easycrypt-from-source).
522522
- [OCaml ini-files](https://opam.ocaml.org/packages/ocaml-inifiles/) (version >= 1.2)
523523
Additional resources:
524524
- http://archive.ubuntu.com/ubuntu/pool/universe/o/ocaml-inifiles
525+
- [OCaml Markdown](https://github.com/gildor478/ocaml-markdown)
526+
Additional resources:
527+
- https://opam.ocaml.org/packages/markdown
525528
- [Python3](https://www.python.org/downloads)
526529
You also need to install the following libraries:
527530
- [Python3 YAML](https://pyyaml.org/wiki/PyYAMLDocumentation)

assets/.gitignore

Whitespace-only changes.

assets/styles/styles.css

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
/* General Styling */
2+
/* Body */
3+
body {
4+
font-family: "-apple-system", "BlinkMacSystemFont", "Roboto", "Arial", sans-serif;
5+
line-height: 1.2;
6+
font-size: 16px;
7+
margin: 0;
8+
padding: 0;
9+
color: #333;
10+
background-color: #f9f9f9;
11+
}
12+
13+
/* Code blocks */
14+
pre {
15+
font-family: "Fira Code", "Consolas", monospace;
16+
font-size: 1rem;
17+
padding: 5px;
18+
border-radius: 1px;
19+
color: #2d2d2d;
20+
background-color: #ecf0f1;
21+
}
22+
23+
/* Inline code */
24+
code {
25+
font-family: "Fira Code", "Consolas", monospace;
26+
font-size: 1rem;
27+
color: #d6336c;
28+
}
29+
30+
/* Headings */
31+
h1, h2, h3, h4, h5, h6 {
32+
font-family: "Roboto", "Arial", sans-serif;
33+
font-weight: 600;
34+
color: #1a1a1a;
35+
margin-bottom: 0.5em;
36+
}
37+
38+
h1 {
39+
font-size: 2.25rem;
40+
}
41+
h2 {
42+
font-size: 2rem;
43+
}
44+
h3 {
45+
font-size: 1.75rem;
46+
}
47+
h4 {
48+
font-size: 1.5rem;
49+
}
50+
h5 {
51+
font-size: 1.25rem;
52+
}
53+
h6 {
54+
font-size: 1rem;
55+
}
56+
57+
/* Links */
58+
a {
59+
font-family: "Roboto", "Arial", sans-serif;
60+
color: #007bff;
61+
text-decoration: none;
62+
}
63+
64+
a:hover {
65+
color: #0056b3;
66+
text-decoration: underline;
67+
}
68+
69+
.serif-text {
70+
font-family: "Times New Roman", "Times", serif;
71+
font-size: 1rem;
72+
color: #333;
73+
}
74+
75+
/* Specific styling */
76+
77+
/* Sidebar */
78+
.sidebar {
79+
width: 200px;
80+
background-color: #2c3e50;
81+
color: #ecf0f1;
82+
position: fixed;
83+
height: 100%;
84+
overflow: auto;
85+
}
86+
87+
.sidebar-title {
88+
padding: 20px;
89+
color: #ecf0f1;
90+
background-color: #34495e;
91+
margin-bottom: 20px;
92+
}
93+
94+
.sidebar-title h2 {
95+
font-size: 1.5em;
96+
margin-bottom: 5px;
97+
color: #ecf0f1;
98+
}
99+
100+
.sidebar-title .sidebar-title-theory {
101+
font-size: 1.2em;
102+
color: #3498db;
103+
}
104+
105+
.sidebar-title-theory {
106+
word-wrap: break-word;
107+
overflow-wrap: break-word;
108+
white-space: normal;
109+
}
110+
111+
.sidebar-elems {
112+
padding: 20px;
113+
}
114+
115+
.sidebar-section-list {
116+
list-style: none;
117+
padding: 0;
118+
}
119+
120+
.sidebar-section-list li {
121+
margin: 15px 0;
122+
}
123+
124+
.sidebar-section-list li a {
125+
color: #ecf0f1;
126+
font-weight: bold;
127+
}
128+
129+
/* Main content */
130+
main {
131+
margin-left: 220px;
132+
padding: 20px;
133+
max-width: 960px;
134+
}
135+
136+
.page-heading-container {
137+
border-bottom: 2px solid #ddd;
138+
padding-bottom: 5px;
139+
margin-bottom: 20px;
140+
}
141+
142+
.page-heading-container .page-heading {
143+
margin-block-end: 5px;
144+
}
145+
146+
.page-heading-container .page-subheading {
147+
margin-block-start: 0px;
148+
margin-block-end: 5px;
149+
font-size: 1.2em;
150+
}
151+
152+
/* Sections */
153+
.item-section {
154+
margin-bottom: 40px;
155+
}
156+
157+
.section-heading {
158+
color: #34495e;
159+
border-bottom: 2px solid #ddd;
160+
padding-bottom: 10px;
161+
margin-bottom: 20px;
162+
}
163+
164+
/* Item lists */
165+
.item-list {
166+
list-style: none;
167+
padding: 0;
168+
}
169+
170+
.item-entry {
171+
display: flex;
172+
flex-direction: column;
173+
margin-bottom: 20px;
174+
}
175+
176+
.item-name-desc-container {
177+
display: flex;
178+
align-items: flex-start;
179+
}
180+
181+
.item-name {
182+
width: 200px;
183+
font-weight: bold;
184+
color: #2980b9;
185+
white-space: normal;
186+
overflow-wrap: break-word;
187+
}
188+
189+
.item-basic-desc {
190+
flex: 1;
191+
margin-left: 10px;
192+
}
193+
194+
.item-basic-desc p {
195+
margin-top: 0px;
196+
}
197+
198+
.item-details {
199+
margin-left: 210px;
200+
}
201+
202+
.item-details summary {
203+
cursor: pointer;
204+
color: #3498db;
205+
font-weight: bold;
206+
}
207+
208+
.item-details summary:hover {
209+
text-decoration: underline;
210+
}
211+
212+
.item-details-par {
213+
margin-top: 10px;
214+
}
215+
216+
/* Source code */
217+
pre.source {
218+
border: 2px solid #bdc3c7;
219+
padding: 10px;
220+
border-radius: 5px;
221+
overflow-x: auto;
222+
white-space: pre-wrap;
223+
}
224+
225+
/* Introduction section */
226+
.intro-section {
227+
margin-bottom: 40px;
228+
}

doc/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__pycache__/
2+
_build/

0 commit comments

Comments
 (0)