Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use external libs #133

Merged
merged 13 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ insert_final_newline=true
[*.swift]
indent_style=space
tab_width=4

[*.yml]
indent_style=tab
indent_size=2
35 changes: 4 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,19 @@ jobs:
test:
name: Build and Test
runs-on: [self-hosted, linux]

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: recursive
- name: MsQuic Install Dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-add-repository -y ppa:lttng/stable-2.13
sudo apt-get update
sudo apt-get install -y lttng-tools lttng-modules-dkms babeltrace2 liblttng-ust-dev python3-babeltrace
sudo apt-get install -y cmake
sudo apt-get install -y build-essential
- name: Get msquic submodule commit hash
id: msquic-commit-hash
run: |
echo "commit-hash=$(git submodule status Networking/Sources/msquic/ | cut -c2-41)" >> $GITHUB_OUTPUT
- run: sudo apt-get update
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: librocksdb-dev libzstd-dev libbz2-dev liblz4-dev
- name: Get blst submodule commit hash
id: blst-commit-hash
run: |
echo "commit-hash=$(git submodule status Utils/Sources/blst/ | cut -c2-41)" >> $GITHUB_OUTPUT
- name: Get rocksdb submodule commit hash
id: rocksdb-commit-hash
run: |
echo "commit-hash=$(git submodule status Database/Sources/rocksdb/ | cut -c2-41)" >> $GITHUB_OUTPUT
- name: Cache SPM
uses: actions/cache@v4
with:
Expand All @@ -68,13 +55,6 @@ jobs:
~/.cargo/git/db/
Utils/Sources/bandersnatch/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache msquic static lib
uses: actions/cache@v4
with:
path: .lib/libmsquic.a
key: ${{ runner.os }}-libs-msquic-${{ steps.msquic-commit-hash.outputs.commit-hash }}
restore-keys: |
${{ runner.os }}-libs-msquic
- name: Cache blst static lib
uses: actions/cache@v4
with:
Expand All @@ -89,13 +69,6 @@ jobs:
key: ${{ runner.os }}-libs-libbandersnatch-${{ hashFiles('Utils/Sources/bandersnatch/**') }}
restore-keys: |
${{ runner.os }}-libs-libbandersnatch
- name: Cache rocksdb static lib
uses: actions/cache@v4
with:
path: .lib/librocksdb.a
key: ${{ runner.os }}-libs-librocksdb-${{ steps.rocksdb-commit-hash.outputs.commit-hash }}
restore-keys: |
${{ runner.os }}-libs-librocksdb
- name: Cache erasure-coding static lib
uses: actions/cache@v4
with:
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,3 @@
[submodule "blst"]
path = Utils/Sources/blst
url = https://github.com/supranational/blst.git
[submodule "Database/Sources/rocksdb"]
path = Database/Sources/rocksdb
url = https://github.com/facebook/rocksdb.git
[submodule "Networking/Sources/msquic"]
path = Networking/Sources/msquic
url = https://github.com/microsoft/msquic.git
6 changes: 4 additions & 2 deletions Database/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "Database",
platforms: [
.macOS(.v14),
.macOS(.v15),
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
Expand All @@ -27,9 +27,11 @@ let package = Package(
"rocksdb",
],
linkerSettings: [
.unsafeFlags(["-L../.lib"]),
.unsafeFlags(["-L../.lib", "-L/opt/homebrew/lib"]),
.linkedLibrary("z"),
.linkedLibrary("bz2"),
.linkedLibrary("zstd"),
.linkedLibrary("lz4"),
]
),
.systemLibrary(
Expand Down
Loading