Skip to content

Commit 7d45f82

Browse files
rocksdb compilation error fix (#7408)
## Description Attempts to fix error in CI: https://github.com/FuelLabs/sway/actions/runs/17945577761/job/51050235186 Build environment setup for RocksDB: * Added a step to install required system packages (`build-essential`, `clang`, `llvm-dev`, `libclang-dev`, `pkg-config`) on Linux runners to support building RocksDB and running `bindgen`. * Configured `LIBCLANG_PATH` and `BINDGEN_EXTRA_CLANG_ARGS` environment variables to ensure `bindgen` can locate the correct Clang libraries and system headers. ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [ ] I have requested a review from the relevant team or maintainers. Co-authored-by: z <[email protected]> Co-authored-by: Joshua Batty <[email protected]>
1 parent 36d2b12 commit 7d45f82

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,20 @@ jobs:
952952
cache-on-failure: true
953953
key: "${{ matrix.job.target }}"
954954

955+
- name: Prepare RocksDB build env
956+
if: runner.os == 'Linux'
957+
env:
958+
DEBIAN_FRONTEND: noninteractive
959+
run: |
960+
sudo apt-get update
961+
sudo apt-get install -y build-essential clang llvm-dev libclang-dev pkg-config
962+
963+
# ensure bindgen loads the freshly installed libclang runtime
964+
echo "LIBCLANG_PATH=$(llvm-config --libdir)" >> "$GITHUB_ENV"
965+
966+
# ensure bindgen resolves standard headers on the runner
967+
echo "BINDGEN_EXTRA_CLANG_ARGS=--sysroot=/usr" >> "$GITHUB_ENV"
968+
955969
- name: Use Cross
956970
uses: baptiste0928/cargo-install@v1
957971
with:

0 commit comments

Comments
 (0)