Skip to content

test no-split case (ie, one job for html) #84

test no-split case (ie, one job for html)

test no-split case (ie, one job for html) #84

Workflow file for this run

name: Ximera Workflow
on:
push:
# branches:
# - 'nowhere-for-now'
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"
jobs:
build-ximera-htmlexport:
name: Run pdfexport andhtmlexport
runs-on: ubuntu-latest
continue-on-error: true
container: &x-container
image: ghcr.io/ximeraproject/ximeralatex:v2.7.5fix2-full
options: >-
--workdir /code
permissions:
actions: read
contents: read
packages: write
steps:
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0
# Restore cache for cross-run speedup
- name: "Prepare: Restore cache"
uses: actions/cache/restore@v4
with:
path: |
**/*.pdf
**/*.html
**/*.aux
**/*.log
**/*.toc
**/*.xref
**/*.svg
**/*.png
!.git/**
!.github/**
key: ximeraPDFexport-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
ximeraHTMLexport-${{ github.ref_name }}-
ximeraPDFexport-${{ github.ref_name }}-
ximeraPDFexport-
ximeraHTMLexport-
- name: "XIMERA: pdf and html (tikzexternalize/html)"
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
xmlatex bake --compile pdfexport -j 5 $XM_TO_PROCESS
xmlatex bake --compile htmlexport -j 5 $XM_TO_PROCESS
# Upload artifact for next job
- name: "Postprocess: Save artifacts"
uses: actions/upload-artifact@v4
with:
name: htmlexport
path: .
# Save cache
- name: "Postprocess: Save cache"
uses: actions/cache/save@v4
with:
path: |
**/*.pdf
**/*.html
**/*.aux
**/*.log
**/*.toc
**/*.xref
**/*.svg
**/*.png
!.git/**
!.github/**
key: ximeraHTMLexport-${{ github.ref_name }}-${{ github.run_id }}
# Upload artifact
- name: "Postprocess: Save artifacts"
uses: actions/upload-artifact@v4
with:
name: htmlexport
path: .
serve-ximera-preview:
name: "Run serve for (automatic) preview version"
needs: build-ximera-htmlexport
# continue-on-error: true
runs-on: ubuntu-latest
container: *x-container
permissions:
actions: read
contents: read
packages: write
steps:
- name: "Prepare: Checkout code"
uses: actions/checkout@v4
with:
fetch-depth: 0
# Download artifact from previous job
- name: "Prepare: Checkout artifacts (from previous step)"
uses: actions/download-artifact@v4
with:
name: htmlexport
path: .
- name: "XIMERA: Serve PREVIEW version to ximeraserver"
run: |
echo "Serving to $XIMERA_URL$XIMERA_NAME"
git config --global --add safe.directory "$GITHUB_WORKSPACE"
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"
# uses: actions/upload-artifact@v4
# with:
# name: serve
# path: .
publish-ximera:
name: Run serve for public version
needs: serve-ximera-preview
runs-on: ubuntu-latest
continue-on-error: true
container: *x-container
environment: production
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Download final artifact
- name: Restore artifacts from previous job
uses: actions/download-artifact@v4
with:
name: htmlexport
path: .
- 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 /__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 "✅ Published to $XIMERA_URL$XIMERA_NAME "
echo "✅ Published to $XIMERA_URL$XIMERA_NAME " >> $GITHUB_STEP_SUMMARY