-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (66 loc) · 2.57 KB
/
main.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# name: Code to pdf test
on: push
jobs:
build-examples:
runs-on: ubuntu-latest
# container: dante-ev/docker-texlive:latest
# container:
# image: danteev/texlive:latest
# strategy:
# matrix:
# # python-version: ["3.8", "3.11", "3.12", "3.13"]
# python-version: ["3.11"]
env:
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
MAKEFLAGS: "-j 4"
steps:
# - name: Setup Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
- uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: actions/checkout@v4
- name: Install dependencies
# # TODO: find a quicker method. Currently the download is fast but the installation is slow
# # In total, it takes 5min
# run: sudo apt install texlive-full
run: sudo apt install texlive texlive-xetex
- name: Install fonts
run: ./.github/workflows/install_nerd_fonts.sh
- name: Install package
run: pip install .
- name: Build
working-directory: ./examples
env:
REPO2TEX_FLAGS: --monofont "SauceCodePro Nerd Font Mono" --mainfont "SauceCodePro Nerd Font"
run: make clean && make all
- name: Archive PDFs
uses: actions/upload-artifact@v4
with:
name: pdf
path: examples/flask_without_docs.pdf
# path: |
# examples/*.pdf
# examples/*.tex
# examples/*.tar.gz
- name: Build with default fonts
working-directory: ./examples
run: make clean && make all
# not working
# - name: Build with pdflatex
# working-directory: ./examples
# env:
# TEX2PDF: pdflatex
# run: make clean && make all
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v5
- uses: actions/checkout@v4
- name: Pre-commit
run: |
pip install pre-commit
pre-commit install --install-hooks
pre-commit run --all-files