-
Notifications
You must be signed in to change notification settings - Fork 53
67 lines (51 loc) · 1.83 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI Build Status
on:
pull_request:
push:
branches: main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
defaults:
run:
shell: bash
jobs:
build:
strategy:
matrix:
target:
- { os: ubuntu-latest, host: '' }
- { os: macos-latest, host: '' }
- { os: windows-latest, host: '-x86_64-pc-windows-msvc' }
- { os: windows-latest, host: '-i686-pc-windows-msvc' }
toolchain: [1.58.0, stable, beta, nightly]
fail-fast: false
runs-on: ${{ matrix.target.os }}
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain ${{ matrix.toolchain }}${{ matrix.target.host }} on ${{ matrix.target.os }}
run: |
rustup toolchain install ${{ matrix.toolchain }}${{ matrix.target.host }} --profile minimal --component rustfmt clippy
rustup default ${{ matrix.toolchain }}${{ matrix.target.host }}
- if: ${{ matrix.toolchain == 'nightly' }}
run: cargo clippy --all-features -- -D warnings
env:
CC: clang
- run: cargo build --verbose
- name: Test with all features
run: cargo test --all --verbose
- name: Test with no default features
run: cargo test --lib --no-default-features --verbose
- name: Test with db-dup-sort
run: cargo test --lib --no-default-features --features "db-dup-sort" --verbose
- name: Test with db-int-key
run: cargo test --lib --no-default-features --features "db-int-key" --verbose
- name: Test with LMDB enabled
run: cargo test --all --features "lmdb" --verbose
- name: Test in release mode
run: cargo test --release --all --verbose
- name: Run all examples
run: ./run-all-examples.sh