mirror of
https://github.com/typst/typst
synced 2025-05-14 04:56:26 +08:00
Update Cargo.toml and CI configuration ⚙
This commit is contained in:
parent
efb78831a7
commit
2188ef6b89
77
.github/workflows/rust.yml
vendored
77
.github/workflows/rust.yml
vendored
@ -1,42 +1,53 @@
|
|||||||
name: Rust
|
name: Continuous integration
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
working-directory: typstc
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
ci:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
rust: [stable]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
path: typstc
|
path: typstc
|
||||||
- name: Checkout fontdock
|
|
||||||
uses: actions/checkout@v2
|
- name: Checkout fontdock
|
||||||
with:
|
uses: actions/checkout@v2
|
||||||
repository: typst/fontdock
|
with:
|
||||||
token: ${{ secrets.TYPSTC_ACTION_TOKEN }} # `GitHub_PAT` is a secret that contains your PAT
|
repository: typst/fontdock
|
||||||
path: fontdock
|
token: ${{ secrets.TYPSTC_ACTION_TOKEN }}
|
||||||
- name: Checkout tide
|
path: fontdock
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
- name: Checkout tide
|
||||||
repository: typst/tide
|
uses: actions/checkout@v2
|
||||||
token: ${{ secrets.TYPSTC_ACTION_TOKEN }} # `GitHub_PAT` is a secret that contains your PAT
|
with:
|
||||||
path: tide
|
repository: typst/tide
|
||||||
- name: Build
|
token: ${{ secrets.TYPSTC_ACTION_TOKEN }}
|
||||||
run: cargo build --verbose
|
path: tide
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --verbose
|
- name: Install Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
override: true
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: --manifest-path typstc/Cargo.toml --all-features
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --manifest-path typstc/Cargo.toml --all-features
|
||||||
|
19
Cargo.toml
19
Cargo.toml
@ -5,21 +5,16 @@ authors = ["Laurenz Mädje <laurmaedje@gmail.com>"]
|
|||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
fontdock = { path = "../fontdock", features = ["serialize"] }
|
|
||||||
tide = { path = "../tide" }
|
|
||||||
byteorder = "1"
|
|
||||||
smallvec = "1"
|
|
||||||
unicode-xid = "0.2"
|
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
ttf-parser = "0.8.2"
|
fontdock = { path = "../fontdock", features = ["fs", "serialize"] }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
serde_json = { version = "1", optional = true }
|
serde_json = "1"
|
||||||
|
smallvec = "1"
|
||||||
|
tide = { path = "../tide" }
|
||||||
|
ttf-parser = "0.8.2"
|
||||||
|
unicode-xid = "0.2"
|
||||||
futures-executor = { version = "0.3", optional = true }
|
futures-executor = { version = "0.3", optional = true }
|
||||||
|
|
||||||
[features]
|
|
||||||
default = ["fs", "futures-executor", "serde_json"]
|
|
||||||
fs = ["fontdock/fs"]
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "typst"
|
name = "typst"
|
||||||
path = "src/bin/main.rs"
|
path = "src/bin/main.rs"
|
||||||
@ -29,4 +24,4 @@ required-features = ["futures-executor"]
|
|||||||
name = "typeset"
|
name = "typeset"
|
||||||
path = "tests/src/typeset.rs"
|
path = "tests/src/typeset.rs"
|
||||||
harness = false
|
harness = false
|
||||||
required-features = ["futures-executor", "serde_json"]
|
required-features = ["futures-executor"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user