From db9c54bbd845d8db1e65a13d38636d1da48b20e0 Mon Sep 17 00:00:00 2001 From: Sam Huang Date: Mon, 27 Oct 2025 01:40:45 -0700 Subject: [PATCH 1/4] Doxygen: disable source browsing / inline sources / verbatim headers --- Doxyfile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Doxyfile b/Doxyfile index 81952e8..48f55bf 100644 --- a/Doxyfile +++ b/Doxyfile @@ -83,14 +83,18 @@ PREDEFINED = EXPAND_AS_DEFINED = # Source browsing -SOURCE_BROWSER = YES -INLINE_SOURCES = YES -VERBATIM_HEADERS = YES +# Disable embedding source code and inline sources in the generated documentation +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +# Do not include verbatim copies of headers in the output +VERBATIM_HEADERS = NO +# Keep stripping special comment blocks from source fragments (not used when sources are disabled) STRIP_CODE_COMMENTS = YES REFERENCED_BY_RELATION = YES REFERENCES_RELATION = YES REFERENCES_LINK_SOURCE = YES -SOURCE_TOOLTIPS = YES +# Disable source tooltips since source browsing is disabled +SOURCE_TOOLTIPS = NO # HTML output configuration GENERATE_HTML = YES From 2df04fde8a0bdb4ffdb38cc97a36544e4a794f29 Mon Sep 17 00:00:00 2001 From: Sam Huang Date: Mon, 27 Oct 2025 09:41:02 -0700 Subject: [PATCH 2/4] Make Doxygen generate to build/ and add workflow to publish it --- .github/workflows/gh-pages.yml | 42 ++++++++++++++++++++++++++++++++++ .gitignore | 23 ++++++++----------- Doxyfile | 2 +- include/.gitignore | 2 ++ 4 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/gh-pages.yml create mode 100644 include/.gitignore diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..10ade31 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,42 @@ +name: GitHub Pages + +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: gh-pages-deploy + cancel-in-progress: true + +jobs: + build-and-deploy: + name: Build and Deploy + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: false + + - name: Initialize doxygen-awesome-css submodule + run: git submodule update --init --depth 1 doxygen-awesome-css + + - name: Install Doxygen and Graphviz + run: | + sudo apt-get update + sudo apt-get install doxygen graphviz + + - name: Run Doxygen + run: doxygen + + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build/html + publish_branch: gh-pages diff --git a/.gitignore b/.gitignore index bfa3eea..65df891 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,11 @@ -/* -**/.cache -**/.clangd -**/compile_flags.txt +code/ +build/ -!include/ -!leetcode/ -!test/ -!.github/ -!.clang-format -!ruff.toml -!README.md -!CMakeLists.txt -!ac-library +.venv/ +.ruff_cache/ +.zed/ +.fastolympiccoding/ +**/.cache/ + +compile_commands.json +.clangd diff --git a/Doxyfile b/Doxyfile index 48f55bf..cf344a0 100644 --- a/Doxyfile +++ b/Doxyfile @@ -26,7 +26,7 @@ PROJECT_BRIEF = "API reference and notes for competitive-programming" PROJECT_NUMBER = # Where to put the generated documentation (relative to where doxygen is run) -OUTPUT_DIRECTORY = docs/doxygen +OUTPUT_DIRECTORY = build # Create subdirectories for output files (useful for large projects) CREATE_SUBDIRS = YES diff --git a/include/.gitignore b/include/.gitignore new file mode 100644 index 0000000..6efe29b --- /dev/null +++ b/include/.gitignore @@ -0,0 +1,2 @@ +.clangd +compile_flags.txt From 330d80d51d20b2fe5b9c105dd55771f99116a827 Mon Sep 17 00:00:00 2001 From: Sam Huang Date: Mon, 27 Oct 2025 09:41:37 -0700 Subject: [PATCH 3/4] Rename test.yml to check.yml and update workflow --- .github/workflows/check.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..c8dd4a0 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,24 @@ +name: Check + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Configure tests + run: cmake . -B build + + - name: Build tests + run: cmake --build build --target all --parallel + + - name: Run tests + run: ctest --test-dir build --output-on-failure -j From 77d349df7df8d1e5ee2a7c35d50ee8bf6fbd5fc2 Mon Sep 17 00:00:00 2001 From: Sam Huang Date: Mon, 27 Oct 2025 09:44:58 -0700 Subject: [PATCH 4/4] Delete test.yml --- .github/workflows/test.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 0302358..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,21 +0,0 @@ -on: - push: - branches: - - master - pull_request: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Configure tests - run: cmake . -B build - - - name: Build tests - run: cmake --build build --target all --parallel - - - name: Run tests - run: ctest --test-dir build --output-on-failure -j