docker: Build rocksdb native for release-max-perf.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
14
.github/workflows/main.yml
vendored
14
.github/workflows/main.yml
vendored
@@ -55,6 +55,7 @@ jobs:
|
|||||||
sys_targets: ${{needs.init.outputs.sys_targets}}
|
sys_targets: ${{needs.init.outputs.sys_targets}}
|
||||||
sys_versions: ${{needs.init.outputs.sys_versions}}
|
sys_versions: ${{needs.init.outputs.sys_versions}}
|
||||||
machines: ${{needs.init.outputs.machines}}
|
machines: ${{needs.init.outputs.machines}}
|
||||||
|
excludes: '[{"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}, {"cargo_profile": "release-max-perf", "rust_toolchain": "stable"}, {"cargo_profile": "release-max-perf", "feat_set": "none"}]'
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
@@ -70,7 +71,7 @@ jobs:
|
|||||||
sys_targets: ${{needs.init.outputs.sys_targets}}
|
sys_targets: ${{needs.init.outputs.sys_targets}}
|
||||||
sys_versions: ${{needs.init.outputs.sys_versions}}
|
sys_versions: ${{needs.init.outputs.sys_versions}}
|
||||||
machines: ${{needs.init.outputs.machines}}
|
machines: ${{needs.init.outputs.machines}}
|
||||||
excludes: '[{"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}]'
|
excludes: '[{"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}, {"cargo_profile": "release-max-perf", "rust_toolchain": "stable"}, {"cargo_profile": "release-max-perf", "feat_set": "none"}]'
|
||||||
|
|
||||||
test:
|
test:
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
@@ -87,6 +88,7 @@ jobs:
|
|||||||
sys_versions: ${{needs.init.outputs.sys_versions}}
|
sys_versions: ${{needs.init.outputs.sys_versions}}
|
||||||
machines: ${{needs.init.outputs.machines}}
|
machines: ${{needs.init.outputs.machines}}
|
||||||
complement: ${{fromJSON(vars.COMPLEMENT || 'true')}}
|
complement: ${{fromJSON(vars.COMPLEMENT || 'true')}}
|
||||||
|
excludes: '[{"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}, {"cargo_profile": "release-max-perf", "rust_toolchain": "stable"}, {"cargo_profile": "release-max-perf", "feat_set": "none"}]'
|
||||||
|
|
||||||
package:
|
package:
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() }}
|
||||||
@@ -96,29 +98,29 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
cargo_profiles: ${{needs.init.outputs.cargo_profiles}}
|
cargo_profiles: ${{needs.init.outputs.cargo_profiles}}
|
||||||
feat_sets: ${{needs.init.outputs.feat_sets}}
|
feat_sets: ${{needs.init.outputs.feat_sets}}
|
||||||
rust_toolchains: '["stable"]'
|
rust_toolchains: ${{needs.init.outputs.rust_toolchains}}
|
||||||
rust_targets: ${{needs.init.outputs.rust_targets}}
|
rust_targets: ${{needs.init.outputs.rust_targets}}
|
||||||
sys_names: ${{needs.init.outputs.sys_names}}
|
sys_names: ${{needs.init.outputs.sys_names}}
|
||||||
sys_targets: ${{needs.init.outputs.sys_targets}}
|
sys_targets: ${{needs.init.outputs.sys_targets}}
|
||||||
sys_versions: ${{needs.init.outputs.sys_versions}}
|
sys_versions: ${{needs.init.outputs.sys_versions}}
|
||||||
machines: ${{needs.init.outputs.machines}}
|
machines: ${{needs.init.outputs.machines}}
|
||||||
excludes: '[{"cargo_profile": "test"}, {"feat_set": "none"}]'
|
excludes: '[{"cargo_profile": "test"}, {"feat_set": "none"}, {"cargo_profile": "release-max-perf", "rust_toolchain": "stable"}]'
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
if: ${{ !failure() && !cancelled() }}
|
if: ${{ !failure() && !cancelled() && github.ref == 'refs/heads/main' }}
|
||||||
name: Publish
|
name: Publish
|
||||||
needs: [init, test, package]
|
needs: [init, test, package]
|
||||||
uses: ./.github/workflows/publish.yml
|
uses: ./.github/workflows/publish.yml
|
||||||
with:
|
with:
|
||||||
cargo_profiles: ${{needs.init.outputs.cargo_profiles}}
|
cargo_profiles: ${{needs.init.outputs.cargo_profiles}}
|
||||||
feat_sets: ${{needs.init.outputs.feat_sets}}
|
feat_sets: ${{needs.init.outputs.feat_sets}}
|
||||||
rust_toolchains: '["stable"]'
|
rust_toolchains: ${{needs.init.outputs.rust_toolchains}}
|
||||||
rust_targets: ${{needs.init.outputs.rust_targets}}
|
rust_targets: ${{needs.init.outputs.rust_targets}}
|
||||||
sys_names: ${{needs.init.outputs.sys_names}}
|
sys_names: ${{needs.init.outputs.sys_names}}
|
||||||
sys_targets: ${{needs.init.outputs.sys_targets}}
|
sys_targets: ${{needs.init.outputs.sys_targets}}
|
||||||
sys_versions: ${{needs.init.outputs.sys_versions}}
|
sys_versions: ${{needs.init.outputs.sys_versions}}
|
||||||
machines: ${{needs.init.outputs.machines}}
|
machines: ${{needs.init.outputs.machines}}
|
||||||
excludes: '[{"cargo_profile": "test"}, {"feat_set": "none"}]'
|
excludes: '[{"cargo_profile": "test"}, {"feat_set": "none"}, {"rust_toolchain": "nightly", "cargo_profile": "release"}, {"cargo_profile": "release-max-perf"}]'
|
||||||
docker_repo: ${{vars.DOCKER_REPO}}
|
docker_repo: ${{vars.DOCKER_REPO}}
|
||||||
|
|
||||||
secrets:
|
secrets:
|
||||||
|
|||||||
8
.github/workflows/package.yml
vendored
8
.github/workflows/package.yml
vendored
@@ -39,14 +39,14 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deb:
|
deb:
|
||||||
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0]) }}
|
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0]) }}
|
||||||
name: Deb
|
name: Deb
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
bake_targets: '["pkg-deb"]'
|
bake_targets: '["pkg-deb"]'
|
||||||
cargo_profiles: '["release"]'
|
cargo_profiles: '["release"]'
|
||||||
feat_sets: '["all"]'
|
feat_sets: '["all"]'
|
||||||
rust_toolchains: ${{inputs.rust_toolchains}}
|
rust_toolchains: '["stable"]'
|
||||||
sys_names: ${{inputs.sys_names}}
|
sys_names: ${{inputs.sys_names}}
|
||||||
sys_versions: ${{inputs.sys_versions}}
|
sys_versions: ${{inputs.sys_versions}}
|
||||||
rust_targets: ${{inputs.rust_targets}}
|
rust_targets: ${{inputs.rust_targets}}
|
||||||
@@ -56,14 +56,14 @@ jobs:
|
|||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
rpm:
|
rpm:
|
||||||
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0]) }}
|
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) && contains(fromJSON(inputs.cargo_profiles), fromJSON('["release"]')[0]) && contains(fromJSON(inputs.rust_toolchains), fromJSON('["stable"]')[0]) }}
|
||||||
name: RPM
|
name: RPM
|
||||||
uses: ./.github/workflows/bake.yml
|
uses: ./.github/workflows/bake.yml
|
||||||
with:
|
with:
|
||||||
bake_targets: '["pkg-rpm"]'
|
bake_targets: '["pkg-rpm"]'
|
||||||
cargo_profiles: '["release"]'
|
cargo_profiles: '["release"]'
|
||||||
feat_sets: '["all"]'
|
feat_sets: '["all"]'
|
||||||
rust_toolchains: ${{inputs.rust_toolchains}}
|
rust_toolchains: '["stable"]'
|
||||||
sys_names: ${{inputs.sys_names}}
|
sys_names: ${{inputs.sys_names}}
|
||||||
sys_versions: ${{inputs.sys_versions}}
|
sys_versions: ${{inputs.sys_versions}}
|
||||||
rust_targets: ${{inputs.rust_targets}}
|
rust_targets: ${{inputs.rust_targets}}
|
||||||
|
|||||||
3
.github/workflows/publish.yml
vendored
3
.github/workflows/publish.yml
vendored
@@ -102,6 +102,7 @@ jobs:
|
|||||||
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) }}
|
if: ${{ !failure() && !cancelled() && contains(fromJSON(inputs.feat_sets), fromJSON('["all"]')[0]) }}
|
||||||
name: Publish packages
|
name: Publish packages
|
||||||
runs-on: ${{matrix.machine}}
|
runs-on: ${{matrix.machine}}
|
||||||
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -130,5 +131,5 @@ jobs:
|
|||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{matrix.target[1]}}
|
name: ${{matrix.target[1]}}-${{matrix.cargo_profile}}
|
||||||
path: ${{matrix.target[1]}}
|
path: ${{matrix.target[1]}}
|
||||||
|
|||||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -73,7 +73,7 @@ jobs:
|
|||||||
rust_targets: ${{inputs.rust_targets}}
|
rust_targets: ${{inputs.rust_targets}}
|
||||||
sys_targets: ${{inputs.sys_targets}}
|
sys_targets: ${{inputs.sys_targets}}
|
||||||
machines: ${{inputs.machines}}
|
machines: ${{inputs.machines}}
|
||||||
excludes: '[{"cargo_profile": "release", "rust_toolchain": "nightly"}, {"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}, {"cargo_profile": "test", "feat_set": "default"}]'
|
excludes: '[{"cargo_profile": "release", "rust_toolchain": "nightly"}, {"cargo_profile": "release-debuginfo", "rust_toolchain": "nightly"}, {"cargo_profile": "test", "feat_set": "default"}, {"cargo_profile": "release-max-perf", "rust_toolchain": "stable"}, {"cargo_profile": "release-max-perf", "feat_set": "none"}]'
|
||||||
includes: ${{inputs.includes}}
|
includes: ${{inputs.includes}}
|
||||||
|
|
||||||
complement:
|
complement:
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ ENV CXX="clang++"
|
|||||||
WORKDIR /usr/src/rocksdb/librocksdb-sys/rocksdb
|
WORKDIR /usr/src/rocksdb/librocksdb-sys/rocksdb
|
||||||
ENV nprocs=${nprocs}
|
ENV nprocs=${nprocs}
|
||||||
RUN \
|
RUN \
|
||||||
--mount=type=cache,dst=/var/lock/uwu/${rocksdb_jemalloc}/${rocksdb_iouring},sharing=locked \
|
--mount=type=cache,dst=/var/lock/uwu/${rocksdb_jemalloc}/${rocksdb_iouring}/${rocksdb_portable},sharing=locked \
|
||||||
<<EOF
|
<<EOF
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
|
|||||||
@@ -1108,7 +1108,7 @@ target "deps-base" {
|
|||||||
contexts = {
|
contexts = {
|
||||||
input = elem("target:ingredients", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
input = elem("target:ingredients", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
recipe = elem("target:recipe", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
recipe = elem("target:recipe", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
rocksdb = elem("target:rocksdb", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
rocksdb = elem("target:rocksdb", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
}
|
}
|
||||||
args = {
|
args = {
|
||||||
cargo_profile = cargo_profile
|
cargo_profile = cargo_profile
|
||||||
@@ -1133,28 +1133,28 @@ target "deps-base" {
|
|||||||
#
|
#
|
||||||
|
|
||||||
target "rocksdb" {
|
target "rocksdb" {
|
||||||
name = elem("rocksdb", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
name = elem("rocksdb", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
tags = [
|
tags = [
|
||||||
elem_tag("rocksdb", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest"),
|
elem_tag("rocksdb", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest"),
|
||||||
]
|
]
|
||||||
target = "rocksdb"
|
target = "rocksdb"
|
||||||
output = ["type=cacheonly,compression=zstd,mode=min"]
|
output = ["type=cacheonly,compression=zstd,mode=min"]
|
||||||
matrix = rust_feat_sys
|
matrix = cargo_rust_feat_sys
|
||||||
inherits = [
|
inherits = [
|
||||||
elem("rocksdb-build", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
elem("rocksdb-build", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
]
|
]
|
||||||
contexts = {
|
contexts = {
|
||||||
input = elem("target:rocksdb-build", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
input = elem("target:rocksdb-build", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target "rocksdb-build" {
|
target "rocksdb-build" {
|
||||||
name = elem("rocksdb-build", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
name = elem("rocksdb-build", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
tags = [
|
tags = [
|
||||||
elem_tag("rocksdb-build", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest")
|
elem_tag("rocksdb-build", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest")
|
||||||
]
|
]
|
||||||
target = "rocksdb-build"
|
target = "rocksdb-build"
|
||||||
matrix = rust_feat_sys
|
matrix = cargo_rust_feat_sys
|
||||||
inherits = [
|
inherits = [
|
||||||
elem("rocksdb-fetch", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
elem("rocksdb-fetch", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
]
|
]
|
||||||
@@ -1162,12 +1162,12 @@ target "rocksdb-build" {
|
|||||||
input = elem("target:rocksdb-fetch", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
input = elem("target:rocksdb-fetch", [rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target])
|
||||||
}
|
}
|
||||||
args = {
|
args = {
|
||||||
rocksdb_zstd = contains(split(",", cargo_feat_sets[feat_set]), "zstd_compression")? 1: 0,
|
rocksdb_zstd = contains(split(",", cargo_feat_sets[feat_set]), "zstd_compression")? 1: 0
|
||||||
rocksdb_jemalloc = contains(split(",", cargo_feat_sets[feat_set]), "jemalloc")? 1: 0,
|
rocksdb_jemalloc = contains(split(",", cargo_feat_sets[feat_set]), "jemalloc")? 1: 0
|
||||||
rocksdb_iouring = contains(split(",", cargo_feat_sets[feat_set]), "io_uring")? 1: 0,
|
rocksdb_iouring = contains(split(",", cargo_feat_sets[feat_set]), "io_uring")? 1: 0
|
||||||
|
rocksdb_portable = cargo_profile == "release_max_perf"? 0: rocksdb_portable
|
||||||
rocksdb_build_type = rocksdb_build_type
|
rocksdb_build_type = rocksdb_build_type
|
||||||
rocksdb_opt_level = rocksdb_opt_level
|
rocksdb_opt_level = rocksdb_opt_level
|
||||||
rocksdb_portable = rocksdb_portable
|
|
||||||
rocksdb_shared = 0
|
rocksdb_shared = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user