Skip to content

Commit a5fabc2

Browse files
committed
Initial Commit
1 parent f26f72c commit a5fabc2

17 files changed

Lines changed: 2650 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
15+
16+
env:
17+
CARGO_TERM_COLOR: always
18+
19+
jobs:
20+
ci:
21+
name: ${{ matrix.name }}
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 30
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- name: Format
29+
command: cargo fmt --check
30+
components: rustfmt
31+
cache: false
32+
- name: Clippy
33+
command: cargo clippy -- -D warnings
34+
components: clippy
35+
cache: true
36+
- name: Test
37+
command: cargo test
38+
components: ""
39+
cache: true
40+
steps:
41+
- uses: actions/checkout@v6
42+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
43+
with:
44+
components: ${{ matrix.components }}
45+
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
46+
if: ${{ matrix.cache }}
47+
- run: ${{ matrix.command }}
48+
49+
compile-test:
50+
name: Compile Test
51+
runs-on: ubuntu-latest
52+
timeout-minutes: 30
53+
steps:
54+
- uses: actions/checkout@v6
55+
- uses: dtolnay/rust-toolchain@631a55b12751854ce901bb631d5902ceb48146f7
56+
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
57+
- uses: typst-community/setup-typst@48aeee7543d37f01afd1ffb27307dc277387ba13 # v4.3.1
58+
- name: Build typdiff
59+
run: cargo build
60+
- name: Diff and compile (basic fixtures)
61+
run: |
62+
cargo run -- tests/fixtures/old.typ tests/fixtures/new.typ -o /tmp/diff-basic.typ
63+
typst compile /tmp/diff-basic.typ /tmp/diff-basic.pdf
64+
- name: Diff and compile (rich fixtures)
65+
run: |
66+
cargo run -- tests/fixtures/rich-old.typ tests/fixtures/rich-new.typ -o /tmp/diff-rich.typ
67+
typst compile /tmp/diff-rich.typ /tmp/diff-rich.pdf

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug
4+
target
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
# Generated by cargo mutants
13+
# Contains mutation testing data
14+
**/mutants.out*/
15+
16+
# RustRover
17+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
18+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
19+
# and can be added to the global gitignore or merged into this file. For a more nuclear
20+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
21+
#.idea/

0 commit comments

Comments
 (0)