From 431a536ea4ad8c5c7e1bef460363c68759f11c37 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 16:48:41 +0200 Subject: [PATCH 01/10] Fix action --- .github/workflows/serve-ximera-split.yml | 82 ++++++++++++++---------- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index d7059ab..7452a80 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -2,16 +2,16 @@ name: Ximera Workflow on: push: - branches: - - 'main' + # branches: + # - 'main' env: GPG_KEY: ${{ secrets.GPG_KEY }} GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} XIMERA_NAME: wimcalc20250904 - XIMERA_URL: "https://ximera.osu.edu/" - # XIMERA_URL: "https://xerxes.ximera.org/" - XM_TO_PROCESS: "testxourse.tex calculus1.tex" + # XIMERA_URL: "https://ximera.osu.edu/" + XIMERA_URL: "https://xerxes.ximera.org/" + XM_TO_PROCESS: "testxourse.tex" jobs: @@ -29,12 +29,14 @@ jobs: packages: write steps: - - uses: actions/checkout@v4 + - name: "Prepare: Checkout code" + uses: actions/checkout@v4 with: fetch-depth: 0 # Restore cache for cross-run speedup - - uses: actions/cache/restore@v4 + - name: "Prepare: Restore cache" + uses: actions/cache/restore@v4 with: path: | **/*.pdf @@ -54,11 +56,10 @@ jobs: ximeraPDFexport- ximeraHTMLexport- - - run: | - # git config --global --add safe.directory /code + - name: "XIMERA: pdfexport (prepare for tikzpictures)" + run: | git config --global --add safe.directory /__w/calculus/calculus export TEXMFHOME=/root/texmf - export LUA_PATH="/root/texmf/tex/latex/ximeraLatex/luaxake/?.lua;;" xmlatex bake --compile pdfexport -j 5 $XM_TO_PROCESS # # Save cache for future runs @@ -78,7 +79,8 @@ jobs: # key: ximeraPDFexport-${{ github.ref_name }}-latest # Upload artifact for next job - - uses: actions/upload-artifact@v4 + - name: "Postprocess: Save artifacts" + uses: actions/upload-artifact@v4 with: name: pdfexport path: . @@ -95,24 +97,27 @@ jobs: packages: write steps: - - uses: actions/checkout@v4 + - name: "Prepare: Checkout code" + uses: actions/checkout@v4 with: fetch-depth: 0 # Download artifact from previous job - - uses: actions/download-artifact@v4 + - name: "Prepare: Checkout artifacts from previous step" + uses: actions/download-artifact@v4 with: name: pdfexport path: . - - run: | - git config --global --add safe.directory /code + - name: "XIMERA: htmlexport (generate html)" + run: | git config --global --add safe.directory /__w/calculus/calculus export TEXMFHOME=/root/texmf xmlatex bake --compile htmlexport -j 5 $XM_TO_PROCESS # Save cache - - uses: actions/cache/save@v4 + - name: "Postprocess: Save cache" + uses: actions/cache/save@v4 with: path: | **/*.pdf @@ -128,13 +133,14 @@ jobs: key: ximeraHTMLexport-${{ github.ref_name }}-${{ github.run_id }} # Upload artifact - - uses: actions/upload-artifact@v4 + - name: "Postprocess: Save artifacts" + uses: actions/upload-artifact@v4 with: name: htmlexport path: . - build-ximera-serve: - name: Run frost/serve preview + serve-ximera-preview: + name: "Run serve for (automatic) preview version" needs: build-ximera-htmlexport # continue-on-error: true runs-on: ubuntu-latest @@ -145,26 +151,27 @@ jobs: packages: write steps: - - name: Checkout code + - name: "Prepare: Checkout code" uses: actions/checkout@v4 with: fetch-depth: 0 # Download artifact from previous job - - name: Restore artifacts from previous job + - name: "Prepare: Checkout artifacts (from previous step)" uses: actions/download-artifact@v4 with: name: htmlexport path: . - - name: "Serve to ${{env.XIMERA_NAME}} on ${{env.XIMERA_URL}}" + - name: "XIMERA: Serve PREVIEW version to ximeraserver" run: | - git config --global --add safe.directory /code + echo "Serving to $XIMERA_URL$XIMERA_NAME" git config --global --add safe.directory /__w/calculus/calculus export TEXMFHOME=/root/texmf xmlatex name xmlatex frost $XM_TO_PROCESS xmlatex serve $XM_TO_PROCESS + echo "✅ Published to $XIMERA_URL$XIMERA_NAME " echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY # - name: "Store artifacts" @@ -174,7 +181,7 @@ jobs: # path: . publish-ximera: - name: Run serve to mooculus + name: Run serve for public version needs: build-ximera-serve runs-on: ubuntu-latest continue-on-error: true @@ -182,23 +189,32 @@ jobs: environment: production steps: + + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Download final artifact - - uses: actions/download-artifact@v4 + - name: Restore artifacts from previous job + uses: actions/download-artifact@v4 with: name: htmlexport path: . - - run: | + - name: "XIMERA BUILD: Serve to ximeraserver (to public URL)" + env: + XIMERA_URL: "https://xerxes.ximera.org/" + # XIMERA_URL: "https://ximera.osu.edu/" + XIMERA_NAME: "mooculus" + run: | echo "Serving to $XIMERA_URL$XIMERA_NAME" - git config --global --add safe.directory /code git config --global --add safe.directory /__w/calculus/calculus export TEXMFHOME=/root/texmf xmlatex name xmlatex serve -t $XM_TO_PROCESS - echo "Recent git log:" - git log --oneline --graph --decorate --all -n 10 + # echo "Recent git log:" + # git log --oneline --graph --decorate --all -n 10 + echo "✅ Published to $XIMERA_URL$XIMERA_NAME " echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY - env: - XIMERA_URL: "https://xerxes.ximera.org/" - # XIMERA_URL: "https://ximera.osu.edu/" - XIMERA_NAME: "mooculus" + From fd33877b4c0fca4acd2cbefe5bc0bf1fb45074e9 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 16:52:25 +0200 Subject: [PATCH 02/10] fix name --- .github/workflows/serve-ximera-split.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index 7452a80..e252d11 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -1,4 +1,4 @@ -name: Ximera Workflow +name: "Ximera Workflow (split pdf/html)" on: push: @@ -182,7 +182,7 @@ jobs: publish-ximera: name: Run serve for public version - needs: build-ximera-serve + needs: serve-ximera-preview runs-on: ubuntu-latest continue-on-error: true container: *x-container From 05f6702701a9c59448872b7bbad6ecd82a1b33a6 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:10:02 +0200 Subject: [PATCH 03/10] test safe dir:TEXMFHOME --- .github/workflows/serve-ximera-split.yml | 4 ++-- testxourse.tex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index e252d11..805cd45 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -12,6 +12,7 @@ env: # XIMERA_URL: "https://ximera.osu.edu/" XIMERA_URL: "https://xerxes.ximera.org/" XM_TO_PROCESS: "testxourse.tex" + TEXMFHOME: /root/texmf # Should be set in xmlatex ! jobs: @@ -58,8 +59,7 @@ jobs: - name: "XIMERA: pdfexport (prepare for tikzpictures)" run: | - git config --global --add safe.directory /__w/calculus/calculus - export TEXMFHOME=/root/texmf + # git config --global --add safe.directory /__w/calculus/calculus xmlatex bake --compile pdfexport -j 5 $XM_TO_PROCESS # # Save cache for future runs diff --git a/testxourse.tex b/testxourse.tex index 780aa64..923e6ee 100644 --- a/testxourse.tex +++ b/testxourse.tex @@ -43,7 +43,7 @@ \part{Functions} \activity{reviewOfFamousFunctions/breakGround.tex} \activity{reviewOfFamousFunctions/digInPolynomialFunctions.tex} \activity{reviewOfFamousFunctions/digInRationalFunctions.tex} -% \activity{reviewOfFamousFunctions/digInTrigonometricFunctions.tex} +\activity{reviewOfFamousFunctions/digInTrigonometricFunctions.tex} % \activity{reviewOfFamousFunctions/digInExponentialAndLogarithmeticFunctions.tex} From 42dc30a8c53681ad9f4a3f6c79663f4bf35f085d Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:17:28 +0200 Subject: [PATCH 04/10] test userid in container --- .github/workflows/serve-ximera-split.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index 805cd45..2a5819c 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -24,6 +24,7 @@ jobs: image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2 options: >- --workdir /code + --user $(id -u):$(id -g) permissions: actions: read contents: read From 4bcda4026146b8c9b8aa790d4fe8ad6ff28e29c7 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:22:26 +0200 Subject: [PATCH 05/10] test persist-credentials --- .github/workflows/serve-ximera-split.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index 2a5819c..e36d969 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -24,7 +24,6 @@ jobs: image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2 options: >- --workdir /code - --user $(id -u):$(id -g) permissions: actions: read contents: read @@ -35,6 +34,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: true # Restore cache for cross-run speedup - name: "Prepare: Restore cache" @@ -101,6 +101,7 @@ jobs: - name: "Prepare: Checkout code" uses: actions/checkout@v4 with: + persist-credentials: true fetch-depth: 0 # Download artifact from previous job From 497c8e9df4bfb1baf6bd81278091e8a441424aa9 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:27:35 +0200 Subject: [PATCH 06/10] test userid in container --- .github/workflows/serve-ximera-split.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index e36d969..3197f2f 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -24,6 +24,7 @@ jobs: image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2 options: >- --workdir /code + --user 1000:1000 permissions: actions: read contents: read From 252451f7f2c4ea5d96c93c9900a19d0eaae2f1dd Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:33:31 +0200 Subject: [PATCH 07/10] fix ? --- .github/workflows/serve-ximera-split.yml | 27 +++--------------------- 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index 3197f2f..d1e2403 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -24,7 +24,6 @@ jobs: image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2 options: >- --workdir /code - --user 1000:1000 permissions: actions: read contents: read @@ -35,7 +34,6 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - persist-credentials: true # Restore cache for cross-run speedup - name: "Prepare: Restore cache" @@ -61,25 +59,9 @@ jobs: - name: "XIMERA: pdfexport (prepare for tikzpictures)" run: | - # git config --global --add safe.directory /__w/calculus/calculus + git config --global --add safe.directory "$GITHUB_WORKSPACE" xmlatex bake --compile pdfexport -j 5 $XM_TO_PROCESS - # # Save cache for future runs - # - uses: actions/cache/save@v4 - # with: - # path: | - # **/*.pdf - # **/*.html - # **/*.aux - # **/*.log - # **/*.toc - # **/*.xref - # **/*.svg - # **/*.png - # !.git/** - # !.github/** - # key: ximeraPDFexport-${{ github.ref_name }}-latest - # Upload artifact for next job - name: "Postprocess: Save artifacts" uses: actions/upload-artifact@v4 @@ -102,7 +84,6 @@ jobs: - name: "Prepare: Checkout code" uses: actions/checkout@v4 with: - persist-credentials: true fetch-depth: 0 # Download artifact from previous job @@ -114,8 +95,7 @@ jobs: - name: "XIMERA: htmlexport (generate html)" run: | - git config --global --add safe.directory /__w/calculus/calculus - export TEXMFHOME=/root/texmf + git config --global --add safe.directory "$GITHUB_WORKSPACE" xmlatex bake --compile htmlexport -j 5 $XM_TO_PROCESS # Save cache @@ -169,8 +149,7 @@ jobs: - name: "XIMERA: Serve PREVIEW version to ximeraserver" run: | echo "Serving to $XIMERA_URL$XIMERA_NAME" - git config --global --add safe.directory /__w/calculus/calculus - export TEXMFHOME=/root/texmf + git config --global --add safe.directory "$GITHUB_WORKSPACE" xmlatex name xmlatex frost $XM_TO_PROCESS xmlatex serve $XM_TO_PROCESS From 56e61607e33baa7f9ae0611af44c480a8876fbcd Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:39:09 +0200 Subject: [PATCH 08/10] needs -full for now --- .github/workflows/serve-ximera-split.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index d1e2403..b8d1e3c 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest continue-on-error: true container: &x-container - image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2 + image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2-full options: >- --workdir /code permissions: From 7cdb745c320e1d8ed3cb03148d93c082f36dc329 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:41:38 +0200 Subject: [PATCH 09/10] fix merge conflict? --- .github/workflows/serve-ximera-split.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index b8d1e3c..981df8f 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -9,9 +9,9 @@ env: GPG_KEY: ${{ secrets.GPG_KEY }} GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} XIMERA_NAME: wimcalc20250904 - # XIMERA_URL: "https://ximera.osu.edu/" - XIMERA_URL: "https://xerxes.ximera.org/" - XM_TO_PROCESS: "testxourse.tex" + XIMERA_URL: "https://ximera.osu.edu/" + # XIMERA_URL: "https://xerxes.ximera.org/" + XM_TO_PROCESS: "testxourse.tex calculus*.tex" TEXMFHOME: /root/texmf # Should be set in xmlatex ! jobs: From 1fc702ede9e63d1cbcc0dd2708b0da2baaee6e30 Mon Sep 17 00:00:00 2001 From: Wim Obbels Date: Thu, 4 Sep 2025 17:42:31 +0200 Subject: [PATCH 10/10] fix merge conflict?? --- .github/workflows/serve-ximera-split.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/serve-ximera-split.yml b/.github/workflows/serve-ximera-split.yml index 981df8f..05c0925 100644 --- a/.github/workflows/serve-ximera-split.yml +++ b/.github/workflows/serve-ximera-split.yml @@ -6,13 +6,13 @@ on: # - 'main' env: + TEXMFHOME: /root/texmf # Should be set in xmlatex ! GPG_KEY: ${{ secrets.GPG_KEY }} GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }} XIMERA_NAME: wimcalc20250904 XIMERA_URL: "https://ximera.osu.edu/" # XIMERA_URL: "https://xerxes.ximera.org/" XM_TO_PROCESS: "testxourse.tex calculus*.tex" - TEXMFHOME: /root/texmf # Should be set in xmlatex ! jobs: