ci #1699
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '00 01 * * *' | |
jobs: | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
build: | |
- stable | |
- beta | |
- nightly | |
- macos | |
- win-msvc | |
- win-gnu | |
include: | |
- build: stable | |
os: ubuntu-latest | |
rust: stable | |
- build: beta | |
os: ubuntu-latest | |
rust: beta | |
- build: nightly | |
os: ubuntu-latest | |
rust: nightly | |
- build: macos | |
os: macos-latest | |
rust: stable | |
- build: win-msvc | |
os: windows-latest | |
rust: stable | |
- build: win-gnu | |
os: windows-latest | |
rust: stable-x86_64-gnu | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- run: cargo build --verbose | |
- run: cargo doc --verbose | |
- run: cargo test --verbose | |
- run: cargo build --verbose --manifest-path stree_cmd/Cargo.toml | |
- run: cargo build --verbose --manifest-path suffix_tree/Cargo.toml | |
- run: cargo test --verbose --manifest-path suffix_tree/Cargo.toml | |
- run: cargo doc --verbose --manifest-path suffix_tree/Cargo.toml | |
- run: cargo run --example basic | |
- if: matrix.rust == 'nightly' | |
run: cargo bench --verbose --no-run | |
rustfmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v1 | |
with: | |
fetch-depth: 1 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: Check formatting (root) | |
run: | | |
cargo fmt -- --check | |
- name: Check formatting (suffix_tree) | |
run: | | |
cargo fmt --manifest-path suffix_tree/Cargo.toml -- --check | |
- name: Check formatting (stree_cmd) | |
run: | | |
cargo fmt --manifest-path stree_cmd/Cargo.toml -- --check |