From fdabc15a19588e22539053358126d79b55eb0456 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 14 Aug 2025 14:22:29 +0900 Subject: [PATCH 01/17] Restore livedoc --- .github/workflows/doc-build.yml | 62 +++++++-------- .github/workflows/doc-publish.yml | 128 +++++++++++++++--------------- 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index c56e9a06346..ba2e6b734c7 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -44,7 +44,7 @@ jobs: path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ hashFiles('environment-${{ env.PYTHON_VERSION }}-linux.yml') }} - + - name: Compiler cache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -62,7 +62,7 @@ jobs: channel-priority: true activate-environment: sage-dev environment-file: environment-${{ env.PYTHON_VERSION }}-linux.yml - + - name: Build Sage shell: bash -l {0} run: | @@ -74,6 +74,7 @@ jobs: # # For pull requests # + - name: Get workflow run-id if: github.event_name == 'pull_request' run: | @@ -204,33 +205,32 @@ jobs: name: doc-${{ github.ref_name }} path: doc.zip - # The following fails randomly - # - name: Build live doc - # if: github.event_name != 'pull_request' - # shell: bash -l {0} - # run: | - # # Remove previous doc build - # rm -rf builddir/src/doc - # meson compile -C builddir doc-html - # env: - # SAGE_USE_CDNS: yes - # SAGE_LIVE_DOC: yes - # SAGE_JUPYTER_SERVER: binder:sagemath/sage-binder-env/dev - # SAGE_DOCBUILD_OPTS: "--include-tests-blocks" - - # - name: Copy live doc - # if: github.event_name != 'pull_request' - # run: | - # mkdir -p ./livedoc - # # We copy everything to a local folder - # cp -r builddir/src/doc/html livedoc/ - # cp builddir/src/doc/index.html livedoc/ - # zip -r livedoc.zip livedoc - - # - name: Upload live doc - # if: github.event_name != 'pull_request' - # uses: actions/upload-artifact@v4 - # with: - # name: livedoc - # path: livedoc.zip + - name: Build live doc + if: github.event_name != 'pull_request' + shell: bash -l {0} + run: | + # Remove previous doc build + rm -rf builddir/src/doc + meson compile -C builddir doc-html -j1 + env: + SAGE_USE_CDNS: yes + SAGE_LIVE_DOC: yes + SAGE_JUPYTER_SERVER: binder:sagemath/sage-binder-env/dev + SAGE_DOCBUILD_OPTS: "--include-tests-blocks" + + - name: Copy live doc + if: github.event_name != 'pull_request' + run: | + mkdir -p ./livedoc + # We copy everything to a local folder + cp -r builddir/src/doc/html livedoc/ + cp builddir/src/doc/index.html livedoc/ + zip -r livedoc.zip livedoc + + - name: Upload live doc + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: livedoc + path: livedoc.zip diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 025c36a577b..5454519a6fb 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -100,67 +100,67 @@ jobs: echo "::notice::The documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" if: steps.download-doc.outcome == 'success' - # publish-live-doc: - # runs-on: ubuntu-latest - # if: github.event.workflow_run.conclusion == 'success' - # env: - # CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' && secrets.NETLIFY_SITE_ID != '' }} - # steps: - # - name: Get information about workflow origin - # uses: potiuk/get-workflow-origin@v1_5 - # id: source-run-info - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # sourceRunId: ${{ github.event.workflow_run.id }} - # if: env.CAN_DEPLOY == 'true' - - # - name: Download live doc - # id: download-doc - # uses: actions/download-artifact@v4 - # with: - # name: livedoc - # github-token: ${{ secrets.GITHUB_TOKEN }} - # repository: ${{ github.repository }} - # run-id: ${{ github.event.workflow_run.id }} - # # if the doc was built for tag push (targetBranch contains the tag) - # if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch != 'develop' - - # - name: Extract live doc - # run: unzip livedoc.zip -d livedoc - # if: steps.download-doc.outcome == 'success' - - # - name: Create _headers file for permissive CORS - # run: | - # cat < livedoc/livedoc/_headers - # /* - # Access-Control-Allow-Origin: * - # Access-Control-Allow-Methods: GET - # Access-Control-Allow-Headers: Content-Type - # EOF - # if: steps.download-doc.outcome == 'success' - - # - name: Deploy to netlify with doc-TAG alias - # id: deploy-netlify - # uses: netlify/actions/cli@master - # with: - # args: deploy --dir=livedoc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} - # env: - # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - # NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.targetBranch }} - # NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }} - # if: steps.download-doc.outcome == 'success' - - # - name: Deploy to netlify with doc-release alias - # uses: netlify/actions/cli@master - # with: - # args: deploy --dir=livedoc/livedoc --message doc-release --alias doc-release - # env: - # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - # if: steps.download-doc.outcome == 'success' - - # - name: Report deployment url - # run: | - # echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" - # if: steps.download-doc.outcome == 'success' + publish-live-doc: + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' + env: + CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' && secrets.NETLIFY_SITE_ID != '' }} + steps: + - name: Get information about workflow origin + uses: potiuk/get-workflow-origin@v1_5 + id: source-run-info + with: + token: ${{ secrets.GITHUB_TOKEN }} + sourceRunId: ${{ github.event.workflow_run.id }} + if: env.CAN_DEPLOY == 'true' + + - name: Download live doc + id: download-doc + uses: actions/download-artifact@v4 + with: + name: livedoc + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + run-id: ${{ github.event.workflow_run.id }} + # if the doc was built for tag push (targetBranch contains the tag) + if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch != 'develop' + + - name: Extract live doc + run: unzip livedoc.zip -d livedoc + if: steps.download-doc.outcome == 'success' + + - name: Create _headers file for permissive CORS + run: | + cat < livedoc/livedoc/_headers + /* + Access-Control-Allow-Origin: * + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: Content-Type + EOF + if: steps.download-doc.outcome == 'success' + + - name: Deploy to netlify with doc-TAG alias + id: deploy-netlify + uses: netlify/actions/cli@master + with: + args: deploy --dir=livedoc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.targetBranch }} + NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }} + if: steps.download-doc.outcome == 'success' + + - name: Deploy to netlify with doc-release alias + uses: netlify/actions/cli@master + with: + args: deploy --dir=livedoc/livedoc --message doc-release --alias doc-release + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + if: steps.download-doc.outcome == 'success' + + - name: Report deployment url + run: | + echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" + if: steps.download-doc.outcome == 'success' From 7981088313d648f39072f2470569bd3390b77f72 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 14 Aug 2025 20:27:37 +0900 Subject: [PATCH 02/17] No tests block in releases --- .github/workflows/doc-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index ba2e6b734c7..42d0e141184 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -216,7 +216,6 @@ jobs: SAGE_USE_CDNS: yes SAGE_LIVE_DOC: yes SAGE_JUPYTER_SERVER: binder:sagemath/sage-binder-env/dev - SAGE_DOCBUILD_OPTS: "--include-tests-blocks" - name: Copy live doc if: github.event_name != 'pull_request' From 005e74c7d6059ecb20f70b581d193fce047ee5f9 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 14 Aug 2025 21:17:54 +0900 Subject: [PATCH 03/17] Build pdf docs too --- .github/workflows/doc-build-pdf.yml | 33 +++++++++++++++++++++++++++++ .github/workflows/doc-build.yml | 29 ------------------------- .github/workflows/doc-publish.yml | 6 +++--- 3 files changed, 36 insertions(+), 32 deletions(-) diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index 9e2726751cd..73083fc479e 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -148,3 +148,36 @@ jobs: with: name: doc-pdf path: doc-pdf.zip + + # + # On release events + # + + - name: Build live doc + if: github.event_name != 'pull_request' + run: | + # Avoid running out of disk space + rm -rf upstream + export SAGE_USE_CDNS=yes + export SAGE_LIVE_DOC=yes + export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev + make doc-clean doc-uninstall + ./config.status && make sagemath_doc_html-no-deps + shell: sh .github/workflows/docker-exec-script.sh BUILD /sage {0} + + - name: Copy live doc + if: github.event_name != 'pull_request' + run: | + mkdir -p ./livedoc + # We copy everything to a local folder + docker cp --follow-link BUILD:/sage/local/share/doc/sage/html livedoc + docker cp --follow-link BUILD:/sage/local/share/doc/sage/pdf livedoc + docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html livedoc + zip -r livedoc.zip livedoc + + - name: Upload live doc + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v4 + with: + name: livedoc + path: livedoc.zip diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 42d0e141184..07ef0fc450f 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -204,32 +204,3 @@ jobs: with: name: doc-${{ github.ref_name }} path: doc.zip - - - name: Build live doc - if: github.event_name != 'pull_request' - shell: bash -l {0} - run: | - # Remove previous doc build - rm -rf builddir/src/doc - meson compile -C builddir doc-html -j1 - env: - SAGE_USE_CDNS: yes - SAGE_LIVE_DOC: yes - SAGE_JUPYTER_SERVER: binder:sagemath/sage-binder-env/dev - - - name: Copy live doc - if: github.event_name != 'pull_request' - run: | - mkdir -p ./livedoc - # We copy everything to a local folder - cp -r builddir/src/doc/html livedoc/ - cp builddir/src/doc/index.html livedoc/ - zip -r livedoc.zip livedoc - - - name: Upload live doc - if: github.event_name != 'pull_request' - uses: actions/upload-artifact@v4 - with: - name: livedoc - path: livedoc.zip - diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 5454519a6fb..f4750c283d1 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -2,7 +2,7 @@ name: Publish documentation on: workflow_run: - workflows: ["Build documentation"] + workflows: ["Build documentation", "Build documentation (PDF)"] types: - completed @@ -12,8 +12,8 @@ permissions: pull-requests: write -# This workflow runs after doc-build workflow, taking the artifact -# (doc/livedoc) and deploying it to a netlify site. +# This workflow runs after doc-build and doc-build-pdf workflows, taking the +# artifact (doc/livedoc) and deploying it to a netlify site. # # event (triggered doc-build) URL (of the doc deployed to NETLIFY_SITE) # --------------------------- --------------------------------- From e48834155771d5859ea3b2f0d185d63693158ff6 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 15 Aug 2025 19:32:00 +0900 Subject: [PATCH 04/17] Add doc-publish-pdf.yml --- .github/workflows/doc-publish-pdf.yml | 90 +++++++++++++++++++++++++++ .github/workflows/doc-publish.yml | 72 +-------------------- 2 files changed, 93 insertions(+), 69 deletions(-) create mode 100644 .github/workflows/doc-publish-pdf.yml diff --git a/.github/workflows/doc-publish-pdf.yml b/.github/workflows/doc-publish-pdf.yml new file mode 100644 index 00000000000..179b3fc89a7 --- /dev/null +++ b/.github/workflows/doc-publish-pdf.yml @@ -0,0 +1,90 @@ +name: Publish documentation + +on: + workflow_run: + workflows: "Build documentation (PDF)" + types: + - completed + +permissions: + statuses: write + checks: write + pull-requests: write + + +# This workflow runs after doc-build-pdf workflow, taking the +# artifact livedoc and deploying it to a netlify site. +# +# event (triggered doc-build) URL (of the doc deployed to NETLIFY_SITE) +# --------------------------- --------------------------------- +# on push tag https://doc-release--NETLIFY_SITE +# +# where NETLIFY_SITE is presently sagemath.netlify.app for repo sagemath/sage. +# +# This workflow runs only if secrets NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID are set. + +jobs: + publish-live-doc: + runs-on: ubuntu-latest + if: github.event.workflow_run.conclusion == 'success' + env: + CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' && secrets.NETLIFY_SITE_ID != '' }} + steps: + - name: Get information about workflow origin + uses: potiuk/get-workflow-origin@v1_5 + id: source-run-info + with: + token: ${{ secrets.GITHUB_TOKEN }} + sourceRunId: ${{ github.event.workflow_run.id }} + if: env.CAN_DEPLOY == 'true' + + - name: Download live doc + id: download-doc + uses: actions/download-artifact@v4 + with: + name: livedoc + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + run-id: ${{ github.event.workflow_run.id }} + # if the doc was built for tag push (targetBranch contains the tag) + if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch != 'develop' + + - name: Extract live doc + run: unzip livedoc.zip -d livedoc + if: steps.download-doc.outcome == 'success' + + - name: Create _headers file for permissive CORS + run: | + cat < livedoc/livedoc/_headers + /* + Access-Control-Allow-Origin: * + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: Content-Type + EOF + if: steps.download-doc.outcome == 'success' + + - name: Deploy to netlify with doc-TAG alias + id: deploy-netlify + uses: netlify/actions/cli@master + with: + args: deploy --dir=livedoc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.targetBranch }} + NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }} + if: steps.download-doc.outcome == 'success' + + - name: Deploy to netlify with doc-release alias + uses: netlify/actions/cli@master + with: + args: deploy --dir=livedoc/livedoc --message doc-release --alias doc-release + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + if: steps.download-doc.outcome == 'success' + + - name: Report deployment url + run: | + echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" + if: steps.download-doc.outcome == 'success' diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index f4750c283d1..42eb340fd41 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -2,7 +2,7 @@ name: Publish documentation on: workflow_run: - workflows: ["Build documentation", "Build documentation (PDF)"] + workflows: "Build documentation" types: - completed @@ -12,15 +12,14 @@ permissions: pull-requests: write -# This workflow runs after doc-build and doc-build-pdf workflows, taking the -# artifact (doc/livedoc) and deploying it to a netlify site. +# This workflow runs after doc-build workflow, taking the +# artifact doc and deploying it to a netlify site. # # event (triggered doc-build) URL (of the doc deployed to NETLIFY_SITE) # --------------------------- --------------------------------- # on pull request https://doc-pr-12345--NETLIFY_SITE # on push branch develop https://doc-develop--NETLIFY_SITE # on push tag https://doc-10-4-beta2--NETLIFY_SITE -# on push tag https://doc-release--NETLIFY_SITE # # where NETLIFY_SITE is presently sagemath.netlify.app for repo sagemath/sage. # @@ -99,68 +98,3 @@ jobs: run: | echo "::notice::The documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" if: steps.download-doc.outcome == 'success' - - publish-live-doc: - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' - env: - CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' && secrets.NETLIFY_SITE_ID != '' }} - steps: - - name: Get information about workflow origin - uses: potiuk/get-workflow-origin@v1_5 - id: source-run-info - with: - token: ${{ secrets.GITHUB_TOKEN }} - sourceRunId: ${{ github.event.workflow_run.id }} - if: env.CAN_DEPLOY == 'true' - - - name: Download live doc - id: download-doc - uses: actions/download-artifact@v4 - with: - name: livedoc - github-token: ${{ secrets.GITHUB_TOKEN }} - repository: ${{ github.repository }} - run-id: ${{ github.event.workflow_run.id }} - # if the doc was built for tag push (targetBranch contains the tag) - if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch != 'develop' - - - name: Extract live doc - run: unzip livedoc.zip -d livedoc - if: steps.download-doc.outcome == 'success' - - - name: Create _headers file for permissive CORS - run: | - cat < livedoc/livedoc/_headers - /* - Access-Control-Allow-Origin: * - Access-Control-Allow-Methods: GET - Access-Control-Allow-Headers: Content-Type - EOF - if: steps.download-doc.outcome == 'success' - - - name: Deploy to netlify with doc-TAG alias - id: deploy-netlify - uses: netlify/actions/cli@master - with: - args: deploy --dir=livedoc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.targetBranch }} - NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }} - if: steps.download-doc.outcome == 'success' - - - name: Deploy to netlify with doc-release alias - uses: netlify/actions/cli@master - with: - args: deploy --dir=livedoc/livedoc --message doc-release --alias doc-release - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - if: steps.download-doc.outcome == 'success' - - - name: Report deployment url - run: | - echo "::notice::The live documentation has been deployed - ${{ steps.deploy-netlify.outputs.NETLIFY_URL }}" - if: steps.download-doc.outcome == 'success' From a97f4ef8e2224fb29aa57ef8af080404f8ac2db7 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 15 Aug 2025 22:10:18 +0900 Subject: [PATCH 05/17] Fix a bug --- .github/workflows/doc-build-pdf.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index 73083fc479e..dc7e5dbe67a 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -161,18 +161,17 @@ jobs: export SAGE_USE_CDNS=yes export SAGE_LIVE_DOC=yes export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev - make doc-clean doc-uninstall - ./config.status && make sagemath_doc_html-no-deps + make doc-clean doc-uninstall; make sagemath_doc_html-no-deps shell: sh .github/workflows/docker-exec-script.sh BUILD /sage {0} - name: Copy live doc if: github.event_name != 'pull_request' run: | - mkdir -p ./livedoc + # Reuse doc created previously, which contains pdfs + mv doc livedoc # We copy everything to a local folder docker cp --follow-link BUILD:/sage/local/share/doc/sage/html livedoc - docker cp --follow-link BUILD:/sage/local/share/doc/sage/pdf livedoc - docker cp --follow-link BUILD:/sage/local/share/doc/sage/index.html livedoc + docker cp BUILD:/sage/local/share/doc/sage/index.html livedoc zip -r livedoc.zip livedoc - name: Upload live doc From 2fc60b85a072555b27e4fc282affdac6ac086aa7 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Mon, 18 Aug 2025 09:54:44 +0900 Subject: [PATCH 06/17] Not using old github action --- .github/workflows/doc-publish-pdf.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/doc-publish-pdf.yml b/.github/workflows/doc-publish-pdf.yml index 179b3fc89a7..b68e358fd44 100644 --- a/.github/workflows/doc-publish-pdf.yml +++ b/.github/workflows/doc-publish-pdf.yml @@ -31,11 +31,21 @@ jobs: CAN_DEPLOY: ${{ secrets.NETLIFY_AUTH_TOKEN != '' && secrets.NETLIFY_SITE_ID != '' }} steps: - name: Get information about workflow origin - uses: potiuk/get-workflow-origin@v1_5 + uses: actions/github-script@v6 id: source-run-info with: - token: ${{ secrets.GITHUB_TOKEN }} - sourceRunId: ${{ github.event.workflow_run.id }} + script: | + const runId = context.payload.workflow_run.id; + const { data: run } = await github.rest.actions.getWorkflowRun({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: runId + }); + const event = run.event; + const branchName = run.head_branch; + + core.setOutput('sourceEvent', event); + core.setOutput('branchName', branchName); if: env.CAN_DEPLOY == 'true' - name: Download live doc @@ -46,8 +56,8 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ github.repository }} run-id: ${{ github.event.workflow_run.id }} - # if the doc was built for tag push (targetBranch contains the tag) - if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.targetBranch != 'develop' + # if the doc was built for tag push (branchName contains the tag) + if: steps.source-run-info.outputs.sourceEvent == 'push' && steps.source-run-info.outputs.branchName != 'develop' - name: Extract live doc run: unzip livedoc.zip -d livedoc From cc1b7a1c6e4f9a173c82e54f7b27759063d551df Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 24 Aug 2025 12:51:59 +0900 Subject: [PATCH 07/17] Remove remnant targeBranch --- .github/workflows/doc-publish-pdf.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc-publish-pdf.yml b/.github/workflows/doc-publish-pdf.yml index b68e358fd44..fece01d1d24 100644 --- a/.github/workflows/doc-publish-pdf.yml +++ b/.github/workflows/doc-publish-pdf.yml @@ -81,8 +81,8 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.targetBranch }} - NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.targetBranch }} + NETLIFY_MESSAGE: doc-${{ steps.source-run-info.outputs.branchName }} + NETLIFY_ALIAS: doc-${{ steps.source-run-info.outputs.branchName }} if: steps.download-doc.outcome == 'success' - name: Deploy to netlify with doc-release alias From 045eca186191dad69146931948f754f1844a59f5 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 24 Aug 2025 14:38:51 +0900 Subject: [PATCH 08/17] Revert setuptools update --- build/pkgs/setuptools/checksums.ini | 4 ++-- build/pkgs/setuptools/package-version.txt | 2 +- build/pkgs/setuptools_scm/checksums.ini | 4 ++-- build/pkgs/setuptools_scm/package-version.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/pkgs/setuptools/checksums.ini b/build/pkgs/setuptools/checksums.ini index cc48bd426de..13bcfce0429 100644 --- a/build/pkgs/setuptools/checksums.ini +++ b/build/pkgs/setuptools/checksums.ini @@ -1,4 +1,4 @@ tarball=setuptools-VERSION-py3-none-any.whl -sha1=f82aabaab9ae429e91d2b0d748ecd2c0b07c5de8 -sha256=062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 +sha1=3756539d45341ca5cec9e2dfe11539faa066f5cd +sha256=b208925fcb9f7af924ed2dc04708ea89791e24bde0d3020b27df0e116088b34e upstream_url=https://files.pythonhosted.org/packages/py3/s/setuptools/setuptools-VERSION-py3-none-any.whl diff --git a/build/pkgs/setuptools/package-version.txt b/build/pkgs/setuptools/package-version.txt index 6585caca14a..153e4cd6210 100644 --- a/build/pkgs/setuptools/package-version.txt +++ b/build/pkgs/setuptools/package-version.txt @@ -1 +1 @@ -80.9.0 +73.0.1 diff --git a/build/pkgs/setuptools_scm/checksums.ini b/build/pkgs/setuptools_scm/checksums.ini index f31b59216ec..553d3df6614 100644 --- a/build/pkgs/setuptools_scm/checksums.ini +++ b/build/pkgs/setuptools_scm/checksums.ini @@ -1,4 +1,4 @@ tarball=setuptools_scm-VERSION-py3-none-any.whl -sha1=29b1eb2fa08075564f062c354eab106380ad16e6 -sha256=332ca0d43791b818b841213e76b1971b7711a960761c5bea5fc5cdb5196fbce3 +sha1=be606b6acb67714b96e9e1e9a9944feaca504e44 +sha256=897a3226a6fd4a6eb2f068745e49733261a21f70b1bb28fce0339feb978d9af3 upstream_url=https://files.pythonhosted.org/packages/py3/s/setuptools_scm/setuptools_scm-VERSION-py3-none-any.whl diff --git a/build/pkgs/setuptools_scm/package-version.txt b/build/pkgs/setuptools_scm/package-version.txt index 56b6be4ebb2..8104cabd36f 100644 --- a/build/pkgs/setuptools_scm/package-version.txt +++ b/build/pkgs/setuptools_scm/package-version.txt @@ -1 +1 @@ -8.3.1 +8.1.0 From 6473d2937ae23db3b330ec98946bed9a8f41390c Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Sun, 24 Aug 2025 20:01:44 +0900 Subject: [PATCH 09/17] Cleanup publishing events --- .github/workflows/doc-build-pdf.yml | 6 +++--- .github/workflows/doc-build.yml | 10 +--------- .github/workflows/doc-publish-pdf.yml | 2 +- .github/workflows/doc-publish.yml | 2 +- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index dc7e5dbe67a..577c8269e24 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -154,7 +154,7 @@ jobs: # - name: Build live doc - if: github.event_name != 'pull_request' + if: github.event_name == 'push' && github.ref_type == 'tag' run: | # Avoid running out of disk space rm -rf upstream @@ -165,7 +165,7 @@ jobs: shell: sh .github/workflows/docker-exec-script.sh BUILD /sage {0} - name: Copy live doc - if: github.event_name != 'pull_request' + if: github.event_name == 'push' && github.ref_type == 'tag' run: | # Reuse doc created previously, which contains pdfs mv doc livedoc @@ -175,7 +175,7 @@ jobs: zip -r livedoc.zip livedoc - name: Upload live doc - if: github.event_name != 'pull_request' + if: github.event_name == 'push' && github.ref_type == 'tag' uses: actions/upload-artifact@v4 with: name: livedoc diff --git a/.github/workflows/doc-build.yml b/.github/workflows/doc-build.yml index 07ef0fc450f..d1c479e19d3 100644 --- a/.github/workflows/doc-build.yml +++ b/.github/workflows/doc-build.yml @@ -4,14 +4,6 @@ on: pull_request: merge_group: push: - tags: - # Match all release tags including beta, rc - - '[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.beta[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+.beta[0-9]+' - - '[0-9]+.[0-9]+.rc[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+' branches: - develop workflow_dispatch: @@ -194,7 +186,7 @@ jobs: path: doc.zip # - # On release events + # On push events # - name: Upload doc-develop diff --git a/.github/workflows/doc-publish-pdf.yml b/.github/workflows/doc-publish-pdf.yml index fece01d1d24..2860875552e 100644 --- a/.github/workflows/doc-publish-pdf.yml +++ b/.github/workflows/doc-publish-pdf.yml @@ -1,4 +1,4 @@ -name: Publish documentation +name: Publish release documentation on: workflow_run: diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 42eb340fd41..5fbbf37fd32 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -1,4 +1,4 @@ -name: Publish documentation +name: Publish develop documentation on: workflow_run: From 9a829a2868b90b69fc8bcb321666ec558d03e490 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Tue, 26 Aug 2025 14:18:28 +0900 Subject: [PATCH 10/17] Revert "Revert setuptools update" This reverts commit 045eca186191dad69146931948f754f1844a59f5. --- build/pkgs/setuptools/checksums.ini | 4 ++-- build/pkgs/setuptools/package-version.txt | 2 +- build/pkgs/setuptools_scm/checksums.ini | 4 ++-- build/pkgs/setuptools_scm/package-version.txt | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/build/pkgs/setuptools/checksums.ini b/build/pkgs/setuptools/checksums.ini index 13bcfce0429..cc48bd426de 100644 --- a/build/pkgs/setuptools/checksums.ini +++ b/build/pkgs/setuptools/checksums.ini @@ -1,4 +1,4 @@ tarball=setuptools-VERSION-py3-none-any.whl -sha1=3756539d45341ca5cec9e2dfe11539faa066f5cd -sha256=b208925fcb9f7af924ed2dc04708ea89791e24bde0d3020b27df0e116088b34e +sha1=f82aabaab9ae429e91d2b0d748ecd2c0b07c5de8 +sha256=062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922 upstream_url=https://files.pythonhosted.org/packages/py3/s/setuptools/setuptools-VERSION-py3-none-any.whl diff --git a/build/pkgs/setuptools/package-version.txt b/build/pkgs/setuptools/package-version.txt index 153e4cd6210..6585caca14a 100644 --- a/build/pkgs/setuptools/package-version.txt +++ b/build/pkgs/setuptools/package-version.txt @@ -1 +1 @@ -73.0.1 +80.9.0 diff --git a/build/pkgs/setuptools_scm/checksums.ini b/build/pkgs/setuptools_scm/checksums.ini index 553d3df6614..f31b59216ec 100644 --- a/build/pkgs/setuptools_scm/checksums.ini +++ b/build/pkgs/setuptools_scm/checksums.ini @@ -1,4 +1,4 @@ tarball=setuptools_scm-VERSION-py3-none-any.whl -sha1=be606b6acb67714b96e9e1e9a9944feaca504e44 -sha256=897a3226a6fd4a6eb2f068745e49733261a21f70b1bb28fce0339feb978d9af3 +sha1=29b1eb2fa08075564f062c354eab106380ad16e6 +sha256=332ca0d43791b818b841213e76b1971b7711a960761c5bea5fc5cdb5196fbce3 upstream_url=https://files.pythonhosted.org/packages/py3/s/setuptools_scm/setuptools_scm-VERSION-py3-none-any.whl diff --git a/build/pkgs/setuptools_scm/package-version.txt b/build/pkgs/setuptools_scm/package-version.txt index 8104cabd36f..56b6be4ebb2 100644 --- a/build/pkgs/setuptools_scm/package-version.txt +++ b/build/pkgs/setuptools_scm/package-version.txt @@ -1 +1 @@ -8.1.0 +8.3.1 From 93b6418f4e39bca4eb626a1678d3a61f3d8c98ec Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 28 Aug 2025 09:38:02 +0900 Subject: [PATCH 11/17] Transit livedoc build from make to meson --- .github/workflows/doc-build-pdf.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index 06d63859f3f..0192cbd5e19 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -44,7 +44,7 @@ jobs: path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ hashFiles('environment-${{ env.PYTHON_VERSION }}-linux.yml') }} - + - name: Compiler cache uses: hendrikmuhs/ccache-action@v1.2 with: @@ -62,7 +62,7 @@ jobs: channel-priority: true activate-environment: sage-dev environment-file: environment-${{ env.PYTHON_VERSION }}-linux.yml - + - name: Build Sage shell: bash -l {0} run: | @@ -101,13 +101,11 @@ jobs: - name: Build live doc if: github.event_name == 'push' && github.ref_type == 'tag' run: | - # Avoid running out of disk space - rm -rf upstream - export SAGE_USE_CDNS=yes - export SAGE_LIVE_DOC=yes - export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev - make doc-clean doc-uninstall; make sagemath_doc_html-no-deps - shell: sh .github/workflows/docker-exec-script.sh BUILD /sage {0} + meson compile -C builddir doc-html + env: + SAGE_USE_CDNS: yes + SAGE_LIVE_DOC: yes + SAGE_JUPYTER_SERVER: "binder:sagemath/sage-binder-env/dev" - name: Copy live doc if: github.event_name == 'push' && github.ref_type == 'tag' @@ -115,8 +113,7 @@ jobs: # Reuse doc created previously, which contains pdfs mv doc livedoc # We copy everything to a local folder - docker cp --follow-link BUILD:/sage/local/share/doc/sage/html livedoc - docker cp BUILD:/sage/local/share/doc/sage/index.html livedoc + cp -rL builddir/src/doc/* livedoc/ zip -r livedoc.zip livedoc - name: Upload live doc From 2c752e3d3def9118d9cdacd441f0b403db992554 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 28 Aug 2025 11:50:41 +0900 Subject: [PATCH 12/17] Separate out livedoc (release) workflow --- .github/workflows/doc-build-livedoc.yml | 82 +++++++++++++++++++ .github/workflows/doc-build-pdf.yml | 37 --------- ...ublish-pdf.yml => doc-publish-livedoc.yml} | 17 ++-- .github/workflows/doc-publish.yml | 1 - 4 files changed, 91 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/doc-build-livedoc.yml rename .github/workflows/{doc-publish-pdf.yml => doc-publish-livedoc.yml} (83%) diff --git a/.github/workflows/doc-build-livedoc.yml b/.github/workflows/doc-build-livedoc.yml new file mode 100644 index 00000000000..557fa4a36fe --- /dev/null +++ b/.github/workflows/doc-build-livedoc.yml @@ -0,0 +1,82 @@ +name: Build live documentation + +on: + push: + tags: + # Match all release tags including beta, rc + - '[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+' + - '[0-9]+.[0-9]+.beta[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+.beta[0-9]+' + - '[0-9]+.[0-9]+.rc[0-9]+' + - '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+' + workflow_dispatch: + +env: + PYTHON_VERSION: 3.11 + +jobs: + doc-pdf: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Cache conda packages + uses: actions/cache@v4 + with: + path: ~/conda_pkgs_dir + key: + ${{ runner.os }}-conda-${{ hashFiles('environment-${{ env.PYTHON_VERSION }}-linux.yml') }} + + - name: Compiler cache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ runner.os }}-meson-${{ env.PYTHON_VERSION }} + + - name: Setup Conda environment + uses: conda-incubator/setup-miniconda@v3 + with: + python-version: ${{ env.PYTHON_VERSION }} + # Disabled for now due to + # https://github.com/conda-incubator/setup-miniconda/issues/379 + # miniforge-version: latest + use-mamba: true + channels: conda-forge + channel-priority: true + activate-environment: sage-dev + environment-file: environment-${{ env.PYTHON_VERSION }}-linux.yml + + - name: Build Sage + shell: bash -l {0} + run: | + export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" + export CC="ccache $CC" + export CXX="ccache $CXX" + pip install --no-build-isolation --config-settings=builddir=builddir . -v + + - name: Build live documentation + shell: bash -l {0} + run: | + sudo DEBIAN_FRONTEND=noninteractive sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian texlive texlive_luatex free_fonts xindy) + meson compile -C builddir doc-pdf + meson compile -C builddir doc-html + env: + SAGE_USE_CDNS: yes + SAGE_LIVE_DOC: yes + SAGE_JUPYTER_SERVER: "binder:sagemath/sage-binder-env/dev" + + - name: Copy doc + id: copy + run: | + mkdir -p ./doc + # Zip everything for increased performance + cp -rL builddir/src/doc/* doc/ + zip -r livedoc.zip doc + + - name: Upload livedoc + uses: actions/upload-artifact@v4 + with: + name: livedoc + path: livedoc.zip diff --git a/.github/workflows/doc-build-pdf.yml b/.github/workflows/doc-build-pdf.yml index 0192cbd5e19..536fcabc67f 100644 --- a/.github/workflows/doc-build-pdf.yml +++ b/.github/workflows/doc-build-pdf.yml @@ -4,14 +4,6 @@ on: pull_request: merge_group: push: - tags: - # Match all release tags including beta, rc - - '[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+' - - '[0-9]+.[0-9]+.beta[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+.beta[0-9]+' - - '[0-9]+.[0-9]+.rc[0-9]+' - - '[0-9]+.[0-9]+.[0-9]+.rc[0-9]+' branches: - develop workflow_dispatch: @@ -93,32 +85,3 @@ jobs: with: name: doc-pdf path: doc-pdf.zip - - # - # On release events - # - - - name: Build live doc - if: github.event_name == 'push' && github.ref_type == 'tag' - run: | - meson compile -C builddir doc-html - env: - SAGE_USE_CDNS: yes - SAGE_LIVE_DOC: yes - SAGE_JUPYTER_SERVER: "binder:sagemath/sage-binder-env/dev" - - - name: Copy live doc - if: github.event_name == 'push' && github.ref_type == 'tag' - run: | - # Reuse doc created previously, which contains pdfs - mv doc livedoc - # We copy everything to a local folder - cp -rL builddir/src/doc/* livedoc/ - zip -r livedoc.zip livedoc - - - name: Upload live doc - if: github.event_name == 'push' && github.ref_type == 'tag' - uses: actions/upload-artifact@v4 - with: - name: livedoc - path: livedoc.zip diff --git a/.github/workflows/doc-publish-pdf.yml b/.github/workflows/doc-publish-livedoc.yml similarity index 83% rename from .github/workflows/doc-publish-pdf.yml rename to .github/workflows/doc-publish-livedoc.yml index 2860875552e..462e392a25f 100644 --- a/.github/workflows/doc-publish-pdf.yml +++ b/.github/workflows/doc-publish-livedoc.yml @@ -2,7 +2,7 @@ name: Publish release documentation on: workflow_run: - workflows: "Build documentation (PDF)" + workflows: "Build live documentation" types: - completed @@ -12,12 +12,13 @@ permissions: pull-requests: write -# This workflow runs after doc-build-pdf workflow, taking the +# This workflow runs after doc-build-livedoc workflow, taking the # artifact livedoc and deploying it to a netlify site. # -# event (triggered doc-build) URL (of the doc deployed to NETLIFY_SITE) -# --------------------------- --------------------------------- -# on push tag https://doc-release--NETLIFY_SITE +# event (triggered doc-build-livedoc) URL (of the doc deployed to NETLIFY_SITE) +# ----------------------------------- --------------------------------- +# on push tag https://doc-10-4-beta2--NETLIFY_SITE +# on push tag https://doc-release--NETLIFY_SITE # # where NETLIFY_SITE is presently sagemath.netlify.app for repo sagemath/sage. # @@ -65,7 +66,7 @@ jobs: - name: Create _headers file for permissive CORS run: | - cat < livedoc/livedoc/_headers + cat < livedoc/doc/_headers /* Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET @@ -77,7 +78,7 @@ jobs: id: deploy-netlify uses: netlify/actions/cli@master with: - args: deploy --dir=livedoc/livedoc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} + args: deploy --dir=livedoc/doc --message ${NETLIFY_MESSAGE} --alias ${NETLIFY_ALIAS} env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} @@ -88,7 +89,7 @@ jobs: - name: Deploy to netlify with doc-release alias uses: netlify/actions/cli@master with: - args: deploy --dir=livedoc/livedoc --message doc-release --alias doc-release + args: deploy --dir=livedoc/doc --message doc-release --alias doc-release env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 5fbbf37fd32..4b3134413c5 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -19,7 +19,6 @@ permissions: # --------------------------- --------------------------------- # on pull request https://doc-pr-12345--NETLIFY_SITE # on push branch develop https://doc-develop--NETLIFY_SITE -# on push tag https://doc-10-4-beta2--NETLIFY_SITE # # where NETLIFY_SITE is presently sagemath.netlify.app for repo sagemath/sage. # From 6579c459aee56f7d58a392bbd05d90618bcae7e0 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 28 Aug 2025 13:44:25 +0900 Subject: [PATCH 13/17] Some cleanups --- .github/workflows/doc-build-livedoc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/doc-build-livedoc.yml b/.github/workflows/doc-build-livedoc.yml index 557fa4a36fe..5b5e4f46abe 100644 --- a/.github/workflows/doc-build-livedoc.yml +++ b/.github/workflows/doc-build-livedoc.yml @@ -16,7 +16,7 @@ env: PYTHON_VERSION: 3.11 jobs: - doc-pdf: + livedoc: runs-on: ubuntu-latest steps: - name: Checkout From e2001f4f822e1f41c02cc78f0b7c1310d3683d42 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 28 Aug 2025 17:17:40 +0900 Subject: [PATCH 14/17] build in one thread --- .github/workflows/doc-build-livedoc.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc-build-livedoc.yml b/.github/workflows/doc-build-livedoc.yml index 5b5e4f46abe..62b8a0087ae 100644 --- a/.github/workflows/doc-build-livedoc.yml +++ b/.github/workflows/doc-build-livedoc.yml @@ -60,8 +60,8 @@ jobs: run: | sudo DEBIAN_FRONTEND=noninteractive sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian texlive texlive_luatex free_fonts xindy) - meson compile -C builddir doc-pdf - meson compile -C builddir doc-html + meson compile -C builddir doc-pdf -j1 + meson compile -C builddir doc-html -j1 env: SAGE_USE_CDNS: yes SAGE_LIVE_DOC: yes From 33c5e7552da3e44e7a0db34c46197acc7ce14aa7 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 28 Aug 2025 19:07:51 +0900 Subject: [PATCH 15/17] Build pdf docs in parallel --- .github/workflows/doc-build-livedoc.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc-build-livedoc.yml b/.github/workflows/doc-build-livedoc.yml index 62b8a0087ae..ee7160e12eb 100644 --- a/.github/workflows/doc-build-livedoc.yml +++ b/.github/workflows/doc-build-livedoc.yml @@ -55,12 +55,16 @@ jobs: export CXX="ccache $CXX" pip install --no-build-isolation --config-settings=builddir=builddir . -v - - name: Build live documentation + - name: Build pdf documentation shell: bash -l {0} run: | sudo DEBIAN_FRONTEND=noninteractive sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian texlive texlive_luatex free_fonts xindy) - meson compile -C builddir doc-pdf -j1 + meson compile -C builddir doc-pdf + + - name: Build live documentation + shell: bash -l {0} + run: | meson compile -C builddir doc-html -j1 env: SAGE_USE_CDNS: yes From df90e58c8cd16f7b2730f0d6347bbd4684b52b1e Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 28 Aug 2025 21:21:57 +0900 Subject: [PATCH 16/17] Copy only pdf html and index.html --- .github/workflows/doc-build-livedoc.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/doc-build-livedoc.yml b/.github/workflows/doc-build-livedoc.yml index ee7160e12eb..72f9ff1b59a 100644 --- a/.github/workflows/doc-build-livedoc.yml +++ b/.github/workflows/doc-build-livedoc.yml @@ -55,14 +55,14 @@ jobs: export CXX="ccache $CXX" pip install --no-build-isolation --config-settings=builddir=builddir . -v - - name: Build pdf documentation + - name: Build pdf doc shell: bash -l {0} run: | sudo DEBIAN_FRONTEND=noninteractive sudo apt-get update sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian texlive texlive_luatex free_fonts xindy) meson compile -C builddir doc-pdf - - name: Build live documentation + - name: Build live doc shell: bash -l {0} run: | meson compile -C builddir doc-html -j1 @@ -75,8 +75,9 @@ jobs: id: copy run: | mkdir -p ./doc - # Zip everything for increased performance - cp -rL builddir/src/doc/* doc/ + cp -r builddir/src/doc/pdf doc/ + cp -rL builddir/src/doc/html doc/ + cp builddir/src/doc/index.html doc/ zip -r livedoc.zip doc - name: Upload livedoc From 9c023fbf9d5ba0b9675b709ef97dec88f0bedb9d Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Thu, 28 Aug 2025 21:34:20 +0900 Subject: [PATCH 17/17] Rename workflows --- .github/workflows/doc-publish-livedoc.yml | 2 +- .github/workflows/doc-publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/doc-publish-livedoc.yml b/.github/workflows/doc-publish-livedoc.yml index 462e392a25f..e8d1f414cae 100644 --- a/.github/workflows/doc-publish-livedoc.yml +++ b/.github/workflows/doc-publish-livedoc.yml @@ -1,4 +1,4 @@ -name: Publish release documentation +name: Publish live documentation on: workflow_run: diff --git a/.github/workflows/doc-publish.yml b/.github/workflows/doc-publish.yml index 4b3134413c5..8372841fbd6 100644 --- a/.github/workflows/doc-publish.yml +++ b/.github/workflows/doc-publish.yml @@ -1,4 +1,4 @@ -name: Publish develop documentation +name: Publish documentation on: workflow_run: