fix path #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code to pdf test | |
on: push | |
jobs: | |
build-examples: | |
runs-on: ubuntu-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/cache@v2 | |
id: cache-id | |
with: | |
path: ${{ runner.temp }}/cache-directory-example | |
key: ${{ runner.os }}-cache-hello-world-key-v1.0 | |
- name: Install dependencies | |
# TODO: find a quicker method. Currently the download is fast but the installation is slow | |
# In total, it takes 5min | |
uses: airvzxf/[email protected] | |
with: | |
script: .github/workflows/cached_install.sh | |
is_cached: ${{ steps.cache-id.outputs.cache-hit }} | |
cache: ${{ runner.temp }}/cache-directory-example | |
snapshot: '/' | |
exclude: '/boot /data /dev /mnt /proc /run /sys' | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Install fonts | |
run: | | |
./.github/workflows/install_nerd_fonts.sh | |
- name: Install package | |
run: python -m pip install ./ | |
- name: Build | |
working-directory: ./examples | |
env: | |
REPO2TEX_FLAGS: --monofont "SauceCodePro Nerd Font Mono" --mainfont "SauceCodePro Nerd Font" | |
run: make clean all | |
- name: Archive PDFs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pdf | |
path: | | |
examples/*.pdf | |
examples/*.tex | |
examples/*.tar.gz | |
- name: Build with default fonts | |
working-directory: ./examples | |
run: make clean all | |
- name: Build with pdflatex | |
working-directory: ./examples | |
env: | |
TEX2PDF: pdflatex | |
run: make clean 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 |