Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 8f4f876

Browse files
committed
add install.sh script for the c-api
1 parent 42a732b commit 8f4f876

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/lib.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,7 @@ jobs:
1111
- uses: actions/checkout@v1
1212
- name: Build
1313
run: cargo build --verbose
14+
- name: Install ObjectBox C-API
15+
run: ./install.sh
1416
- name: Run tests
1517
run: cargo test --verbose

install.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -eu
3+
4+
cLibVersion=0.7.1
5+
os=$(uname)
6+
7+
# if there's no tty this is probably part of a docker build - therefore we install the c-api explicitly
8+
cLibArgs=
9+
if [[ "$os" != MINGW* ]] && [[ "$os" != CYGWIN* ]]; then
10+
tty -s || cLibArgs="${cLibArgs} --install"
11+
fi
12+
13+
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/master/download.sh) ${cLibArgs} ${cLibVersion}

0 commit comments

Comments
 (0)