Skip to content

Commit 4ce426d

Browse files
Embed patched recipe for RocksDB 6.29.5 (XRPLF#4947)
1 parent c28e005 commit 4ce426d

9 files changed

Lines changed: 354 additions & 45 deletions

File tree

.github/actions/dependencies/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,27 @@ runs:
1212
- name: export custom recipes
1313
shell: bash
1414
run: |
15+
conan config set general.revisions_enabled=1
1516
conan export external/snappy snappy/1.1.10@
17+
conan export external/rocksdb rocksdb/6.29.5@
1618
conan export external/soci soci/4.0.3@
19+
- name: try to authenticate to ripple Conan remote
20+
id: remote
21+
shell: bash
22+
run: |
23+
# Do not quote the URL. An empty string will be accepted (with
24+
# a non-fatal warning), but a missing argument will not.
25+
conan remote add ripple ${{ env.CONAN_URL }} --insert 0
26+
echo outcome=$(conan user --remote ripple ${{ env.CONAN_USERNAME }} \
27+
--password ${{ env.CONAN_TOKEN }} >&2 && echo success || \
28+
echo failure) | tee ${GITHUB_OUTPUT}
29+
- name: list missing binaries
30+
id: binaries
31+
shell: bash
32+
# Print the list of dependencies that would need to be built locally.
33+
# A non-empty list means we have "failed" to cache binaries remotely.
34+
run: |
35+
echo missing=$(conan info . --build missing --settings build_type=${{ inputs.configuration }} --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
1736
- name: install dependencies
1837
shell: bash
1938
run: |
@@ -24,3 +43,7 @@ runs:
2443
--build missing \
2544
--settings build_type=${{ inputs.configuration }} \
2645
..
46+
- name: upload dependencies to remote
47+
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'success')
48+
shell: bash
49+
run: conan upload --remote ripple '*' --all --parallel --confirm

.github/workflows/macos.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,13 @@ jobs:
3737
run : |
3838
conan profile get env.CXXFLAGS default || true
3939
conan profile update 'conf.tools.build:cxxflags+=["-DBOOST_ASIO_DISABLE_CONCEPTS"]' default
40-
- name: dependencies
40+
conan remote remove ripple
41+
- name: build dependencies
4142
uses: ./.github/actions/dependencies
43+
env:
44+
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
45+
CONAN_USERNAME: ${{ secrets.CONAN_USERNAME }}
46+
CONAN_TOKEN: ${{ secrets.CONAN_TOKEN }}
4247
with:
4348
configuration: ${{ matrix.configuration }}
4449
- name: build

.github/workflows/nix.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ jobs:
6262
cmake --version
6363
env | sort
6464
- name: configure Conan
65-
env:
66-
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
6765
run: |
6866
conan profile new default --detect
6967
conan profile update settings.compiler.cppstd=20 default
@@ -73,33 +71,17 @@ jobs:
7371
conan profile update env.CC=${{ matrix.profile.cc }} default
7472
conan profile update env.CXX=${{ matrix.profile.cxx }} default
7573
conan profile update conf.tools.build:compiler_executables='{"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default
76-
# Do not quote the URL. An empty string will be accepted (with
77-
# a non-fatal warning), but a missing argument will not.
78-
conan remote add ripple ${{ env.CONAN_URL }} --insert 0
79-
- name: try to authenticate to ripple Conan remote
80-
id: remote
81-
run: |
82-
echo outcome=$(conan user --remote ripple ${{ secrets.CONAN_USERNAME }} --password ${{ secrets.CONAN_TOKEN }} >&2 && echo success || echo failure) | tee ${GITHUB_OUTPUT}
8374
- name: archive profile
8475
# Create this archive before dependencies are added to the local cache.
8576
run: tar -czf conan.tar -C ~/.conan .
86-
- name: list missing binaries
87-
id: binaries
88-
# Print the list of dependencies that would need to be built locally.
89-
# A non-empty list means we have "failed" to cache binaries remotely.
90-
run: |
91-
echo missing=$(conan info . --build missing --settings build_type=${{ matrix.configuration }} --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
9277
- name: build dependencies
93-
if: (steps.binaries.outputs.missing != '[]')
9478
uses: ./.github/actions/dependencies
79+
env:
80+
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
81+
CONAN_USERNAME: ${{ secrets.CONAN_USERNAME }}
82+
CONAN_TOKEN: ${{ secrets.CONAN_TOKEN }}
9583
with:
9684
configuration: ${{ matrix.configuration }}
97-
- name: upload dependencies to remote
98-
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'success')
99-
run: conan upload --remote ripple '*' --all --parallel --confirm
100-
- name: recreate archive with dependencies
101-
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'failure')
102-
run: tar -czf conan.tar -C ~/.conan .
10385
- name: upload archive
10486
uses: actions/upload-artifact@v3
10587
with:
@@ -148,6 +130,8 @@ jobs:
148130
uses: actions/checkout@v3
149131
- name: dependencies
150132
uses: ./.github/actions/dependencies
133+
env:
134+
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
151135
with:
152136
configuration: ${{ matrix.configuration }}
153137
- name: build
@@ -197,6 +181,8 @@ jobs:
197181
uses: actions/checkout@v3
198182
- name: dependencies
199183
uses: ./.github/actions/dependencies
184+
env:
185+
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
200186
with:
201187
configuration: ${{ matrix.configuration }}
202188
- name: build

