feat: add distributed owner SSD backing tier for KV cache storage #272
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: doc_site_builder_image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: doc-site-builder-image-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| DOC_SITE_IMAGE_REF: fluxon-doc-site-builder:quartz-v5.0.0-node-v24.16.0 | |
| DOC_SITE_IMAGE_TAR: fluxon_release/test_rsc/doc_site_builder_image.tar | |
| jobs: | |
| build-image: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install host dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends \ | |
| git \ | |
| rsync | |
| - name: Verify Docker availability | |
| run: | | |
| command -v docker >/dev/null | |
| if ! docker info >/dev/null 2>&1; then | |
| sudo systemctl start docker | |
| docker info >/dev/null | |
| fi | |
| docker version | |
| - name: Install Python dependencies | |
| run: python3 -m pip install PyYAML | |
| - name: Run doc-site image unit tests | |
| run: | | |
| python3 -m unittest \ | |
| setup_and_pack.tests.test_build_doc_site_img \ | |
| setup_and_pack.tests.test_build_doc_site_in_container \ | |
| setup_and_pack.tests.test_doc_site_builder_image_workflow | |
| - name: Build and export doc-site builder image | |
| run: | | |
| python3 setup_and_pack/build_doc_site_img.py \ | |
| --force \ | |
| --out "$DOC_SITE_IMAGE_TAR" | |
| sha256sum "$DOC_SITE_IMAGE_TAR" > "$DOC_SITE_IMAGE_TAR.sha256" | |
| - name: Verify prewarmed image contents | |
| run: | | |
| docker run --rm --entrypoint /bin/bash "$DOC_SITE_IMAGE_REF" -lc ' | |
| set -euo pipefail | |
| node --version | |
| npm --version | |
| python3 --version | |
| quartz_root=/opt/fluxon_doc_site_cache/toolchain/quartz | |
| test -d "$quartz_root/node_modules" | |
| test -d "$quartz_root/.quartz/plugins/note-properties/dist" | |
| git_count=$(find "$quartz_root/.quartz/plugins" -mindepth 2 -maxdepth 2 -type d -name .git -print | wc -l | tr -d "[:space:]") | |
| node_modules_count=$(find "$quartz_root/.quartz/plugins" -mindepth 2 -maxdepth 2 -type d -name node_modules -print | wc -l | tr -d "[:space:]") | |
| echo "plugin_git_dirs=$git_count plugin_node_modules=$node_modules_count" | |
| test "$git_count" = 42 | |
| test "$node_modules_count" = 0 | |
| ' | |
| - name: Set doc site base URL | |
| shell: bash | |
| run: | | |
| owner="${GITHUB_REPOSITORY_OWNER,,}" | |
| repo="${GITHUB_REPOSITORY#*/}" | |
| if [[ "$repo" == *.github.io ]]; then | |
| base_url="${repo,,}" | |
| else | |
| base_url="${owner}.github.io/${repo}" | |
| fi | |
| echo "FLUXON_DOC_SITE_BASE_URL=$base_url" >> "$GITHUB_ENV" | |
| - name: Smoke build docs from exported image tar | |
| run: | | |
| docker image rm -f "$DOC_SITE_IMAGE_REF" || true | |
| python3 scripts/build_doc_site_in_container.py \ | |
| --repo-root "$PWD" \ | |
| --image-tar "$DOC_SITE_IMAGE_TAR" \ | |
| --base-url "$FLUXON_DOC_SITE_BASE_URL" | |
| - name: Upload doc-site builder image | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doc-site-builder-image-${{ github.sha }} | |
| if-no-files-found: error | |
| compression-level: 0 | |
| path: | | |
| fluxon_release/test_rsc/doc_site_builder_image.tar | |
| fluxon_release/test_rsc/doc_site_builder_image.tar.input.sha256 | |
| fluxon_release/test_rsc/doc_site_builder_image.tar.sha256 | |
| - name: Upload doc-site smoke output | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doc-site-smoke-output-${{ github.sha }} | |
| if-no-files-found: warn | |
| compression-level: 1 | |
| path: fluxon_release/doc_site/** |