Skip to content

Commit 710f699

Browse files
kgpaifacebook-github-bot
authored andcommitted
feat: Add fedora runs to CI (facebookincubator#14575)
Summary: This PR adds a fedora build to our default set of linux builds. This should ensure that we continue to build and work on Fedora in the future. Differential Revision: D81728281 Pulled By: kgpai
1 parent 7317117 commit 710f699

File tree

7 files changed

+102
-9
lines changed

7 files changed

+102
-9
lines changed

.github/workflows/linux-build-base.yml

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
env:
3737
CCACHE_DIR: ${{ github.workspace }}/ccache
3838
VELOX_DEPENDENCY_SOURCE: SYSTEM
39-
GTest_SOURCE: BUNDLED
4039
cudf_SOURCE: BUNDLED
4140
CUDA_VERSION: '12.8'
4241
faiss_SOURCE: BUNDLED
@@ -206,3 +205,62 @@ jobs:
206205
- name: Run Tests
207206
run: |
208207
cd _build/debug && ctest -j 8 --output-on-failure --no-tests=error
208+
209+
fedora-debug:
210+
runs-on: 8-core-ubuntu-22.04
211+
container: ghcr.io/facebookincubator/velox-dev:fedora
212+
# prevent errors when forks ff their main branch
213+
if: ${{ github.repository == 'facebookincubator/velox' }}
214+
name: Fedora debug
215+
env:
216+
CCACHE_DIR: ${{ github.workspace }}/ccache
217+
defaults:
218+
run:
219+
shell: bash
220+
working-directory: velox
221+
steps:
222+
- name: Get Ccache Stash
223+
uses: apache/infrastructure-actions/stash/restore@3354c1565d4b0e335b78a76aedd82153a9e144d4
224+
with:
225+
path: ${{ env.CCACHE_DIR }}
226+
key: ccache-fedora-debug-default-gcc
227+
228+
- name: Ensure Stash Dirs Exists
229+
working-directory: ${{ github.workspace }}
230+
run: |
231+
mkdir -p "$CCACHE_DIR"
232+
233+
- uses: actions/checkout@v4
234+
with:
235+
path: velox
236+
persist-credentials: false
237+
238+
- name: Clear CCache Statistics
239+
run: |
240+
ccache -sz
241+
242+
- name: Make Debug Build
243+
env:
244+
VELOX_DEPENDENCY_SOURCE: SYSTEM
245+
faiss_SOURCE: BUNDLED
246+
fmt_SOURCE: BUNDLED
247+
gRPC_SOURCE: SYSTEM
248+
MAKEFLAGS: NUM_THREADS=8 MAX_HIGH_MEM_JOBS=4 MAX_LINK_JOBS=3
249+
EXTRA_CMAKE_FLAGS: >-
250+
-DVELOX_ENABLE_PARQUET=ON
251+
-DARROW_THRIFT_USE_SHARED=ON
252+
-DVELOX_ENABLE_EXAMPLES=ON
253+
run: |
254+
uv tool install --force cmake@3.31.1
255+
dnf install -y -q --setopt=install_weak_deps=False grpc-devel grpc-plugins
256+
export EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS} -DVELOX_ENABLE_FAISS=ON"
257+
make debug
258+
259+
- name: CCache after
260+
run: |
261+
ccache -vs
262+
263+
- uses: apache/infrastructure-actions/stash/save@3354c1565d4b0e335b78a76aedd82153a9e144d4
264+
with:
265+
path: ${{ env.CCACHE_DIR }}
266+
key: ccache-fedora-debug-default-gcc

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,8 @@ if(ENABLE_ALL_WARNINGS)
445445
endif()
446446
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "14.0.0")
447447
string(APPEND KNOWN_COMPILER_SPECIFIC_WARNINGS " -Wno-error=template-id-cdtor")
448-
string(APPEND KNOWN_COMPILER_SPECIFIC_WARNINGS " -Wno-error=overloaded-virtual")
448+
string(APPEND KNOWN_COMPILER_SPECIFIC_WARNINGS " -Wno-overloaded-virtual")
449+
string(APPEND KNOWN_COMPILER_SPECIFIC_WARNINGS " -Wno-error=tautological-compare")
449450
endif()
450451
endif()
451452

