Skip to content

Commit 3135b0b

Browse files
authored
ci/windows: bump libuv version (#472)
1 parent f2eaf8e commit 3135b0b

File tree

5 files changed

+30
-22
lines changed

5 files changed

+30
-22
lines changed

.github/workflows/build-windows.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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
@@ -70,7 +70,7 @@ jobs:
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

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff 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)
120121
if(NOT MSVC)
121-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fPIC")
122+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
122123
endif()
123124

124125
# Recurse into main project directory

gloo/common/logging.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#pragma once
1010

1111
#include <climits>
12+
#include <cstdint>
1213
#include <exception>
1314
#include <functional>
1415
#include <iostream>
@@ -18,14 +19,20 @@
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+
2128
namespace 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

3138
LogLevel logLevel();

gloo/transport/uv/device.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

gloo/transport/uv/pair.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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:

0 commit comments

Comments
 (0)