Enable separation and selection of features when building

This commit is contained in:
Tobie Morgan Hitchcock 2022-08-26 01:24:08 +01:00
parent 2bfcb9d694
commit 21fd5b8868
3 changed files with 13 additions and 3 deletions

View file

@ -99,18 +99,23 @@ jobs:
- arch: x86_64-apple-darwin
os: macos-latest
file: surreal-${{ github.ref_name }}.darwin-amd64
opts: --features storage-tikv
- arch: aarch64-apple-darwin
os: macos-latest
file: surreal-${{ github.ref_name }}.darwin-arm64
opts: --features storage-tikv
- arch: x86_64-unknown-linux-gnu
os: ubuntu-latest
file: surreal-${{ github.ref_name }}.linux-amd64
opts: --features storage-tikv
- arch: aarch64-unknown-linux-gnu
os: ubuntu-latest
file: surreal-${{ github.ref_name }}.linux-arm64
opts: --features storage-tikv
# - arch: x86_64-pc-windows-gnu
# os: windows-latest
# file: surreal-${{ github.ref_name }}.windows-amd64
# opts:
runs-on: ${{ matrix.os }}
steps:
@ -159,7 +164,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --target ${{ matrix.arch }}
args: ${{ matrix.opts }} --release --locked --target ${{ matrix.arch }}
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1

View file

@ -5,6 +5,11 @@ edition = "2021"
version = "1.0.0-beta.6"
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]
[features]
default = []
storage-tikv = ["surrealdb/kv-tikv"]
storage-fdb = ["surrealdb/kv-fdb"]
[workspace]
members = ["lib"]

View file

@ -14,13 +14,13 @@ categories = ["database-implementations", "data-structures", "embedded"]
license = "Apache-2.0"
[features]
default = ["parallel", "kv-tikv", "kv-echodb", "kv-yokudb", "scripting", "http"]
default = ["parallel", "kv-echodb", "kv-rocksdb", "scripting", "http"]
parallel = ["dep:executor"]
kv-tikv = ["dep:tikv"]
kv-fdb = ["dep:foundationdb"]
kv-echodb = ["dep:echodb"]
kv-indxdb = ["dep:indxdb"]
kv-yokudb = []
kv-rocksdb = []
scripting = ["dep:js", "dep:executor"]
http = ["dep:surf"]