rusqlite/.github/workflows/main.yml

101 lines
3.0 KiB
YAML
Raw Normal View History

2020-02-19 02:49:43 +08:00
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
platform:
# - { target: x86_64-pc-windows-gnu, os: windows-latest }
- { target: x86_64-pc-windows-msvc, os: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
2020-02-19 02:49:43 +08:00
runs-on: ${{ matrix.platform.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
2020-02-19 02:49:43 +08:00
with:
target: ${{ matrix.platform.target }}
default: true
profile: minimal
toolchain: stable
override: true
2020-03-08 22:36:56 +08:00
- run: cargo build --features bundled --workspace --all-targets
- run: cargo test --features bundled --workspace --all-targets
- run: cargo test --features bundled --workspace --doc
# We can't use --all-features.
- run: cargo test --features 'array backup blob bundled chrono collation csvtab extra_check functions hooks i128_blob limits load_extension serde_json series trace url vtab_v3 window'
2020-02-19 04:17:37 +08:00
- name: Static build
2020-02-19 04:21:31 +08:00
if: matrix.platform.os == 'windows-latest'
2020-02-19 04:17:37 +08:00
shell: cmd
run: |
set RUSTFLAGS=-Ctarget-feature=+crt-static
cargo build --features bundled
# Ensure clippy doesn't complain.
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
env:
RUSTFLAGS: -D warnings
with:
command: clippy
args: --all-targets --all --features 'array backup blob bundled chrono collation csvtab extra_check functions hooks i128_blob limits load_extension serde_json series trace url vtab_v3 window' -- -D warnings
# Ensure patch is formatted.
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
# Detect cases where documentation links don't resolve and such.
doc:
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
# Docs.rs uses nightly, which allows for easier syntax for linking to functions.
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
env:
RUSTFLAGS: -D warnings
with:
command: doc
args: --no-deps --features 'array backup blob bundled chrono collation csvtab extra_check functions hooks i128_blob limits load_extension serde_json series trace url vtab_v3 window'