From d5071c670b2ad7862857a90c17563c18e8676438 Mon Sep 17 00:00:00 2001 From: Bob Chen Date: Sat, 26 Oct 2024 17:09:19 +0800 Subject: [PATCH] Re-add PHOTON_BUILD_DEPENDENCIES in CI workflow --- .github/workflows/ci.linux.arm.yml | 28 ------------------- .github/workflows/ci.linux.x86_64.yml | 21 ++++++++++++++ CMake/Finduring.cmake | 9 +++++- README.md | 4 +-- ...024-10-14-stackful-coroutine-made-fast.mdx | 3 ++ io/iouring-wrapper.cpp | 4 +-- 6 files changed, 36 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.linux.arm.yml b/.github/workflows/ci.linux.arm.yml index 94e5e0bc..0218227c 100644 --- a/.github/workflows/ci.linux.arm.yml +++ b/.github/workflows/ci.linux.arm.yml @@ -41,31 +41,3 @@ jobs: nohup redis-server & ctest -E test-lockfree --timeout 3600 -V pkill redis-server - - gcc921-build-debug: - runs-on: [self-hosted, Linux, ARM64] - - container: - image: ghcr.io/alibaba/photon-ut-base:latest - options: --cpus 4 - - steps: - - uses: szenius/set-timezone@v2.0 - with: - timezoneLinux: "Asia/Shanghai" - timezoneMacos: "Asia/Shanghai" - timezoneWindows: "China Standard Time" - - - uses: actions/checkout@v4 - - - name: Build - run: | - source /opt/rh/gcc-toolset-9/enable - cmake -B build \ - -D CMAKE_BUILD_TYPE=Debug \ - -D PHOTON_ENABLE_ECOSYSTEM=ON \ - -D PHOTON_BUILD_TESTING=ON \ - -D PHOTON_ENABLE_SASL=ON \ - -D PHOTON_ENABLE_FUSE=ON \ - -D PHOTON_ENABLE_EXTFS=ON - cmake --build build -j $(nproc) -- VERBOSE=1 diff --git a/.github/workflows/ci.linux.x86_64.yml b/.github/workflows/ci.linux.x86_64.yml index 3999642c..a71be205 100644 --- a/.github/workflows/ci.linux.x86_64.yml +++ b/.github/workflows/ci.linux.x86_64.yml @@ -211,6 +211,27 @@ jobs: cd build && ctest -E test-lockfree --timeout 3600 -V pkill redis-server + debug-build-from-source: + runs-on: ubuntu-latest + container: + image: almalinux:8 + steps: + - uses: actions/checkout@v4 + - name: Build + run: | + dnf -q -y install git gcc-c++ cmake gcc-toolset-9-gcc-c++ + dnf -q -y install autoconf automake libtool + source /opt/rh/gcc-toolset-9/enable + cmake -B build -D CMAKE_BUILD_TYPE=Debug \ + -D PHOTON_ENABLE_ECOSYSTEM=ON \ + -D PHOTON_BUILD_TESTING=ON \ + -D PHOTON_ENABLE_SASL=OFF \ + -D PHOTON_ENABLE_FUSE=OFF \ + -D PHOTON_ENABLE_URING=ON \ + -D PHOTON_ENABLE_EXTFS=OFF \ + -D PHOTON_BUILD_DEPENDENCIES=ON + cmake --build build -j $(nproc) -- VERBOSE=1 + fstack: runs-on: ubuntu-latest container: diff --git a/CMake/Finduring.cmake b/CMake/Finduring.cmake index 5899c826..2260e386 100644 --- a/CMake/Finduring.cmake +++ b/CMake/Finduring.cmake @@ -1,7 +1,14 @@ +set(URING_VERSION 2.3) + find_path(URING_INCLUDE_DIRS liburing.h) find_library(URING_LIBRARIES uring) find_package_handle_standard_args(uring DEFAULT_MSG URING_LIBRARIES URING_INCLUDE_DIRS) -mark_as_advanced(URING_INCLUDE_DIRS URING_LIBRARIES) \ No newline at end of file +mark_as_advanced(URING_INCLUDE_DIRS URING_LIBRARIES) + +get_filename_component(URING_LIB_BASE ${URING_LIBRARIES} DIRECTORY) +if (NOT EXISTS "${URING_LIB_BASE}/liburing.so.${URING_VERSION}") + message(FATAL_ERROR "Requires liburing ${URING_VERSION}. Install it to system or try -D PHOTON_BUILD_DEPENDENCIES=ON") +endif () \ No newline at end of file diff --git a/README.md b/README.md index 90d4e415..09988207 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ [PhotonlibOS.github.io](https://photonlibos.github.io) ## What's New -* We present a article to illustrate why Photon's stackful coroutine is fast. -[link](https://photonlibos.github.io/blog/stackful-coroutine-made-fast) +* We present an article to illustrate the theory of Photon's coroutine. +[Stackful Coroutine Made Fast](https://photonlibos.github.io/blog/stackful-coroutine-made-fast) * Version 0.8 has been released in August 2024 * Feb 2024,[中文文档](https://photonlibos.github.io/cn/docs/category/introduction)在官网上线了 * Since 0.7, Photon will use release branches to enhance the reliability of software delivery. Bugfix will be merged into a stable release at first, then to higher release versions, and finally main. diff --git a/doc/blog/2024-10-14-stackful-coroutine-made-fast.mdx b/doc/blog/2024-10-14-stackful-coroutine-made-fast.mdx index a71f3628..fe39ca78 100644 --- a/doc/blog/2024-10-14-stackful-coroutine-made-fast.mdx +++ b/doc/blog/2024-10-14-stackful-coroutine-made-fast.mdx @@ -3,4 +3,7 @@ slug: stackful-coroutine-made-fast title: Stackful Coroutine Made Fast --- + +Download pdf + \ No newline at end of file diff --git a/io/iouring-wrapper.cpp b/io/iouring-wrapper.cpp index 8efe34ae..1faa6c35 100644 --- a/io/iouring-wrapper.cpp +++ b/io/iouring-wrapper.cpp @@ -188,7 +188,7 @@ class iouringEngine : public MasterEventEngine, public CascadingEventEngine, pub ioCtx timer_ctx(true, false); __kernel_timespec ts; auto usec = timeout.timeout_us(); - if (usec < std::numeric_limits::max()) { + if (usec < (uint64_t) std::numeric_limits::max()) { sqe->flags |= IOSQE_IO_LINK; ts = usec_to_timespec(usec); sqe = _get_sqe(); @@ -334,7 +334,7 @@ class iouringEngine : public MasterEventEngine, public CascadingEventEngine, pub ssize_t wait_and_fire_events(uint64_t timeout) override { // Prepare own timeout - if (timeout > std::numeric_limits::max()) { + if (timeout > (uint64_t) std::numeric_limits::max()) { timeout = std::numeric_limits::max(); }