diff --git a/.github/workflows/check-templates.yml b/.github/workflows/check-templates.yml new file mode 100644 index 0000000..4e2f7b2 --- /dev/null +++ b/.github/workflows/check-templates.yml @@ -0,0 +1,49 @@ +name: check-templates + +on: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: check-templates-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + TEXFORGE_VERSION: v0.10.1 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install texforge + run: | + set -euo pipefail + base="https://github.com/UniverLab/texforge/releases/download/${TEXFORGE_VERSION}" + asset="texforge-${TEXFORGE_VERSION}-x86_64-unknown-linux-musl.tar.gz" + cd "$RUNNER_TEMP" + curl -fsSLO "$base/$asset" + curl -fsSLO "$base/SHA256SUMS.txt" + grep " $asset\$" SHA256SUMS.txt | sha256sum -c - + mkdir -p texforge-bin + tar -xzf "$asset" -C texforge-bin + bin=$(find texforge-bin -type f -name texforge | head -1) + install -m 0755 "$bin" /usr/local/bin/texforge + texforge --version + + - name: Cache the TeX engine and bundle + uses: actions/cache@v4 + with: + path: | + ~/.texforge + ~/.cache/Tectonic + key: texforge-${{ env.TEXFORGE_VERSION }}-${{ runner.os }} + + - name: Check every template + run: bash ./check-templates.sh