Make sqlite bundling optional (#110)

* Manually specify libsqlite version

* Make sqlite bundling optional

* Skip tests on windows without bundled sqlite
This commit is contained in:
Antoine Gersant 2020-12-08 01:22:17 -08:00 committed by GitHub
parent 454d73c754
commit 866d82a16c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View file

@ -10,10 +10,16 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
features: [--all-features, --features default] features: [--all-features, --features default, --features "service-rocket" --no-default-features]
os: [ubuntu-latest, windows-latest, macOS-latest] os: [ubuntu-latest, windows-latest, macOS-latest]
exclude:
- os: windows-latest
features: --features "service-rocket" --no-default-features
steps: steps:
- name: Install libsqlite3-dev
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install libsqlite3-dev
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:

View file

@ -5,9 +5,10 @@ authors = ["Antoine Gersant <antoine.gersant@lesforges.org>"]
edition = "2018" edition = "2018"
[features] [features]
default = ["service-rocket"] default = ["service-rocket", "bundle-sqlite"]
ui = ["uuid", "winapi"] ui = ["uuid", "winapi"]
service-rocket = ["rocket", "rocket_contrib"] service-rocket = ["rocket", "rocket_contrib"]
bundle-sqlite = ["libsqlite3-sys"]
[dependencies] [dependencies]
anyhow = "1.0.35" anyhow = "1.0.35"
@ -17,7 +18,7 @@ crossbeam-channel = "0.5"
diesel_migrations = { version = "1.4", features = ["sqlite"] } diesel_migrations = { version = "1.4", features = ["sqlite"] }
getopts = "0.2.15" getopts = "0.2.15"
id3 = "0.5.1" id3 = "0.5.1"
libsqlite3-sys = { version = "*", features = ["bundled", "bundled-windows"] } libsqlite3-sys = { version = "0.18", features = ["bundled", "bundled-windows"], optional = true }
rustfm-scrobble = "^1" rustfm-scrobble = "^1"
lewton = "0.10.1" lewton = "0.10.1"
log = "0.4.5" log = "0.4.5"