Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions .github/workflows/test_typst_out_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ on:
pull_request:
branches:
- main
workflow_dispatch:
inputs:
os:
description: 'Operating System(s) to test on'
required: false
type: choice
default: 'all'
options:
- 'all'
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
typst_version:
description: 'Typst version to test (leave empty for all versions)'
required: false
type: string

permissions:
contents: read
Expand Down Expand Up @@ -52,6 +68,28 @@ jobs:
# Parse the TYPST_VERSIONS array
ALL_VERSIONS='${{ env.TYPST_VERSIONS }}'

# Handle manual workflow_dispatch
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "Manual workflow dispatch detected"

# Handle OS selection
if [ "${{ github.event.inputs.os }}" == "all" ]; then
echo 'os-matrix=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT
else
echo 'os-matrix=["${{ github.event.inputs.os }}"]' >> $GITHUB_OUTPUT
fi

# Handle typst version selection
if [ -n "${{ github.event.inputs.typst_version }}" ]; then
echo 'typst-version-matrix=["${{ github.event.inputs.typst_version }}"]' >> $GITHUB_OUTPUT
else
# Use all versions from TYPST_VERSIONS
echo "typst-version-matrix=$ALL_VERSIONS" >> $GITHUB_OUTPUT
fi

exit 0
fi

if [ "${{ steps.filter.outputs.workflow }}" == "true" ]; then
# Check if this is a PR or push event
if [ "${{ github.event_name }}" == "pull_request" ]; then
Expand Down Expand Up @@ -142,8 +180,8 @@ jobs:
fonts-texgyre \
fonts-cascadia-code
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
# Install Not Sans CJK fonts
brew install --cask font-noto-sans-cjk
# Install Noto Sans CJK fonts (individual language-specific packages)
brew install --cask font-noto-sans-cjk-tc font-noto-sans-cjk-jp font-noto-sans-cjk-kr
# Install other fonts may be used in the template
echo "Installing TeX Gyre fonts..."
brew search font-tex-gyre | grep '^font-tex-gyre' | xargs -I{} brew install --cask {}
Expand Down