.github/workflows/windows.yml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -54,35 +54,17 @@ jobs:
5454
dir env:
5555
- name: configure Conan
5656
shell: bash
57-
env:
58-
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
5957
run: |
6058
conan profile new default --detect
6159
conan profile update settings.compiler.runtime=MT${{ matrix.configuration == 'Debug' && 'd' || '' }} default
62-
# Do not quote the URL. An empty string will be accepted (with
63-
# a non-fatal warning), but a missing argument will not.
64-
conan remote add ripple ${{ env.CONAN_URL }} --insert 0
65-
- name: try to authenticate to ripple Conan remote
66-
shell: bash
67-
id: remote
68-
run: |
69-
echo outcome=$(conan user --remote ripple ${{ secrets.CONAN_USERNAME }} \
70-
--password ${{ secrets.CONAN_TOKEN }} >&2 && echo success || \
71-
echo failure) | tee ${GITHUB_OUTPUT}
72-
- name: list missing binaries
73-
id: binaries
74-
shell: bash
75-
# Print the list of dependencies that would need to be built locally.
76-
# A non-empty list means we have "failed" to cache binaries remotely.
77-
run: |
78-
echo missing=$(conan info . --build missing --settings build_type=${{ matrix.configuration }} --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT}
7960
- name: build dependencies
8061
uses: ./.github/actions/dependencies
62+
env:
63+
CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/conan-non-prod
64+
CONAN_USERNAME: ${{ secrets.CONAN_USERNAME }}
65+
CONAN_TOKEN: ${{ secrets.CONAN_TOKEN }}
8166
with:
8267
configuration: ${{ matrix.configuration }}
83-
- name: upload dependencies to remote
84-
if: (steps.binaries.outputs.missing != '[]') && (steps.remote.outputs.outcome == 'success')
85-
run: conan upload --remote ripple '*' --all --parallel --confirm
8668
- name: build
8769
uses: ./.github/actions/build
8870
with:

BUILD.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ which allows you to statically link it with GCC, if you want.
147147
conan export external/snappy snappy/1.1.10@
148148
```
149149

150+
Export our [Conan recipe for RocksDB](./external/rocksdb).
151+
It does not override paths to dependencies when building with Visual Studio.
152+
153+
```
154+
conan export external/rocksdb rocksdb/6.29.5@
155+
```
156+
150157
Export our [Conan recipe for SOCI](./external/soci).
151158
It patches their CMake to correctly import its dependencies.
152159

external/rocksdb/conandata.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
sources:
2+
"6.29.5":
3+
url: "https://github.com/facebook/rocksdb/archive/refs/tags/v6.29.5.tar.gz"
4+
sha256: "ddbf84791f0980c0bbce3902feb93a2c7006f6f53bfd798926143e31d4d756f0"
5+
"6.27.3":
6+
url: "https://github.com/facebook/rocksdb/archive/refs/tags/v6.27.3.tar.gz"
7+
sha256: "ee29901749b9132692b26f0a6c1d693f47d1a9ed8e3771e60556afe80282bf58"
8+
"6.20.3":
9+
url: "https://github.com/facebook/rocksdb/archive/refs/tags/v6.20.3.tar.gz"
10+
sha256: "c6502c7aae641b7e20fafa6c2b92273d935d2b7b2707135ebd9a67b092169dca"
11+
"8.8.1":
12+
url: "https://github.com/facebook/rocksdb/archive/refs/tags/v8.8.1.tar.gz"
13+
sha256: "056c7e21ad8ae36b026ac3b94b9d6e0fcc60e1d937fc80330921e4181be5c36e"
14+
patches:
15+
"6.29.5":
16+
- patch_file: "patches/6.29.5-0001-add-include-cstdint-for-gcc-13.patch"
17+
patch_description: "Fix build with gcc 13 by including cstdint"
18+
patch_type: "portability"
19+
patch_source: "https://github.com/facebook/rocksdb/pull/11118"
20+
- patch_file: "patches/6.29.5-0002-exclude-thirdparty.patch"
21+
patch_description: "Do not include thirdparty.inc"
22+
patch_type: "portability"
23+
"6.27.3":
24+
- patch_file: "patches/6.27.3-0001-add-include-cstdint-for-gcc-13.patch"
25+
patch_description: "Fix build with gcc 13 by including cstdint"
26+
patch_type: "portability"
27+
patch_source: "https://github.com/facebook/rocksdb/pull/11118"

0 commit comments

Comments
 (0)