-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into marko/drop-duplicate-regs
- Loading branch information
Showing
11 changed files
with
135 additions
and
238 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,20 @@ | ||
#!/usr/bin/env bash | ||
set -Eeuo pipefail | ||
|
||
if [ -z "$ROCKSDB_VERSION" ]; then | ||
echo "ROCKSDB_VERSION is not set." | ||
exit 1 | ||
fi | ||
|
||
# Update and install dependencies | ||
sudo apt update && sudo apt-get install -y libsnappy-dev zlib1g-dev libbz2-dev liblz4-dev libzstd-dev build-essential | ||
|
||
# Clone RocksDB repository | ||
git clone https://github.com/facebook/rocksdb.git /home/runner/rocksdb | ||
cd /home/runner/rocksdb || exit 1 | ||
git checkout "v${ROCKSDB_VERSION}" | ||
|
||
# Build shared library | ||
sudo make -j "$(nproc --all)" shared_lib | ||
sudo cp --preserve=links ./librocksdb.* /usr/local/lib/ | ||
sudo cp -r ./include/rocksdb/ /usr/local/include/ |
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
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 |
---|---|---|
|
@@ -8,14 +8,16 @@ on: | |
merge_group: | ||
permissions: | ||
contents: read | ||
|
||
env: | ||
ROCKSDB_VERSION: 8.11.3 | ||
|
||
jobs: | ||
golangci: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.23" | ||
|
@@ -28,13 +30,35 @@ jobs: | |
Makefile | ||
**/Makefile | ||
.golangci.yml | ||
- name: Fix permissions for cache | ||
run: sudo chown $(whoami) /usr/local/lib /usr/local/include | ||
- name: Restore rocksdb libraries cache | ||
id: cache-rocksdb | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
/usr/local/lib/librocksdb.* | ||
/usr/local/include/rocksdb | ||
key: ${{ runner.os }}-rocksdb-${{ env.ROCKSDB_VERSION }}-amd64 | ||
- name: Install rocksdb | ||
if: env.GIT_DIFF && steps.cache-rocksdb.outputs.cache-hit != 'true' | ||
id: install_rocksdb | ||
run: ./.github/scripts/install-rocksdb.sh | ||
- name: Saves rocksdb libraries cache | ||
if: steps.install_rocksdb.outcome == 'success' | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
/usr/local/lib/librocksdb.* | ||
/usr/local/include/rocksdb | ||
key: ${{ runner.os }}-rocksdb-${{ env.ROCKSDB_VERSION }}-amd64 | ||
- name: run linting (long) | ||
if: env.GIT_DIFF | ||
id: lint_long | ||
run: | | ||
nix develop -c make lint | ||
make lint | ||
env: | ||
NIX: 1 | ||
ROCKSDB: 1 | ||
- uses: technote-space/[email protected] | ||
if: steps.lint_long.outcome == 'skipped' | ||
with: | ||
|
@@ -57,8 +81,8 @@ jobs: | |
- name: run linting (short) | ||
if: steps.lint_long.outcome == 'skipped' && env.GIT_DIFF | ||
run: | | ||
nix develop -c make lint | ||
make lint | ||
env: | ||
GIT_DIFF: ${{ env.GIT_DIFF }} | ||
LINT_DIFF: 1 | ||
NIX: 1 | ||
ROCKSDB: 1 |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.