-
-
Notifications
You must be signed in to change notification settings - Fork 188
37 lines (36 loc) · 1.13 KB
/
verify_examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Verify examples
on: [push, pull_request]
jobs:
find_examples:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.find-dirs.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- name: Gather directories inside examples
id: find-dirs
run: |
cd examples
echo "::set-output name=matrix::{\"dir\":[$(for dir in $(echo */); do echo -n \"${dir%?}\",; done)]}"
build_latex:
needs: find_examples
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.find_examples.outputs.matrix)}}
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Check that LaTeX example compiles
uses: xu-cheng/latex-action@v2
with:
working_directory: examples/${{ matrix.dir }}
pre_compile: |
cp -r ../../* . || true
mkdir styles && cp -r ../../* ./styles/ || true
root_file: main.tex
latexmk_shell_escape: true
- uses: actions/upload-artifact@v2
if: ${{ always() }}
with:
name: Log - ${{ matrix.dir }}
path: examples/${{ matrix.dir }}/main.log