Skip to content

Commit

Permalink
ci: Compile all procedures in a single step (#52)
Browse files Browse the repository at this point in the history
instead of adding a CI step for every procedure
  • Loading branch information
gteufelberger authored May 22, 2024
1 parent 8dd8956 commit 0d3c945
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 42 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/compile-latex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
working_directory: src/dacs-sw/control-station-installation/
root_file: main.tex
work_in_root_file_dir: true

- name: Compile LaTeX template document
uses: xu-cheng/latex-action@v3
with:
working_directory: src/dacs-sw/template/
root_file: main.tex
work_in_root_file_dir: true
- name: Compile all LaTeX documents
run: |
projects=("control-station-installation" "template" "database-ingestion")
for project in "${projects[@]}"; do
working_directory="src/dacs-sw/$project"
root_file="main.tex"
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace/$working_directory texlive/texlive:latest latexmk -pdf -interaction=nonstopmode $root_file
done
- name: Compile LaTeX data ingestion document
uses: xu-cheng/latex-action@v3
with:
working_directory: src/dacs-sw/database-ingestion/
root_file: main.tex
work_in_root_file_dir: true

- name: Rename files and move to single release folder
run: |
mkdir --parents release
Expand Down
30 changes: 8 additions & 22 deletions .github/workflows/tagpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,15 @@ jobs:
run: |
sed -i 's/\\setboolean{isDraft}{true}/\\setboolean{isDraft}{false}/' src/dacs-sw/control-station-installation/main.tex
- name: Compile LaTeX document
- name: Compile all LaTeX documents
if: ${{ steps.tagpr.outputs.tag != '' }}
uses: xu-cheng/latex-action@v3
with:
working_directory: src/dacs-sw/control-station-installation/
root_file: main.tex
work_in_root_file_dir: true

- name: Compile LaTeX template document
if: ${{ steps.tagpr.outputs.tag != '' }}
uses: xu-cheng/latex-action@v3
with:
working_directory: src/dacs-sw/template/
root_file: main.tex
work_in_root_file_dir: true

- name: Compile LaTeX database ingestion document
if: ${{ steps.tagpr.outputs.tag != '' }}
uses: xu-cheng/latex-action@v3
with:
working_directory: src/dacs-sw/database-ingestion/
root_file: main.tex
work_in_root_file_dir: true
run: |
projects=("control-station-installation" "template" "database-ingestion")
for project in "${projects[@]}"; do
working_directory="src/dacs-sw/$project"
root_file="main.tex"
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace/$working_directory texlive/texlive:latest latexmk -pdf -interaction=nonstopmode $root_file
done
- name: Rename files and move to single release folder
if: ${{ steps.tagpr.outputs.tag != '' }}
Expand Down

0 comments on commit 0d3c945

Please sign in to comment.