-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to use static builds of libtiledb (#186)
This updates the tiledb-sys crate to be able to build a static version of libtiledb. This allows Rust projects to create statically linked binaries for distribution.
- Loading branch information
Showing
29 changed files
with
1,515 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
otool -L target/debug/examples/quickstart_dense-* | grep tiledb | ||
if [ "$?" -eq "0" ]; then | ||
echo "Detected dynamic linkage to libtiledb.dylib" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
ldd target/debug/examples/quickstart_dense-* | grep tiledb | ||
if [ "$?" -eq "0" ]; then | ||
echo "Detected dynamic linkage to libtiledb.so" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Static Nightlies | ||
on: | ||
schedule: | ||
# runs every day at 1:45 UTC | ||
- cron: "45 01 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
name: Test Static Build | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "macos-latest"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout tiledb-rs | ||
uses: actions/checkout@v4 | ||
- name: Install Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable | ||
- name: Test | ||
run: cargo test --all-targets --all-features | ||
env: | ||
# Building against a static version of libtiledb | ||
TILEDB_SYS_STATIC: true | ||
# Limit parallel compilation jobs to avoid exhausting RAM | ||
TILEDB_SYS_JOBS: 4 | ||
- name: Assert Static Linkage | ||
if: ${{ startsWith(matrix.os, 'ubuntu-') }} | ||
run: .github/scripts/ubuntu-check-static-linkage.sh | ||
- name: Assert Static Linkage | ||
if: ${{ startsWith(matrix.os, 'macos-') }} | ||
run: .github/scripts/macos-check-static-linkage.sh | ||
|
||
create_issue_on_fail: | ||
name: Create Issue on Fail | ||
permissions: | ||
issues: write | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: failure() || cancelled() | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Create Issue on Failure | ||
uses: TileDB-Inc/github-actions/open-issue@main | ||
with: | ||
name: Nightly Build Failure | ||
label: nightly-failure | ||
assignee: davisp,rroelke |
Oops, something went wrong.