Skip to content

Commit

Permalink
Add remaining headers and CI job to check for it
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroerp committed Apr 20, 2024
1 parent 5ffb367 commit f589b39
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/sanity_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
fail-fast: false
matrix:
config:
- { name: "License Header",
command: "header-fix",
message: "Found missing License Header(s)",
reqs: "regex"
}
- { name: "Code Format",
command: "format-fix",
message: "Found format issues",
Expand Down
28 changes: 19 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
cmake_minimum_required(VERSION 3.14)

# Set the project name.
Expand All @@ -20,17 +33,14 @@ list(PREPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMake"
include(ResolveDependency)

set(VELOX_BUILD_MINIMAL_WITH_DWIO
ON CACHE BOOL
"Velox minimal build with dwio.")
ON
CACHE BOOL "Velox minimal build with dwio.")
set(VELOX_BUILD_VECTOR_TEST_UTILS
ON CACHE BOOL
"Velox vector test utilities (VectorMaker).")
ON
CACHE BOOL "Velox vector test utilities (VectorMaker).")
set(VELOX_DEPENDENCY_SOURCE
AUTO
CACHE
STRING
"Default dependency source: AUTO SYSTEM or BUNDLED."
)
AUTO
CACHE STRING "Default dependency source: AUTO SYSTEM or BUNDLED.")

message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")

Expand Down
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
.PHONY: all cmake build clean debug release unit submodules

BUILD_BASE_DIR=_build
Expand Down
13 changes: 13 additions & 0 deletions dwio/nimble/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_subdirectory(tests)

add_library(
Expand Down
13 changes: 13 additions & 0 deletions dwio/nimble/common/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_library(nimble_common_file_writer NimbleFileWriter.cpp)

target_link_libraries(nimble_common_file_writer nimble_common
Expand Down
13 changes: 13 additions & 0 deletions dwio/nimble/encodings/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_subdirectory(tests)

add_library(
Expand Down
13 changes: 13 additions & 0 deletions dwio/nimble/encodings/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_executable(
nimble_encodings_tests
ConstantEncodingTests.cpp
Expand Down
18 changes: 15 additions & 3 deletions dwio/nimble/tablet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_subdirectory(tests)

# Nimble code expects an upper case suffix to the generated file.
Expand All @@ -13,9 +26,8 @@ build_flatbuffers(
""
"")
add_library(nimble_footer_fb INTERFACE)
target_include_directories(
nimble_footer_fb
INTERFACE ${FLATBUFFERS_INCLUDE_DIR})
target_include_directories(nimble_footer_fb
INTERFACE ${FLATBUFFERS_INCLUDE_DIR})
add_dependencies(nimble_footer_fb nimble_footer_schema_fb)

add_library(nimble_tablet Compression.cpp StreamInput.cpp Tablet.cpp)
Expand Down
13 changes: 13 additions & 0 deletions dwio/nimble/tablet/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_executable(nimble_tablet_tests TabletTests.cpp)

add_test(nimble_tablet_tests nimble_tablet_tests)
Expand Down
13 changes: 13 additions & 0 deletions dwio/nimble/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_library(nimble_tools_common EncodingUtilities.cpp)

target_link_libraries(nimble_tools_common nimble_common nimble_tablet)
17 changes: 15 additions & 2 deletions dwio/nimble/velox/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_subdirectory(tests)

add_library(nimble_velox_common SchemaUtils.cpp)
Expand Down Expand Up @@ -80,7 +93,7 @@ target_link_libraries(nimble_velox_serializer nimble_common
nimble_velox_schema_builder velox_vector)

add_library(nimble_velox_reader StreamInputDecoder.cpp StreamLabels.cpp
VeloxReader.cpp)
VeloxReader.cpp)
target_link_libraries(
nimble_velox_reader
nimble_velox_schema
Expand All @@ -92,6 +105,6 @@ target_link_libraries(

add_library(
nimble_velox_writer EncodingLayoutTree.cpp FlushPolicy.cpp VeloxWriter.cpp
VeloxWriterDefaultMetadataOSS.cpp)
VeloxWriterDefaultMetadataOSS.cpp)
target_link_libraries(nimble_velox_writer nimble_encodings nimble_common
nimble_velox_metadata_fb Folly::folly)
13 changes: 13 additions & 0 deletions dwio/nimble/velox/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright (c) Meta Platforms, 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.
add_library(nimble_velox_schema_utils SchemaUtils.cpp)
target_link_libraries(
nimble_velox_schema_utils nimble_velox_schema_fb nimble_velox_schema_builder
Expand Down
15 changes: 15 additions & 0 deletions dwio/nimble/velox/tests/SchemaTests.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright (c) Meta Platforms, 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.
*/
#include <gtest/gtest.h>
#include <optional>

Expand Down

0 comments on commit f589b39

Please sign in to comment.