File tree Expand file tree Collapse file tree 5 files changed +30
-22
lines changed
Expand file tree Collapse file tree 5 files changed +30
-22
lines changed Original file line number Diff line number Diff line change @@ -38,23 +38,23 @@ jobs:
3838 run : conda info
3939 - name : Setup build environment
4040 run : |
41- conda create -n py376_build python=3.7.6
42- conda activate py376_build
41+ conda create -n build python=3.12
42+ conda activate build
4343 conda install cmake
4444 - name : Install libuv
4545 run : |
46- conda activate py376_build
47- curl https://dist.libuv.org/dist/v1.38.0 /libuv-v1.38.0 .tar.gz --output libuv-v1.38.0 .tar.gz
48- tar xzvf libuv-v1.38.0 .tar.gz
49- cd libuv-v1.38.0
46+ conda activate build
47+ curl https://dist.libuv.org/dist/v1.49.2 /libuv-v1.49.2 .tar.gz --output libuv-v1.49.2 .tar.gz
48+ tar xzvf libuv-v1.49.2 .tar.gz
49+ cd libuv-v1.49.2
5050 mkdir -p build
5151 cd build
5252 mkdir -p ${{ env.libuv_path }}
5353 cmake .. -DCMAKE_INSTALL_PREFIX=${{ env.libuv_path }}
5454 msbuild INSTALL.vcxproj
5555 - name : Install googletest
5656 run : |
57- conda activate py376_build
57+ conda activate build
5858 curl -L https://github.com/google/googletest/releases/download/v1.15.2/googletest-1.15.2.tar.gz `
5959 --output googletest-1.15.2.tar.gz
6060 tar xzvf googletest-1.15.2.tar.gz
7070 msbuild INSTALL.vcxproj
7171 - name : Build
7272 run : |
73- conda activate py376_build
73+ conda activate build
7474 git submodule sync
7575 git submodule update --init --recursive
7676 mkdir -p build
Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ if(MSVC)
5454 message (STATUS "Set USE_NCCL OFF" )
5555 set (USE_RCCL OFF )
5656 message (STATUS "Set USE_RCCL OFF" )
57- set (USE_LIBUV OFF )
58- message (STATUS "Set USE_LIBUV OFF " )
59- # message(STATUS "Only USE_LIBUV is supported on Windows")
57+ set (USE_LIBUV ON )
58+ message (STATUS "Set USE_LIBUV ON " )
59+ message (STATUS "Only USE_LIBUV is supported on Windows" )
6060
6161 if (BUILD_BENCHMARK)
6262 message (FATAL_ERROR "BUILD_BENCHMARK is not supported on Windows yet" )
@@ -117,8 +117,9 @@ include_directories(${PROJECT_BINARY_DIR})
117117
118118# Compiler flags
119119
120+ set (CMAKE_CXX_STANDARD 17)
120121if (NOT MSVC )
121- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 - fPIC" )
122+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
122123endif ()
123124
124125# Recurse into main project directory
Original file line number Diff line number Diff line change 99#pragma once
1010
1111#include < climits>
12+ #include < cstdint>
1213#include < exception>
1314#include < functional>
1415#include < iostream>
1819#include " gloo/common/error.h"
1920#include " gloo/common/string.h"
2021
22+ #ifdef _WIN32
23+ #ifdef ERROR
24+ #undef ERROR
25+ #endif
26+ #endif
27+
2128namespace gloo {
2229
23- enum LogLevel {
24- ERROR,
25- WARN,
26- INFO,
27- DEBUG,
28- UNSET,
30+ enum class LogLevel : std:: int8_t {
31+ ERROR = 0 ,
32+ WARN = 1 ,
33+ INFO = 2 ,
34+ DEBUG = 3 ,
35+ UNSET = - 1 ,
2936};
3037
3138LogLevel logLevel ();
Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ void Device::connectAsListener(
304304 const Address& local,
305305 std::chrono::milliseconds timeout,
306306 ConnectCallback connectCallback) {
307- defer ([=, this ] {
307+ defer ([=] {
308308 decltype (pendingConnections_)::mapped_type pendingConnection;
309309
310310 // Find pending connection, or stash the connect callback.
@@ -360,7 +360,7 @@ void Device::connectAsInitiator(
360360 const Address& remote,
361361 std::chrono::milliseconds timeout,
362362 ConnectCallback fn) {
363- defer ([=, this ] {
363+ defer ([=] {
364364 auto tcp = loop_->resource <libuv::TCP>();
365365 auto timer = loop_->resource <libuv::Timer>();
366366
@@ -458,7 +458,7 @@ void Device::listenCallback() {
458458
459459 // Wait for remote side to write sequence number.
460460 handle->once <libuv::ReadEvent>(
461- [=, this ](const libuv::ReadEvent& event, libuv::TCP& handle) {
461+ [=](const libuv::ReadEvent& event, libuv::TCP& handle) {
462462 // Sequence number has been read. Either there is an existing
463463 // connection callback for this sequence number, or we'll hold
464464 // on to the handle while we wait for the pair to pass a
Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ void Pair::closeWhileHoldingPairLock() {
554554 state_, CONNECTING, " Cannot close pair while waiting on connection" );
555555 break ;
556556 case CONNECTED:
557- device_->defer ([=, this ] { this ->handle_ ->close (); });
557+ device_->defer ([=] { this ->handle_ ->close (); });
558558 state_ = CLOSING;
559559 break ;
560560 case CLOSING:
You can’t perform that action at this time.
0 commit comments