Skip to content

Commit

Permalink
bump CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowee committed Nov 27, 2024
1 parent a329630 commit 260078a
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 8 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,29 @@ jobs:
command: build
args: --release --sdist -o pyo3/dist --find-interpreter -m pyo3/Cargo.toml

build-typst:
needs: build-main
runs-on: ubuntu-latest
defaults:
run:
working-directory: typst/
steps:
- uses: actions/checkout@v3
- name: Build
run: |
cargo --version
cargo build --release --verbose --target wasm32-unknown-unknown
- name: Test
run: cargo test --verbose --target wasm32-unknown-unknown
- name: Clippy
run: cargo clippy --target wasm32-unknown-unknown --all-features -- -D warnings
- name: Check Format
run: cargo fmt -- --check
- name: Install Typst:
run: curl -fsSL https://typst.community/typst-install/install.sh | sh
- name: Typst Compile
run: typst compile example.typ

# now Pages.dev do this for us
# build-web:
# needs: build-main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pyo3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: PyO3
on:
push:
branches:
- main
# - main
- dev
tags:
- 'v*'
Expand Down
7 changes: 0 additions & 7 deletions typst/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions typst/example.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#set text(font: "Source Han Serif")

#align(center, text(22pt, weight: "bold")[
zhconv-rs 中文简繁及地區詞轉換
])

= Usage
At first:
`#import "@preview/zhconv:0.0.0": zhconv`
// #import "@preview/zhconv:0.0.0": zhconv
#import "zhconv.typ": zhconv

#box(stroke: red,
`#zhconv([
柳外輕雷池上雨
雨聲滴碎荷聲
小樓西角斷虹明
闌乾倚處
待得月華生
], "zh-hans")`
)

#zhconv([
柳外輕雷池上雨
雨聲滴碎荷聲
小樓西角斷虹明
闌乾倚處
待得月華生
], "zh-tw")

#zhconv([
柳外輕雷池上雨 \
雨聲滴碎荷聲 \
小樓西角斷虹明 \
闌干倚處 \
待得月華生 \
], "zh-hans")

0 comments on commit 260078a

Please sign in to comment.