Skip to content

Commit 022a918

Browse files
ludamadludamad0Maddiaa0
authored
feat: barretenberg doxygen CI (AztecProtocol#3818)
First pass on doxygen CI. This is now uploading files to S3 based on running doxygen on the barretenberg codebase. - It's mostly a listing of everything's signature + source, and a few pieces of documentation. We can figure out a documentation plan from here - This needs to actually be pointed somewhere to be [slash]meaningful[/slash] convenient right now, but lives here https://aztec-ci-artifacts.s3.us-east-2.amazonaws.com/barretenberg-doxygen/3f0fad0de81d472cf71c03df11cf01ed6e7e09e0/index.html --------- Co-authored-by: ludamad <adam@aztecprotocol.com> Co-authored-by: Maddiaa <47148561+Maddiaa0@users.noreply.github.com>
1 parent b53bacf commit 022a918

File tree

6 files changed

+65
-1
lines changed

6 files changed

+65
-1
lines changed

.circleci/config.yml

+16
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,21 @@ jobs:
192192
name: "Build"
193193
command: cond_spot_run_build barretenberg-x86_64-linux-clang-sol 32
194194

195+
barretenberg-docs:
196+
machine:
197+
image: ubuntu-2204:2023.07.2
198+
resource_class: large
199+
steps:
200+
- *checkout
201+
- *setup_env
202+
- run:
203+
name: "Build barretenberg docs"
204+
command: build barretenberg-docs
205+
- run:
206+
name: "Deploy barretenberg docs"
207+
command: |
208+
barretenberg/cpp/docs/deploy_doxygen.sh
209+
195210
barretenberg-stdlib-tests:
196211
docker:
197212
- image: aztecprotocol/alpine-build-image
@@ -1091,6 +1106,7 @@ workflows:
10911106
- barretenberg-x86_64-linux-clang-assert
10921107
- noir-compile-acir-tests
10931108
<<: *defaults
1109+
- barretenberg-docs: *defaults
10941110
- bb-js:
10951111
requires:
10961112
- barretenberg-wasm-linux-clang

barretenberg/cpp/.dockerignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@
2020
!scripts/install-wasi-sdk.sh
2121
!scripts/strip-wasm.sh
2222
!./.clang-format
23-
!./format.sh
23+
!./format.sh
24+
25+
# Doxygen stuff.
26+
!docs

barretenberg/cpp/docs/Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM alpine:3.18 AS builder
2+
RUN apk update \
3+
&& apk upgrade \
4+
&& apk add --no-cache \
5+
doxygen
6+
WORKDIR /usr/src/barretenberg/cpp/
7+
COPY . .
8+
RUN doxygen docs/Doxyfile

barretenberg/cpp/docs/Doxyfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Minimal Doxyfile. See https://www.doxygen.nl/manual/config.html
2+
3+
# Project related configuration options
4+
DOXYFILE_ENCODING = UTF-8
5+
PROJECT_NAME = "barretenberg"
6+
7+
# Paths and filenames
8+
INPUT = src/barretenberg
9+
HTML_OUTPUT = docs/build
10+
FILE_PATTERNS = *.c \
11+
*.cpp \
12+
*.h \
13+
*.hpp
14+
RECURSIVE = YES
15+
16+
# Output format options
17+
GENERATE_HTML = YES
18+
GENERATE_LATEX = NO
19+
HAVE_DOT = NO
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Uploads to S3 the contents of a doxygen barretenberg C++ documentation build.
2+
# This is then to be used as a static website.
3+
#!/usr/bin/env bash
4+
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
5+
set -eu
6+
7+
extract_repo barretenberg-docs /usr/src extracted-repo
8+
9+
BUCKET_NAME="aztec-ci-artifacts"
10+
COMMIT_HASH="${COMMIT_HASH:-$(git rev-parse HEAD)}"
11+
TARGET_FOLDER="barretenberg-doxygen/$COMMIT_HASH"
12+
13+
echo "Uploading to s3://$BUCKET_NAME/$TARGET_FOLDER"
14+
aws s3 cp extracted-repo/src/barretenberg/cpp/docs/build "s3://$BUCKET_NAME/$TARGET_FOLDER" --recursive

build_manifest.yml

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ barretenberg-acir-tests-bb.js:
104104
- bb.js
105105
- noir-compile-acir-tests
106106

107+
barretenberg-docs:
108+
buildDir: barretenberg/cpp
109+
dockerfile: docs/Dockerfile
110+
107111
l1-contracts:
108112
buildDir: l1-contracts
109113

0 commit comments

Comments
 (0)