From bbc67cd1134341871cdd13572cea1423ce1ac9a6 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Thu, 9 Nov 2023 12:05:11 +0100 Subject: [PATCH] Update CI and check for modification of lni.cls (#124) --- .github/workflows/basic-check.yml | 48 ---------------------------- .github/workflows/check.yml | 52 ++++++++++++++++++++----------- .gitignore | 7 +++++ Texlivefile | 27 ++++++++++++++++ build.sh | 34 -------------------- lni.cls | 10 +++--- 6 files changed, 72 insertions(+), 106 deletions(-) delete mode 100644 .github/workflows/basic-check.yml delete mode 100755 build.sh diff --git a/.github/workflows/basic-check.yml b/.github/workflows/basic-check.yml deleted file mode 100644 index 834132d..0000000 --- a/.github/workflows/basic-check.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: check lni-paper-example-de - -on: - push: - branches: - - main - pull_request: - schedule: - - cron: '1 2 5 * *' - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-latest - container: - image: reitzig/texlive-base:2023.1 - options: --user root - env: - SRC_DIR: /__w/LNI/LNI - - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Add x86_64-linuxmusl to PATH - run: echo "/usr/local/texlive/2023/bin/x86_64-linuxmusl" >> $GITHUB_PATH - - - name: pdflatex lni-paper-example-de - run: /bin/entrypoint work pdflatex lni-paper-example-de - - - name: biber lni-paper-example-de - run: /bin/entrypoint work biber lni-paper-example-de - - - name: pdflatex lni-paper-example-de - run: /bin/entrypoint work pdflatex lni-paper-example-de - - - name: pdflatex lni-paper-example-de - run: /bin/entrypoint work pdflatex lni-paper-example-de - - - name: Upload build result - uses: actions/upload-artifact@v3 - with: - name: PDFs - path: '/work/out' diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4eaacc7..a8d9db6 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -16,39 +16,53 @@ concurrency: jobs: build: runs-on: ubuntu-latest - container: - image: reitzig/texlive-base:2023.1 - options: --user root - env: - SRC_DIR: /__w/LNI/LNI - steps: - name: Check out code - uses: actions/checkout@v3 - - - name: Add x86_64-linuxmusl to PATH - run: echo "/usr/local/texlive/2023/bin/x86_64-linuxmusl" >> $GITHUB_PATH + uses: actions/checkout@v4 + with: + show-progess: '' + - name: Install TeX Live + uses: zauguin/install-texlive@v3 + with: + package_file: Texlivefile + - name: Generate lni.cls, *.tex, ... + run: | + pdflatex lni.dtx + pdflatex lni.dtx + pdflatex lni.dtx + - name: Check for modifications + run: | + git update-index --refresh + if ! git diff-index --quiet HEAD --; then + echo "Worktree is not clean." + git diff-index --name-status HEAD + exit 1 + fi + - name: Generate mybibfile.bib + run: touch mybibfile.bib - - name: Install git - run: apk add git + - run: pdflatex lni-author-template - - name: Build examples (using build.sh) - run: /bin/entrypoint work + - run: pdflatex lni-paper-example-de + - run: biber lni-paper-example-de + - run: pdflatex lni-paper-example-de + - run: pdflatex lni-paper-example-de - name: Upload build result uses: actions/upload-artifact@v3 with: name: PDFs - path: '/work/out' + path: | + 'lni-author-template.pdf' + 'lni-paper-example*.pdf' - name: Prepare GH pages content if: github.ref == 'refs/heads/main' run: | set -e mkdir /tmp/gh-pages - cd /tmp/gh-pages - cp /__w/LNI/LNI/README.md index.md - cp /work/out/*.pdf . + cp README.md /tmp/gh-pages/index.md + cp *.pdf /tmp/gh-pages - name: Deploy to GH pages uses: peaceiris/actions-gh-pages@v3 @@ -58,7 +72,7 @@ jobs: publish_dir: /tmp/gh-pages - name: Install dependencies for ctanify - run: apk add perl-file-copy-recursive zip + run: sudo apt-get install -y libfile-copy-recursive-perl zip - name: Prepare for CTAN run: ./prepare_for_CTAN diff --git a/.gitignore b/.gitignore index 91a0399..e365d6b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,13 @@ mybibfile.bib *.hd +texlogsieve + +LNI-english.lbx +LNI-ngerman.lbx +LNI.bbx +LNI.cbx + ## Core latex/pdflatex auxiliary files: *.aux *.lof diff --git a/Texlivefile b/Texlivefile index e7525fe..406d492 100644 --- a/Texlivefile +++ b/Texlivefile @@ -1,19 +1,46 @@ +latex-bin +amsmath +babel-english babel-german bera blindtext biber biblatex biblatex-lni +booktabs +caption ccicons cleveref +cm-super +cmap +collection-fontsrecommended csquotes ctanify dehyph-exptl enumitem +epstopdf-pkg +eso-pic +etoolbox +fancyhdr +geometry +graphics +grffile +hologo +hyperref hyphen-german hypdoc +infwarerr +kvsetkeys +kvdefinekeys libertine +listings +ltxcmds +microtype mnsymbol mwe nag +oberdiek +siunitx +tools upquote +xcolor diff --git a/build.sh b/build.sh deleted file mode 100755 index d124084..0000000 --- a/build.sh +++ /dev/null @@ -1,34 +0,0 @@ -set -e - -cp lni.cls lni.old -cp lni-paper-example-de.tex lni-paper-example-de.old - -printf "\nGenerating lni.cls, *.tex...\n\n" -pdflatex lni.dtx -pdflatex lni.dtx -pdflatex lni.dtx - -FILES=("lni.cls" "lni.old" "lni-paper-example-de.tex" "lni-paper-example-de.old") -for (( i=0; i<${#FILES[@]}; i+=2 )); do - DIFF=$(diff -w "${FILES[i]}" "${FILES[i+1]}") - if [ "$DIFF" != "" ]; then - printf "\033[31mFiles ${FILES[i]} and ${FILES[i+1]} differ:\033[37m\n" - echo "$DIFF" - printf "\033[31mPlease adapt lni.dtx to include these changes\033[37m\n" - printf "\nSee https://github.com/gi-ev/LNI/issues/108 for more background information\n" - exit 99 - fi -done - -printf "\n\033[32mCompiling lni-author-template...\n\n\033[37m" -touch mybibfile.bib -pdflatex lni-author-template - -printf "\n\033[32mCompiling lni-paper-example-de...\n\n\033[37m" -pdflatex lni-paper-example-de -printf "\n\033[32mBiber lni-paper-example-de...\n\n\033[37m" -biber lni-paper-example-de -printf "\n\033[32mCompiling lni-paper-example-de...\n\n\033[37m" -pdflatex lni-paper-example-de -printf "\n\033[32mCompiling lni-paper-example-de...\n\n\033[37m" -pdflatex lni-paper-example-de diff --git a/lni.cls b/lni.cls index f3331a1..f07b44a 100644 --- a/lni.cls +++ b/lni.cls @@ -657,19 +657,19 @@ \brokenpenalty=2000 \vfuzz \hfuzz \raggedbottom -%% +%% %% Copyright (C) 2016-2023 by Gesellschaft für Informatik e.V. (GI) -%% +%% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License (LPPL), either %% version 1.3c of this license or (at your option) any later %% version. The latest version of this license is in the file: -%% +%% %% http://www.latex-project.org/lppl.txt -%% +%% %% This work is "maintained" (as per LPPL maintenance status) by %% Martin Sievers. -%% +%% %% This work consists of the file lni.dtx %% lni.ins %% README.md