Skip to content

Commit

Permalink
Merge branch 'main' into add_montblanc_led_manager_json
Browse files Browse the repository at this point in the history
  • Loading branch information
GoravGargCelestica authored Sep 18, 2024
2 parents 1f40d96 + 926d293 commit 6ca4c35
Show file tree
Hide file tree
Showing 333 changed files with 6,380 additions and 1,924 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ClangFormat Lint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
clang-format-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install clang-format
run: sudo apt-get install -y clang-format

- name: Get changed files
id: changed-files
run: |
if [ ${{ github.event_name }} == 'pull_request' ]; then
# For pull requests, compare against the base branch
echo "FILES=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -E '\.(cpp|h)$' | xargs)" >> $GITHUB_OUTPUT
else
# For pushes, compare against the parent commit
echo "FILES=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.before }} ${{ github.sha }} | grep -E '\.(cpp|h)$' | xargs)" >> $GITHUB_OUTPUT
fi
- name: Run clang-format
run: |
for file in ${{ steps.changed-files.outputs.FILES }}; do
clang-format -style=file -i "$file"
done
git diff --exit-code
- name: Suggest changes if formatting is incorrect
if: failure()
run: |
echo "::error::Formatting issues found. Please run clang-format on your changes and commit the results."
git diff
30 changes: 15 additions & 15 deletions buck2
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,62 @@
"name": "buck2",
"platforms": {
"macos-aarch64": {
"size": 23837292,
"size": 23905563,
"hash": "blake3",
"digest": "45d97541497dab8c939f1650ea7282f88ce031dcb98a4412809600b36bf9d2ac",
"digest": "2716aabc7e2b68a0eba8d68908f604321dbe19673b9ed2c6f659cda2d263fa3a",
"format": "zst",
"path": "buck2-aarch64-apple-darwin",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-aarch64-apple-darwin.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-aarch64-apple-darwin.zst"
}
]
},
"linux-aarch64": {
"size": 26010757,
"size": 26041556,
"hash": "blake3",
"digest": "05901b2db0e2fcaf4e5ff3b1cd2a7ce57aeeaf18e5c8b8c13f4743246cc51cfd",
"digest": "296ca8153596f29c73243a792bb235ed84bfd77a2d26c2f62eeecb1d272e3a90",
"format": "zst",
"path": "buck2-aarch64-unknown-linux-musl",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-aarch64-unknown-linux-musl.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-aarch64-unknown-linux-musl.zst"
}
]
},
"macos-x86_64": {
"size": 25454662,
"size": 25480555,
"hash": "blake3",
"digest": "1a734c77fa6ee124b9e872e44d48917eb0e8388373930b3c8f5a53059c04c157",
"digest": "cf529f35b88a4a05e3a727aac7fad0e1549fac154d0b7effdaa481f942b6087e",
"format": "zst",
"path": "buck2-x86_64-apple-darwin",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-x86_64-apple-darwin.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-x86_64-apple-darwin.zst"
}
]
},
"windows-x86_64": {
"size": 20924720,
"size": 20968937,
"hash": "blake3",
"digest": "903c00ce0095f5c423f141b9d1570f91edf2e6f045d41415409b5e4d5f973f05",
"digest": "7eab847191add144fdf9b979437a1d16bcf23659e7e70acbbf43ba02a901fa2e",
"format": "zst",
"path": "buck2-x86_64-pc-windows-msvc.exe",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-x86_64-pc-windows-msvc.exe.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-x86_64-pc-windows-msvc.exe.zst"
}
]
},
"linux-x86_64": {
"size": 26842328,
"size": 26879584,
"hash": "blake3",
"digest": "b11fbc26e598874b0bdfde263c1c34d18ac547cd1a4fcb1f9693807cf9ba86e3",
"digest": "c50374aa898839e93a89a881bd92687cd431bb8961c24a18c0b40c30705327b2",
"format": "zst",
"path": "buck2-x86_64-unknown-linux-musl",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-x86_64-unknown-linux-musl.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-x86_64-unknown-linux-musl.zst"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/fb303-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 495d843337a520d8ce089bba980d094e2794db6f
Subproject commit 456b5f6aead5a7b962dd03cac8e6a57e83157b01
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/fbthrift-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 0cb4447fca20691ee0c6fed8c75badb94c6cb0fc
Subproject commit f6a4c13e9f0b7f533bfbe3b406195b709495d677
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/folly-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 19254c4dd4e47c94364ebf78b12bcf69fdf28f16
Subproject commit 5bf165e94f530215b27b87a755dc4d27e5e2ce12
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/wangle-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit fbc1ef163736bd5cf47e68472e17b1ca8b8b4ee1
Subproject commit 9c04131911b53b3c336a13ca63eacd0548636f32
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebookincubator/fizz-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 9c60caec3bb99282affdebab2dfc0b4a89ea049f
Subproject commit 7215f1d7215ef80b298a0ac58cb421790a22c817
1 change: 1 addition & 0 deletions build/fbcode_builder/manifests/fizz
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ BUILD_TESTS = OFF

[dependencies]
folly
liboqs
libsodium
zlib
zstd
Expand Down
2 changes: 1 addition & 1 deletion build/fbcode_builder/manifests/libcurl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = libcurl

[rpms]
libcurl-devel
libcurl
libcurl-minimal

[debs]
libcurl4-openssl-dev
Expand Down
13 changes: 13 additions & 0 deletions build/fbcode_builder/manifests/liboqs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[manifest]
name = liboqs

[download]
url = https://github.com/open-quantum-safe/liboqs/archive/refs/tags/0.10.1.tar.gz
sha256 = 00ca8aba65cd8c8eac00ddf978f4cac9dd23bb039f357448b60b7e3eed8f02da

[build]
builder = cmake
subdir = liboqs-0.10.1

[dependencies]
openssl
30 changes: 22 additions & 8 deletions cmake/Agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ target_link_libraries(address_utils
Folly::folly
)

add_library(asic_utils
fboss/agent/AsicUtils.cpp
)

target_link_libraries(asic_utils
switch_asics
)

add_library(utils
fboss/agent/AlpmUtils.cpp
fboss/agent/LabelFibUtils.cpp
Expand All @@ -110,18 +118,18 @@ add_library(utils
)

target_link_libraries(utils
asic_utils
error
ctrl_cpp2
state
switchid_scope_resolver
Folly::folly
)

add_library(asic_utils
fboss/agent/AsicUtils.cpp
)

target_link_libraries(asic_utils
switch_asics
meru400biu_platform_mapping
meru400bia_platform_mapping
meru400bfu_platform_mapping
meru800bia_platform_mapping
meru800bfa_platform_mapping
janga800bic_platform_mapping
)

add_library(stats
Expand Down Expand Up @@ -294,6 +302,7 @@ set(core_libs
agent_fsdb_sync_manager
fboss_event_base
phy_snapshot_manager
build_info_wrapper
)

target_link_libraries(core ${core_libs})
Expand Down Expand Up @@ -354,6 +363,11 @@ target_link_libraries(fboss_error
Folly::folly
)

add_library(build_info_wrapper
fboss/agent/BuildInfoWrapper.h
fboss/agent/oss/BuildInfoWrapper.cpp
)

add_library(platform_base
fboss/agent/Platform.cpp
fboss/agent/PlatformPort.cpp
Expand Down
12 changes: 12 additions & 0 deletions cmake/AgentHwBenchmarks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -412,3 +412,15 @@ target_link_libraries(hw_voq_scale_route_del_speed
Folly::folly
Folly::follybenchmark
)

add_library(hw_switch_reachability_change_speed
fboss/agent/hw/benchmarks/HwSwitchReachabilityChangeBenchmark.cpp
)

target_link_libraries(hw_switch_reachability_change_speed
mono_agent_ensemble
mono_agent_benchmarks
config_factory
Folly::folly
Folly::follybenchmark
)
20 changes: 20 additions & 0 deletions cmake/AgentHwSaiBenchmarks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,23 @@ function(BUILD_SAI_BENCHMARKS SAI_IMPL_NAME SAI_IMPL_ARG)
-DSAI_VER_RELEASE=${SAI_VER_RELEASE}"
)

add_executable(sai_switch_reachability_change_speed-${SAI_IMPL_NAME} /dev/null)

target_link_libraries(sai_switch_reachability_change_speed-${SAI_IMPL_NAME}
-Wl,--whole-archive
hw_switch_reachability_change_speed
mono_sai_agent_benchmarks_main
${SAI_IMPL_ARG}
-Wl,--no-whole-archive
)

set_target_properties(sai_switch_reachability_change_speed-${SAI_IMPL_NAME}
PROPERTIES COMPILE_FLAGS
"-DSAI_VER_MAJOR=${SAI_VER_MAJOR} \
-DSAI_VER_MINOR=${SAI_VER_MINOR} \
-DSAI_VER_RELEASE=${SAI_VER_RELEASE}"
)

endfunction()

if(BUILD_SAI_FAKE AND BUILD_SAI_FAKE_BENCHMARKS)
Expand Down Expand Up @@ -546,4 +563,7 @@ if(SAI_IMPL AND BENCHMARK_INSTALL)
install(
TARGETS
sai_rib_resolution_speed-sai_impl)
install(
TARGETS
sai_switch_reachability_change_speed-sai_impl)
endif()
1 change: 1 addition & 0 deletions cmake/AgentHwSaiHwTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ add_library(agent_hw_test_thrift_handler
fboss/agent/hw/sai/hw_test/HwTestNeighborUtilsThriftHandler.cpp
fboss/agent/hw/sai/hw_test/HwTestEcmpUtilsThriftHandler.cpp
fboss/agent/hw/sai/hw_test/HwTestPortUtilsThriftHandler.cpp
fboss/agent/hw/sai/hw_test/HwTestVoqSwitchUtilsThriftHandler.cpp
)

target_link_libraries(agent_hw_test_thrift_handler
Expand Down
2 changes: 2 additions & 0 deletions cmake/AgentTestAgentHwTests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ add_library(agent_hw_test_src
fboss/agent/test/agent_hw_tests/AgentRxReasonTests.cpp
fboss/agent/test/agent_hw_tests/AgentRouteScaleTests.cpp
fboss/agent/test/agent_hw_tests/MultiNodeAgentVoqSwitchTests.cpp
fboss/agent/test/agent_hw_tests/AgentHwAclMatchActionsTest.cpp
)

target_link_libraries(agent_hw_test_src
Expand Down Expand Up @@ -95,6 +96,7 @@ target_link_libraries(agent_hw_test_src
pktutil
mirror_test_utils
voq_test_utils
fib_updater
)

add_executable(multi_switch_agent_hw_test
Expand Down
2 changes: 2 additions & 0 deletions cmake/CliFboss2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ add_fbthrift_cpp_library(
fboss/cli/fboss2/commands/show/transceiver/model.thrift
OPTIONS
json
DEPENDS
transceiver_cpp2
)

add_fbthrift_cpp_library(
Expand Down
4 changes: 4 additions & 0 deletions cmake/PlatformFanService.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ target_link_libraries(fan_service_lib
product_info
common_file_utils
platform_config_lib
platform_name_lib
platform_utils
fan_service_config_types_cpp2
gpiod_line
sensor_service_cpp2
fan_service_cpp2
Folly::folly
Expand Down Expand Up @@ -71,6 +73,8 @@ add_executable(fan_service_sw_test
target_link_libraries(fan_service_sw_test
fan_service_lib
Folly::folly
${LIBGPIOD}
gpiod_line
${GTEST}
${LIBGMOCK_LIBRARIES}
)
Expand Down
1 change: 1 addition & 0 deletions cmake/PlatformFwUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ add_executable(fw_util
target_link_libraries(fw_util
Folly::folly
platform_config_lib
platform_name_lib
platform_utils
FBThrift::thriftcpp2
fw_util_config-cpp2-types
Expand Down
1 change: 1 addition & 0 deletions cmake/PlatformHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ target_link_libraries(platform_fs_utils
)

target_link_libraries(platform_name_lib
platform_fs_utils
platform_utils
Folly::folly
fb303::fb303
Expand Down
1 change: 1 addition & 0 deletions cmake/PlatformSensorService.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ add_library(sensor_service_lib
target_link_libraries(sensor_service_lib
log_thrift_call
platform_config_lib
platform_name_lib
platform_utils
sensor_service_utils
sensor_service_cpp2
Expand Down
1 change: 1 addition & 0 deletions cmake/PlatformWeutil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ target_link_libraries(weutil_lib
weutil_config_cpp2
weutil_fboss_eeprom_parser
platform_config_lib
platform_name_lib
ioctl_smbus_eeprom_reader
)

Expand Down
Loading

0 comments on commit 6ca4c35

Please sign in to comment.