From 3ffb3a018d9d27e0a1e36d285c6dfd94ea447a92 Mon Sep 17 00:00:00 2001 From: Chirag Pandya Date: Mon, 14 Oct 2024 09:36:57 -0700 Subject: [PATCH] migrate circeci to github actions + fixes Summary: 1. Migrate circleci to github actions. 2. Remove deleted test mem_test.cc. 3. Remove reference to win.cc and win.h. 4. Remove deleted test tls_tcp_test.cc 5. Remove left behind CMakeLists.txt file in libuv directory. Test Plan: Test on github. Reviewers: Subscribers: Tasks: Tags: --- .github/workflows/build.yaml | 75 ++++++++++++++++++++++++++++++++ gloo/common/CMakeLists.txt | 9 ---- gloo/test/CMakeLists.txt | 2 - gloo/transport/CMakeLists.txt | 4 -- gloo/transport/uv/CMakeLists.txt | 19 -------- gloo/transport/uv/LICENSE.uvw | 21 --------- 6 files changed, 75 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/build.yaml delete mode 100644 gloo/transport/uv/CMakeLists.txt delete mode 100644 gloo/transport/uv/LICENSE.uvw diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 000000000..98881aaba --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,75 @@ +name: CI +on: + push: + branches: + - main + pull_request: + +jobs: + windows_build: + runs-on: windows-latest + env: + gtest_lib_path: c:/googletest + libuv_path: c:/libuv + steps: + - uses: conda-incubator/setup-miniconda@v3 + with: + miniconda-version: "latest" + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Add conda to system path + run: | + # $CONDA is an environment variable pointing to the root of the miniconda directory + echo $CONDA/bin >> $GITHUB_PATH + - name: Conda info + shell: bash -l {0} + run: conda info + - name: Setup build environment + run: | + conda create -n py376_build python=3.7.6 + conda activate py376_build + conda install cmake + - name: Install libuv + run: | + conda activate py376_build + curl https://dist.libuv.org/dist/v1.38.0/libuv-v1.38.0.tar.gz --output libuv-v1.38.0.tar.gz + tar xzvf libuv-v1.38.0.tar.gz + cd libuv-v1.38.0 + mkdir -p build + cd build + mkdir -p ${{ env.gtest_lib_path }} + cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.libuv_path }} + msbuild INSTALL.vcxproj + - name: Install googletest + run: | + conda activate py376_build + curl https://codeload.github.com/google/googletest/tar.gz/release-1.10.0 --output googletest-release-1.10.0.tar.gz + tar xzvf googletest-release-1.10.0.tar.gz + cd googletest-release-1.10.0 + mkdir -p build + cd build + if (Test-Path -Path ${{ env.gtest_lib_path }}) { + echo "Directory already exists" + } else { + mkdir ${{ env.gtest_lib_path }} + } + cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.gtest_lib_path }} -Dgtest_force_shared_crt=ON + msbuild INSTALL.vcxproj + - name: Build + run: | + conda activate py376_build + git submodule sync + git submodule update --init --recursive + mkdir -p build + cd build + cmake .. -DBUILD_TEST=ON -Dlibuv_ROOT=${{ env.libuv_path }} -DGTEST_LIBRARY=${{ env.gtest_lib_path }}/lib/gtestd.lib -DGTEST_INCLUDE_DIR=${{ env.gtest_lib_path }}/include -DGTEST_MAIN_LIBRARY=${{ env.gtest_lib_path }}/lib/gtest_maind.lib + msbuild ALL_BUILD.vcxproj + - name: Test + run: | + build/gloo/test/Debug/gloo_test.exe diff --git a/gloo/common/CMakeLists.txt b/gloo/common/CMakeLists.txt index 307588a89..759aa1896 100644 --- a/gloo/common/CMakeLists.txt +++ b/gloo/common/CMakeLists.txt @@ -23,15 +23,6 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") ) endif() -if(MSVC) - list(APPEND GLOO_COMMON_HDRS - "${CMAKE_CURRENT_SOURCE_DIR}/win.h" - ) - list(APPEND GLOO_COMMON_SRCS - "${CMAKE_CURRENT_SOURCE_DIR}/win.cc" - ) -endif() - list(APPEND GLOO_SRCS ${GLOO_COMMON_SRCS}) list(APPEND GLOO_HDRS ${GLOO_COMMON_HDRS}) set(GLOO_SRCS ${GLOO_SRCS} PARENT_SCOPE) diff --git a/gloo/test/CMakeLists.txt b/gloo/test/CMakeLists.txt index 743e089ee..f57e998d8 100644 --- a/gloo/test/CMakeLists.txt +++ b/gloo/test/CMakeLists.txt @@ -12,11 +12,9 @@ set(GLOO_TEST_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/gather_test.cc" "${CMAKE_CURRENT_SOURCE_DIR}/gatherv_test.cc" "${CMAKE_CURRENT_SOURCE_DIR}/main.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/memory_test.cc" "${CMAKE_CURRENT_SOURCE_DIR}/openssl_utils.cc" "${CMAKE_CURRENT_SOURCE_DIR}/reduce_test.cc" "${CMAKE_CURRENT_SOURCE_DIR}/send_recv_test.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/tls_tcp_test.cc" ) set(GLOO_TEST_LIBRARIES) diff --git a/gloo/transport/CMakeLists.txt b/gloo/transport/CMakeLists.txt index baca4c8d2..c104b8e03 100644 --- a/gloo/transport/CMakeLists.txt +++ b/gloo/transport/CMakeLists.txt @@ -24,10 +24,6 @@ if(GLOO_HAVE_TRANSPORT_IBVERBS) add_subdirectory(ibverbs) endif() -if(GLOO_HAVE_TRANSPORT_UV) - add_subdirectory(uv) -endif() - list(APPEND GLOO_SRCS ${GLOO_TRANSPORT_SRCS}) list(APPEND GLOO_HDRS ${GLOO_TRANSPORT_HDRS}) set(GLOO_SRCS ${GLOO_SRCS} PARENT_SCOPE) diff --git a/gloo/transport/uv/CMakeLists.txt b/gloo/transport/uv/CMakeLists.txt deleted file mode 100644 index ca0bed7f1..000000000 --- a/gloo/transport/uv/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -list(APPEND GLOO_TRANSPORT_SRCS - "${CMAKE_CURRENT_SOURCE_DIR}/address.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/device.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/context.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/libuv.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/pair.cc" - "${CMAKE_CURRENT_SOURCE_DIR}/unbound_buffer.cc" - ) -list(APPEND GLOO_TRANSPORT_HDRS - "${CMAKE_CURRENT_SOURCE_DIR}/address.h" - "${CMAKE_CURRENT_SOURCE_DIR}/device.h" - "${CMAKE_CURRENT_SOURCE_DIR}/context.h" - "${CMAKE_CURRENT_SOURCE_DIR}/libuv.h" - "${CMAKE_CURRENT_SOURCE_DIR}/pair.h" - "${CMAKE_CURRENT_SOURCE_DIR}/unbound_buffer.h" - ) - -set(GLOO_TRANSPORT_SRCS ${GLOO_TRANSPORT_SRCS} PARENT_SCOPE) -set(GLOO_TRANSPORT_HDRS ${GLOO_TRANSPORT_HDRS} PARENT_SCOPE) diff --git a/gloo/transport/uv/LICENSE.uvw b/gloo/transport/uv/LICENSE.uvw deleted file mode 100644 index 47515e97e..000000000 --- a/gloo/transport/uv/LICENSE.uvw +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016-2019 Michele Caini - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copy of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copy or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE.