diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a49f1a795..a649b53c6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,42 +1,53 @@ -name: Rust +name: Continuous integration on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always - -defaults: - run: - shell: bash - working-directory: typstc + branches: [master] jobs: - build: - + ci: runs-on: ubuntu-latest + strategy: + matrix: + rust: [stable] steps: - - name: Checkout - uses: actions/checkout@v2 - with: - path: typstc - - name: Checkout fontdock - uses: actions/checkout@v2 - with: - repository: typst/fontdock - token: ${{ secrets.TYPSTC_ACTION_TOKEN }} # `GitHub_PAT` is a secret that contains your PAT - path: fontdock - - name: Checkout tide - uses: actions/checkout@v2 - with: - repository: typst/tide - token: ${{ secrets.TYPSTC_ACTION_TOKEN }} # `GitHub_PAT` is a secret that contains your PAT - path: tide - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - name: Checkout source code + uses: actions/checkout@v2 + with: + path: typstc + + - name: Checkout fontdock + uses: actions/checkout@v2 + with: + repository: typst/fontdock + token: ${{ secrets.TYPSTC_ACTION_TOKEN }} + path: fontdock + + - name: Checkout tide + uses: actions/checkout@v2 + with: + repository: typst/tide + token: ${{ secrets.TYPSTC_ACTION_TOKEN }} + path: tide + + - 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 diff --git a/Cargo.toml b/Cargo.toml index 2d2629ca8..e0563b5c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,21 +5,16 @@ authors = ["Laurenz Mädje "] edition = "2018" [dependencies] -fontdock = { path = "../fontdock", features = ["serialize"] } -tide = { path = "../tide" } -byteorder = "1" -smallvec = "1" -unicode-xid = "0.2" async-trait = "0.1" -ttf-parser = "0.8.2" +fontdock = { path = "../fontdock", features = ["fs", "serialize"] } 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 } -[features] -default = ["fs", "futures-executor", "serde_json"] -fs = ["fontdock/fs"] - [[bin]] name = "typst" path = "src/bin/main.rs" @@ -29,4 +24,4 @@ required-features = ["futures-executor"] name = "typeset" path = "tests/src/typeset.rs" harness = false -required-features = ["futures-executor", "serde_json"] +required-features = ["futures-executor"]