scripts/setup-centos9.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ function install_build_prerequisites {
6060
ninja-build python3-pip python3-devel wget which
6161

6262
install_uv
63-
uv_install cmake
63+
uv_install cmake@3.31.1
6464

6565
if [[ ${USE_CLANG} != "false" ]]; then
6666
install_clang15

scripts/setup-fedora.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,35 @@ function install_build_prerequisites {
5555
fi
5656
}
5757

58+
function install_velox_deps_from_dnf {
59+
dnf_install \
60+
bison boost-devel c-ares-devel curl-devel double-conversion-devel \
61+
elfutils-libelf-devel flex fmt-devel gflags-devel glog-devel gmock-devel \
62+
gtest-devel libdwarf-devel libevent-devel libicu-devel \
63+
libsodium-devel libzstd-devel lz4-devel openssl-devel-engine \
64+
re2-devel snappy-devel thrift-devel xxhash-devel zlib-devel grpc-devel grpc-plugins
65+
66+
install_faiss_deps
67+
}
68+
69+
function install_velox_deps {
70+
run_and_time install_velox_deps_from_dnf
71+
run_and_time install_gcs-sdk-cpp #grpc, abseil, protobuf
72+
run_and_time install_fast_float
73+
run_and_time install_folly
74+
run_and_time install_fizz
75+
run_and_time install_wangle
76+
run_and_time install_mvfst
77+
run_and_time install_fbthrift
78+
run_and_time install_duckdb
79+
run_and_time install_stemmer
80+
run_and_time install_arrow
81+
run_and_time install_xsimd # to new in fedora repos
82+
run_and_time install_simdjson # to new in fedora repos
83+
run_and_time install_geos # to new in fedora repos
84+
run_and_time install_faiss
85+
}
86+
5887
(return 2>/dev/null) && return # If script was sourced, don't run commands.
5988

6089
(
@@ -90,6 +119,8 @@ function install_build_prerequisites {
90119
set -u
91120
fi
92121
install_velox_deps
122+
# BUILD_TESTING requires grpc
123+
dnf_install grpc
93124
echo "All dependencies for Velox installed!"
94125
if [[ ${USE_CLANG} != "false" ]]; then
95126
echo "To use clang for the Velox build set the CC and CXX environment variables in your session."

velox/connectors/tpcds/TpcdsConnectorSplit.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ template <>
5353
struct fmt::formatter<facebook::velox::connector::tpcds::TpcdsConnectorSplit>
5454
: formatter<std::string> {
5555
auto format(
56-
facebook::velox::connector::tpcds::TpcdsConnectorSplit s,
57-
format_context& ctx) {
56+
facebook::velox::connector::tpcds::TpcdsConnectorSplit const& s,
57+
format_context& ctx) const {
5858
return formatter<std::string>::format(s.toString(), ctx);
5959
}
6060
};
@@ -64,8 +64,9 @@ struct fmt::formatter<
6464
std::shared_ptr<facebook::velox::connector::tpcds::TpcdsConnectorSplit>>
6565
: formatter<std::string> {
6666
auto format(
67-
std::shared_ptr<facebook::velox::connector::tpcds::TpcdsConnectorSplit> s,
68-
format_context& ctx) {
67+
std::shared_ptr<
68+
facebook::velox::connector::tpcds::TpcdsConnectorSplit> const& s,
69+
format_context& ctx) const {
6970
return formatter<std::string>::format(s->toString(), ctx);
7071
}
7172
};

velox/exec/fuzzer/WriterFuzzer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "velox/exec/fuzzer/WriterFuzzer.h"
1717

1818
#include <boost/random/uniform_int_distribution.hpp>
19+
#include <fmt/ranges.h>
1920

2021
#include <re2/re2.h>
2122
#include <algorithm>

velox/functions/prestosql/fuzzer/NoisySumResultVerifier.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#pragma once
1818

19+
#include <boost/algorithm/string/join.hpp>
1920
#include <cstdint>
2021
#include <string>
2122
#include "velox/core/PlanNode.h"
@@ -239,8 +240,8 @@ class NoisySumResultVerifier : public ResultVerifier {
239240
// Build partition by clause for window function
240241
std::string partitionBy;
241242
if (!partitionKeys.empty()) {
242-
partitionBy =
243-
fmt::format("partition by {}", fmt::join(partitionKeys, ", "));
243+
partitionBy = fmt::format(
244+
"partition by {}", boost::algorithm::join(partitionKeys, ", "));
244245
}
245246

246247
// Use row_number() window function to identify first occurrence of each

0 commit comments

Comments
 (0)