Skip to content

Commit

Permalink
Merge branch 'main' of github.com:facebookincubator/velox into circle…
Browse files Browse the repository at this point in the history
…ci-add-cuda
  • Loading branch information
luhenry committed Mar 7, 2024
2 parents dbfc5a4 + 6f189b0 commit 33235e5
Show file tree
Hide file tree
Showing 543 changed files with 21,493 additions and 25,455 deletions.
53 changes: 0 additions & 53 deletions .circleci/dist_compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,12 +299,6 @@ jobs:
DuckDB_SOURCE: SYSTEM
steps:
- pre-steps
- run:
name: "Install Adapter Dependencies"
command: |
source /opt/rh/gcc-toolset-9/enable
set -xu
PROMPT_ALWAYS_RESPOND=n ./scripts/setup-adapters.sh abfs
- run:
name: "Install Java for Hadoop"
command: |
Expand Down Expand Up @@ -431,43 +425,6 @@ jobs:
fuzzer_exe: "_build/debug/velox/exec/tests/velox_join_fuzzer_test"
fuzzer_args: " --seed ${RANDOM} --duration_sec 3600 --logtostderr=1 --minloglevel=0"

doc-gen-job:
executor: build
steps:
- checkout
- update-submodules
- add_ssh_keys:
fingerprints:
- "7b:24:f3:1a:b1:15:97:c6:fe:06:46:27:3e:b7:6b:96"
- run:
name: "Build docs and update gh-pages"
command: |
for i in {1..3}; do
make clean
git config --global user.email "[email protected]"
git config --global user.name "velox"
git checkout main
conda init bash
source ~/.bashrc
conda create -y --name docgenenv python=3.7
conda activate docgenenv
pip install sphinx sphinx-tabs breathe sphinx_rtd_theme chardet
source /opt/rh/gcc-toolset-9/enable
./scripts/gen-docs.sh docgenenv
git checkout gh-pages
cp -R velox/docs/_build/html/* docs
git add docs
if [ -n "$(git status --porcelain --untracked-files=no)" ]
then
git commit -m "Update documentation"
git push
if [ $? -eq 0 ]; then
break;
fi
fi
done
linux-pr-fuzzer-run:
executor: build
steps:
Expand Down Expand Up @@ -572,11 +529,6 @@ workflows:
- linux-build-options
- linux-adapters
- linux-presto-fuzzer-run
- doc-gen-job:
filters:
branches:
only:
- main

shorter-fuzzer:
unless: << pipeline.parameters.run-longer-expression-fuzzer >>
Expand All @@ -585,8 +537,3 @@ workflows:
- linux-pr-fuzzer-run
- linux-build-options
- linux-adapters
- doc-gen-job:
filters:
branches:
only:
- main
9 changes: 7 additions & 2 deletions velox/experimental/codegen/proto/protobuf.sh → .github/dependabot.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,4 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"${PROTOC}" "${PROTO_FILE}" "--${LANG}_out=$INSTALL_DIR"
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ concurrency:
defaults:
run:
shell: bash
#TODO concurrency groups?

jobs:
benchmark:
if: github.repository == 'facebookincubator/velox'
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
echo "::endgroup::"

- name: "Save PR number"
run: echo "${{ github.event.pull_request.number }}" > pr_number.txt
run: echo "${{ github.event.pull_request.number || 0 }}" > pr_number.txt

- name: "Upload PR number"
uses: actions/upload-artifact@v3
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/conbench_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,18 @@ jobs:
run: |
unzip benchmark-results.zip -d benchmark-results
unzip pr_number.zip
echo "pr_number=$(cat pr_number.txt)" >> $GITHUB_OUTPUT
pr_number=$(grep -ox '[[:digit:]]*' pr_number.txt | head -1)
if [ "$pr_number" -ge 0 ]; then
echo "Found PR number: $pr_number"
else
echo '::error :: Malformed input, aborting!'
exit 1
fi
echo "pr_number=$pr_number" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
with:
path: velox
Expand Down Expand Up @@ -134,7 +145,7 @@ jobs:

- name: "Create a GitHub Status on the contender commit (whether the upload was successful)"
uses: actions/github-script@v6
if: always()
if: ${{ !cancelled() && steps.extract.conclusion != 'failure' }}
with:
script: |
let url = 'https://github.com/${{github.repository}}/actions/runs/${{ github.run_id }}'
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Update Documentation

on:
push:
paths:
- "velox/docs/**"
- ".github/workflows/docs.yml"

pull_request:
paths:
- "velox/docs/**"
- ".github/workflows/docs.yml"

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
build_docs:
name: Build and Push
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Setup Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "velox"
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y pandoc
pip install sphinx sphinx-tabs breathe sphinx_rtd_theme chardet
- name: Build Documentation
run: |
cd velox/docs
make clean
# pyvelox
mkdir -p bindings/python
pandoc ../../pyvelox/README.md --from markdown --to rst -s -o bindings/python/README_generated_pyvelox.rst
# velox
make html
- name: Push Documentation
if: ${{ github.event_name == 'push' && github.repository == 'facebookincubator/velox'}}
run: |
git checkout gh-pages
cp -R velox/docs/_build/html/* docs
git add docs
if [ -n "$(git status --porcelain --untracked-files=no)" ]
then
git commit -m "Update documentation"
git push
fi
- name: Upload Documentation
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
path: velox/docs/_build/html
retention-days: 3
2 changes: 2 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
with:
submodules: recursive
- name: Install Dependencies
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "TRUE"
run: |
brew install \
bison boost ccache double-conversion flex fmt gflags glog \
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
pull_request:
paths:
- ".github/workflows/scheduled.yml"
- scripts/*

schedule:
- cron: '0 3 * * *'
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: cd velox && source ./scripts/setup-ubuntu.sh
run: cd velox && sudo ./scripts/setup-ubuntu.sh

- name: "Build"
run: |
Expand Down Expand Up @@ -125,7 +126,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download presto fuzzer
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -173,7 +174,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download spark expression fuzzer
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -247,7 +248,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download aggregation fuzzer
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -288,7 +289,7 @@ jobs:
ref: "${{ inputs.ref || 'main' }}"

- name: "Install dependencies"
run: source ./scripts/setup-ubuntu.sh
run: sudo ./scripts/setup-ubuntu.sh

- name: Download join fuzzer
uses: actions/download-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions CMake/resolve_dependency_modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ by Velox. See details on bundling below.
| xsimd | 10.0.0 | Yes |
| re2 | 2021-04-01 | Yes |
| fmt | 10.1.1 | Yes |
| simdjson | 3.2.0 | Yes |
| folly | v2023.12.04.00 | Yes |
| fizz | v2023.12.04.00 | No |
| wangle | v2023.12.04.00 | No |
Expand Down
7 changes: 2 additions & 5 deletions CMake/resolve_dependency_modules/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ add_compile_options(-w)
# We need to use boost > 1.70 to build it with CMake 1.81 was the first to be
# released as a github release INCLUDING the cmake files (which are not in the
# officale releases for some reason)
set(VELOX_BOOST_BUILD_VERSION 1.81.0)
set(VELOX_BOOST_BUILD_VERSION 1.84.0)
string(
CONCAT VELOX_BOOST_SOURCE_URL
"https://github.com/boostorg/boost/releases/download/"
"boost-${VELOX_BOOST_BUILD_VERSION}/"
"boost-${VELOX_BOOST_BUILD_VERSION}.tar.gz")
set(VELOX_BOOST_BUILD_SHA256_CHECKSUM
121da556b718fd7bd700b5f2e734f8004f1cfa78b7d30145471c526ba75a151c)
4d27e9efed0f6f152dc28db6430b9d3dfb40c0345da7342eaa5a987dde57bd95)

resolve_dependency_url(BOOST)
message(STATUS "Building boost from source")
Expand Down Expand Up @@ -65,8 +65,5 @@ list(REMOVE_ITEM BOOST_INCLUDE_LIBRARIES headers)
set(BUILD_SHARED_LIBS ON)
FetchContent_MakeAvailable(Boost)

# To aling with Boost system install we create Boost::headers target
add_library(boost_headers INTERFACE)
add_library(Boost::headers ALIAS boost_headers)
list(TRANSFORM BOOST_HEADER_ONLY PREPEND Boost::)
target_link_libraries(boost_headers INTERFACE ${BOOST_HEADER_ONLY})
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ if(${VELOX_BUILD_PYTHON_PACKAGE})
endif()

set_source(simdjson)
resolve_dependency(simdjson)
resolve_dependency(simdjson 3.2.0)

# Locate or build folly.
add_compile_definitions(FOLLY_HAVE_INT128_T=1)
Expand Down
9 changes: 6 additions & 3 deletions scripts/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,12 @@ def get_files(commit, path):
)
filelist = stdout.splitlines()
else:
for root, dirs, files in os.walk(path):
for name in files:
filelist.append(os.path.join(root, name))
if os.path.isfile(path):
filelist.append(path)
else:
for root, dirs, files in os.walk(path):
for name in files:
filelist.append(os.path.join(root, name))

return [
file
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-centos8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function install_lzo {
}

function install_boost {
wget_and_untar https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.gz boost
wget_and_untar https://github.com/boostorg/boost/releases/download/boost-1.84.0/boost-1.84.0.tar.gz boost
(
cd boost
./bootstrap.sh --prefix=/usr/local
Expand Down
3 changes: 2 additions & 1 deletion scripts/setup-helper-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ function cmake_install {
mkdir -p "${BINARY_DIR}"
CPU_TARGET="${CPU_TARGET:-unknown}"
COMPILER_FLAGS=$(get_cxx_flags $CPU_TARGET)
SUDO="${SUDO:-""}"

# CMAKE_POSITION_INDEPENDENT_CODE is required so that Velox can be built into dynamic libraries \
cmake -Wno-dev -B"${BINARY_DIR}" \
Expand All @@ -169,6 +170,6 @@ function cmake_install {
-DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" \
-DBUILD_TESTING=OFF \
"$@"
ninja -C "${BINARY_DIR}" install
${SUDO} ninja -C "${BINARY_DIR}" install
}

Loading

0 comments on commit 33235e5

Please sign in to comment.