mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-29 21:52:12 +08:00
131 lines
3.4 KiB
YAML
131 lines
3.4 KiB
YAML
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 }
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
target: ${{ matrix.platform.target }}
|
|
default: true
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --features bundled --workspace --all-targets
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --features bundled --workspace --all-targets
|
|
|
|
- name: "cargo test --features 'bundled-full session buildtime_bindgen'"
|
|
if: matrix.platform.os != 'windows-latest'
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --features 'bundled-full session buildtime_bindgen' --all-targets --workspace
|
|
|
|
- name: "cargo test --features bundled-full"
|
|
if: matrix.platform.os == 'windows-latest'
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --features bundled-full --all-targets --workspace
|
|
|
|
- name: Static build
|
|
if: matrix.platform.os == 'windows-latest'
|
|
shell: cmd
|
|
run: |
|
|
set RUSTFLAGS=-Ctarget-feature=+crt-static
|
|
cargo build --features bundled
|
|
|
|
# Ensure clippy doesn't complain.
|
|
clippy:
|
|
name: Clippy
|
|
strategy:
|
|
fail-fast: false
|
|
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
|
|
# clippy with just bundled
|
|
args: --all-targets --workspace --features bundled
|
|
- uses: actions-rs/cargo@v1
|
|
env:
|
|
RUSTFLAGS: -D warnings
|
|
with:
|
|
command: clippy
|
|
# Clippy with all non-conflicting features
|
|
args: --all-targets --workspace --features 'bundled-full session buildtime_bindgen'
|
|
|
|
# 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 'bundled-full session buildtime_bindgen'
|