-
Notifications
You must be signed in to change notification settings - Fork 44
ci: use prebuilt librocksdb in github actions #2316
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
Changes from 25 commits
6e95aa0
ca00d6e
25abfd6
dafc311
9b093df
39eb45c
249f8b5
488a7ae
8ccb067
e608408
eafa040
98f0af6
49ee181
9a57f6f
355e344
0239693
0a73edc
8318995
97bcd47
40e8ad5
9b8e0c2
d3b6c8a
fcd3d6a
169a655
c939f44
dd18c7d
39e9c41
691afb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| --- | ||
| name: "librocksdb" | ||
| description: "Build and install librocksdb" | ||
| inputs: | ||
| runs-on: | ||
| description: Target platform | ||
| required: false | ||
| default: linux-24.04 | ||
| version: | ||
| description: RocksDB version, eg. "8.10.2" | ||
| required: false | ||
| default: "8.10.2" | ||
| bucket: | ||
| description: S3 bucket to use for caching | ||
| required: false | ||
| default: multi-runner-cache-x1xibo9c | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| # Cache librocksdb using s3 bucket | ||
| - name: Restore cached librocksdb from S3 | ||
| id: librocksdb-cache | ||
| uses: strophy/actions-cache@opendal-update | ||
| with: | ||
|
Comment on lines
+25
to
+28
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider pinning the forked cache action to a specific commit. Using a fork of
Example: - uses: strophy/actions-cache@opendal-update
+ uses: strophy/actions-cache@commit-hash # Replace with actual commit hash
|
||
| bucket: ${{ inputs.bucket }} | ||
| path: /opt/rocksdb | ||
| key: librocksdb/${{ inputs.version }}/${{ runner.os }}/${{ runner.arch }} | ||
lklimek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - if: ${{ steps.librocksdb-cache.outputs.cache-hit != 'true' }} | ||
| shell: bash | ||
| name: Build librocksdb | ||
| run: | | ||
| set -ex | ||
| WORKDIR=/tmp/rocksdb-build | ||
| mkdir -p ${WORKDIR}/rocksdb | ||
| mkdir -p /opt/rocksdb/usr/local/lib/ | ||
| pushd ${WORKDIR}/rocksdb | ||
| # building rocksdb | ||
| [[ -d .git ]] || git clone https://github.com/facebook/rocksdb.git -b v${{ inputs.version }} --depth 1 . | ||
| make -j$(nproc) static_lib | ||
| make DESTDIR=/opt/rocksdb install-static | ||
| set +x | ||
lklimek marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| echo Done. | ||
| echo Configuration: | ||
| echo | ||
| echo "ROCKSDB_STATIC='/opt/rocksdb/usr/local/lib/librocksdb.a'" | ||
| echo "ROCKSDB_LIB_DIR='/opt/rocksdb/usr/local/lib'" | ||
| popd | ||
Uh oh!
There was an error while loading. Please reload this page.