Skip to content

Commit

Permalink
bring various settings up-to-date with the template, including manual…
Browse files Browse the repository at this point in the history
… style and using 0.12 for rendering
  • Loading branch information
SillyFreak committed Oct 20, 2024
1 parent e317c84 commit 18e9595
Show file tree
Hide file tree
Showing 15 changed files with 403 additions and 51 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ jobs:
exit 1
fi
- name: Install package locally
run: just install-preview

- name: Build package
run: |
just doc
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
strategy:
matrix:
# add any other Typst versions that your package should support
typst-version: ["0.11"]
typst-version: ["0.11", "0.12"]
# the docs don't need to build with all versions supported by the package;
# the latest one is enough
include:
- typst-version: "0.11"
- typst-version: "0.12"
doc: 1
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -45,13 +45,28 @@ jobs:
tag: ci-semi-stable

- name: Setup typst
id: setup-typst
uses: typst-community/setup-typst@v3
with:
typst-version: ${{ matrix.typst-version }}

- name: Install package locally
run: just install-preview

- name: Run test suite
run: just test

- name: Archive diffs
uses: actions/upload-artifact@v4
if: always()
with:
name: typst-${{ steps.setup-typst.outputs.typst-version }}-diffs
path: |
tests/**/diff/*.png
tests/**/out/*.png
tests/**/ref/*.png
retention-days: 5

- name: Build docs
if: ${{ matrix.doc }}
run: just doc
8 changes: 4 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ doc:
typst compile docs/manual.typ docs/manual.pdf
for f in $(find gallery -maxdepth 1 -name '*.typ'); do \
f="$(basename "$f" .typ)"; \
typst c "gallery/$f.typ"; \
typst c "gallery/$f.typ" "gallery/$f-solved.pdf" --input solution=true; \
typst compile "gallery/$f.typ"; \
typst compile "gallery/$f.typ" "gallery/$f-solved.pdf" --input solution=true; \
done

mkdir -p tmp
typst c --ppi 250 "gallery/example.typ" "tmp/example{n}.png"
typst c --ppi 250 "gallery/example.typ" "tmp/example-solved{n}.png" --input solution=true
typst compile --ppi 250 "gallery/example.typ" "tmp/example{n}.png"
typst compile --ppi 250 "gallery/example.typ" "tmp/example-solved{n}.png" --input solution=true
mv tmp/example1.png thumbnail.png
mv tmp/example-solved1.png thumbnail-solved.png
rm tmp/example*.png
Expand Down
Loading

0 comments on commit 18e9595

Please sign in to comment.