Skip to content

updates from typst app #146

updates from typst app

updates from typst app #146

Workflow file for this run

name: Test
on: [ push, pull_request ]
jobs:
compile:
name: Compile template with typst ${{ matrix.typst-version }}
runs-on: ubuntu-latest
strategy:
matrix:
typst-version: [ '0.14' ]
steps:
- uses: typst-community/setup-typst@v4
with:
typst-version: ${{ matrix.typst-version }}
allow-prereleases: true
- name: Install webp
run: |
which cwebp || sudo apt install webp
- uses: actions/checkout@v4
- name: Extract version
run: |
VERSION=$(awk -F'= *' '/^version/{gsub(/"/,"",$2);print $2}' typst.toml)
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Link local template package
run: |
mkdir -p ~/.local/share/typst/packages/preview/accelerated-jacow
ln -s $(pwd) ~/.local/share/typst/packages/preview/accelerated-jacow/$VERSION
- name: Install font
run: |
sudo apt install tex-gyre
- name: Init & compile
run: |
typst init @preview/accelerated-jacow:$VERSION
cd accelerated-jacow
ls -l
grep "#import \"@preview/accelerated-jacow:$VERSION\"" *.typ
typst compile *.typ
ls -l
- name: Create thumbnail
run: |
cd accelerated-jacow
typst compile --pages 1 --ppi 250 *.typ thumbnail.png
cwebp -lossless thumbnail.png -o thumbnail.webp
- uses: actions/upload-artifact@v4
with:
name: PDF
path: |
accelerated-jacow/*.pdf
accelerated-jacow/thumbnail.webp
if-no-files-found: error
tests:
name: Run tests with tytanic
runs-on: ubuntu-latest
steps:
- name: Install tytanic
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: [email protected]
- name: Install font
run: |
sudo apt install tex-gyre
- name: Checkout
uses: actions/checkout@v4
- name: Run test suite
run: |
tt run --no-fail-fast --use-system-fonts
- name: Archive artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: artifacts
path: |
tests/**/diff/*.png
tests/**/out/*.png
tests/**/ref/*.png
retention-days: 7