Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/process-linting-results/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
shell: bash
- id: stage
#continue-on-error: true
uses: dtinth/patch-generator-action@v1
uses: Thalhammer/patch-generator-action@v3

# Unfortunately the previous action reports a failure so nothing else can run
# partially a limitation on composite actions since `continue-on-error` is not
Expand Down
38 changes: 15 additions & 23 deletions .github/workflows/compiler-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,35 @@ jobs:
fail-fast: false
matrix:
compiler:
- { tag: "ubuntu-2404_clang-16", name: "Ubuntu 24.04 Clang 16", cxx: "/usr/bin/clang++-16", cc: "/usr/bin/clang-16", runs-on: "ubuntu-24.04" }
- { tag: "ubuntu-2404_clang-17", name: "Ubuntu 24.04 Clang 17", cxx: "/usr/bin/clang++-17", cc: "/usr/bin/clang-17", runs-on: "ubuntu-24.04" }
- { tag: "ubuntu-2404_clang-18", name: "Ubuntu 24.04 Clang 18", cxx: "/usr/bin/clang++-18", cc: "/usr/bin/clang-18", runs-on: "ubuntu-24.04" }
- { tag: "ubuntu-2404_gcc-12", name: "Ubuntu 24.04 G++ 12", cxx: "/usr/bin/g++-12", cc: "/usr/bin/gcc-12", runs-on: "ubuntu-24.04" }
- { tag: "ubuntu-2404_gcc-13", name: "Ubuntu 24.04 G++ 13", cxx: "/usr/bin/g++-13", cc: "/usr/bin/gcc-13", runs-on: "ubuntu-24.04" }
- { tag: "ubuntu-2404_gcc-14", name: "Ubuntu 24.04 G++ 14", cxx: "/usr/bin/g++-14", cc: "/usr/bin/gcc-14", runs-on: "ubuntu-24.04" }
- { tag: "ubuntu-2204_clang-13", name: "Ubuntu 22.04 Clang 13", cxx: "/usr/bin/clang++-13", cc: "/usr/bin/clang-13", runs-on: "ubuntu-22.04" }
- { tag: "ubuntu-2204_clang-14", name: "Ubuntu 22.04 Clang 14", cxx: "/usr/bin/clang++-14", cc: "/usr/bin/clang-14", runs-on: "ubuntu-22.04" }
- { tag: "ubuntu-2204_clang-15", name: "Ubuntu 22.04 Clang 15", cxx: "/usr/bin/clang++-15", cc: "/usr/bin/clang-15", runs-on: "ubuntu-22.04" }
- { tag: "ubuntu-2204_gcc-10", name: "Ubuntu 22.04 G++ 10", cxx: "/usr/bin/g++-10", cc: "/usr/bin/gcc-10", runs-on: "ubuntu-22.04" }
- { tag: "ubuntu-2204_gcc-11", name: "Ubuntu 22.04 G++ 11", cxx: "/usr/bin/g++-11", cc: "/usr/bin/gcc-11", runs-on: "ubuntu-22.04" }
- { tag: "ubuntu-2004_clang-12", name: "Ubuntu 20.04 Clang 12", cxx: "/usr/bin/clang++-12", cc: "/usr/bin/clang-12", runs-on: "ubuntu-20.04" }
- { tag: "ubuntu-2004_clang-11", name: "Ubuntu 20.04 Clang 11", cxx: "/usr/bin/clang++-11", cc: "/usr/bin/clang-11", runs-on: "ubuntu-20.04" }
- { tag: "ubuntu-2004_clang-10", name: "Ubuntu 20.04 Clang 10", cxx: "/usr/bin/clang++-10", cc: "/usr/bin/clang-10", runs-on: "ubuntu-20.04" }
- { tag: "ubuntu-2004_gcc-10", name: "Ubuntu 20.04 G++ 10", cxx: "/usr/bin/g++-10", cc: "/usr/bin/gcc-10", runs-on: "ubuntu-20.04" }
runs-on: ${{ matrix.compiler.runs-on }}
name: Compiler ${{ matrix.compiler.name }}
env:
CXX: ${{ matrix.compiler.cxx }}
CC: ${{ matrix.compiler.cc }}
outputs:
# Because github wants us to suffer we need to list out every output instead of using a matrix statement or some kind of dynamic setting
ubuntu-2404_clang-16: ${{ steps.status.outputs.ubuntu-2404_clang-16 }}
ubuntu-2404_clang-17: ${{ steps.status.outputs.ubuntu-2404_clang-17 }}
ubuntu-2404_clang-18: ${{ steps.status.outputs.ubuntu-2404_clang-18 }}
ubuntu-2404_gcc-12: ${{ steps.status.outputs.ubuntu-2404_gcc-12 }}
ubuntu-2404_gcc-13: ${{ steps.status.outputs.ubuntu-2404_gcc-13 }}
ubuntu-2404_gcc-14: ${{ steps.status.outputs.ubuntu-2404_gcc-14 }}
ubuntu-2204_clang-13: ${{ steps.status.outputs.ubuntu-2204_clang-13 }}
ubuntu-2204_clang-14: ${{ steps.status.outputs.ubuntu-2204_clang-14 }}
ubuntu-2204_clang-15: ${{ steps.status.outputs.ubuntu-2204_clang-15 }}
ubuntu-2204_gcc-10: ${{ steps.status.outputs.ubuntu-2204_gcc-10 }}
ubuntu-2204_gcc-11: ${{ steps.status.outputs.ubuntu-2204_gcc-11 }}
ubuntu-2004_clang-12: ${{ steps.status.outputs.ubuntu-2004_clang-12 }}
ubuntu-2004_clang-11: ${{ steps.status.outputs.ubuntu-2004_clang-11 }}
ubuntu-2004_clang-10: ${{ steps.status.outputs.ubuntu-2004_clang-10 }}
ubuntu-2004_gcc-10: ${{ steps.status.outputs.ubuntu-2004_gcc-10 }}
defaults:
run:
shell: bash -l {0}
Expand All @@ -49,26 +53,15 @@ jobs:
sudo apt autoremove libstdc++-13-dev gcc-13 libgcc-13-dev
sudo apt install -y --no-install-recommends libstdc++-12-dev gcc-12 libgcc-12-dev
- name: Install dependencies
if: startsWith(matrix.compiler.tag,'ubuntu-2204')
run: |
sudo apt install -y --no-install-recommends liburing-dev
- name: Install dependencies
if: startsWith(matrix.compiler.tag,'ubuntu-2004')
run: |
sudo apt install -y --no-install-recommends libc6-dev wget
wget http://de.archive.ubuntu.com/ubuntu/pool/main/libu/liburing/liburing2_2.1-2build1_amd64.deb
wget http://de.archive.ubuntu.com/ubuntu/pool/main/libu/liburing/liburing-dev_2.1-2build1_amd64.deb
sudo dpkg -i liburing*.deb
rm liburing*.deb
run: sudo apt install -y --no-install-recommends liburing-dev
- name: Install gtest
uses: ./.github/actions/install/gtest
- name: Configure
run: cmake -S. -Bbuild -DASYNCPP_BUILD_TEST=ON -DASYNCPP_WITH_ASAN=ON -DASYNCPP_WITH_TSAN=OFF
- name: Build
run: cmake --build build --config Debug
- name: Test
working-directory: ${{ github.workspace }}/build
run: ./asyncpp_uring-test
run: ctest --test-dir build --output-on-failure --no-tests=error
- name: Update Result
id: status
if: ${{ always() }}
Expand All @@ -77,7 +70,7 @@ jobs:
badge-upload:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && always() }}
needs: [build]
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
name: Publish badges
steps:
- name: Checkout repository
Expand All @@ -87,4 +80,3 @@ jobs:
with:
category: compiler
badges: ${{ toJson(needs.build.outputs) }}

11 changes: 7 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ jobs:
runs-on: ubuntu-22.04
steps:
- run: |
sudo apt update && sudo apt-get install clang-format-15
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-21 main" | sudo tee -a /etc/apt/sources.list.d/llvm.list
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo apt update && sudo apt-get install clang-format-21
shopt -s globstar
- uses: actions/checkout@v3
- run: find \( -name "*.h" -or -name "*.cpp" \) -exec clang-format-15 -i {} \;
- run: find \( -name "*.h" -or -name "*.cpp" \) -exec clang-format-21 -i {} \;
- run: find \( -name "*.h" -or -name "*.cpp" \) -exec ./.github/scripts/add-newline-if-missing.sh {} \;
- uses: ./.github/actions/process-linting-results
with:
linter_name: clang-format

cmake-format:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/setup-python@v4.3.0
with:
Expand All @@ -35,7 +38,7 @@ jobs:
linter_name: cmake-format

line-ending:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- run: git add --renormalize .
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ if(ASYNCPP_BUILD_TEST)
if(ASYNCPP_WITH_ASAN)
message(STATUS "Building with asan enabled")
target_compile_options(asyncpp_uring-test PRIVATE -fsanitize=address)
target_link_libraries(asyncpp_uring-test PRIVATE asan)
target_link_libraries(asyncpp_uring-test PRIVATE -fsanitize=address)
endif()
target_compile_options(asyncpp_uring-test PRIVATE -Werror)

Expand All @@ -101,10 +101,10 @@ if(ASYNCPP_BUILD_EXAMPLES)

if(ASYNCPP_WITH_ASAN)
target_compile_options(uring-info PRIVATE -fsanitize=address)
target_link_libraries(uring-info PRIVATE asan)
target_link_libraries(uring-info PRIVATE -fsanitize=address)
target_compile_options(echo-server PRIVATE -fsanitize=address)
target_link_libraries(echo-server PRIVATE asan)
target_link_libraries(echo-server PRIVATE -fsanitize=address)
target_compile_options(echo-client PRIVATE -fsanitize=address)
target_link_libraries(echo-client PRIVATE asan)
target_link_libraries(echo-client PRIVATE -fsanitize=address)
endif()
endif()
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,25 @@ This library provides a c++20 coroutine wrapper around the modern linux io_uring
It is an addition to [async++](https://github.com/asyncpp/asyncpp) which provides general coroutine tasks and support classes.

Tested and supported compilers:
[![ubuntu-2004_clang-10][img_ubuntu-2004_clang-10]][Compiler-Support]
[![ubuntu-2004_clang-11][img_ubuntu-2004_clang-11]][Compiler-Support]
[![ubuntu-2004_clang-12][img_ubuntu-2004_clang-12]][Compiler-Support]
[![ubuntu-2004_gcc-10][img_ubuntu-2004_gcc-10]][Compiler-Support]
[![ubuntu-2404_clang-16][img_ubuntu-2404_clang-16]][Compiler-Support]
[![ubuntu-2404_clang-17][img_ubuntu-2404_clang-17]][Compiler-Support]
[![ubuntu-2404_clang-18][img_ubuntu-2404_clang-18]][Compiler-Support]
[![ubuntu-2404_gcc-12][img_ubuntu-2404_gcc-12]][Compiler-Support]
[![ubuntu-2404_gcc-13][img_ubuntu-2404_gcc-13]][Compiler-Support]
[![ubuntu-2404_gcc-14][img_ubuntu-2404_gcc-14]][Compiler-Support]
[![ubuntu-2204_clang-13][img_ubuntu-2204_clang-13]][Compiler-Support]
[![ubuntu-2204_clang-14][img_ubuntu-2204_clang-14]][Compiler-Support]
[![ubuntu-2204_clang-15][img_ubuntu-2204_clang-15]][Compiler-Support]
[![ubuntu-2204_gcc-11][img_ubuntu-2204_gcc-11]][Compiler-Support]
[![ubuntu-2204_gcc-10][img_ubuntu-2204_gcc-10]][Compiler-Support]
[![ubuntu-2204_gcc-11][img_ubuntu-2204_gcc-11]][Compiler-Support]


[img_ubuntu-2004_clang-10]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2004_clang-10/shields.json
[img_ubuntu-2004_clang-11]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2004_clang-11/shields.json
[img_ubuntu-2004_clang-12]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2004_clang-12/shields.json
[img_ubuntu-2004_gcc-10]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2004_gcc-10/shields.json
[img_ubuntu-2404_clang-16]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2404_clang-16/shields.json
[img_ubuntu-2404_clang-17]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2404_clang-17/shields.json
[img_ubuntu-2404_clang-18]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2404_clang-18/shields.json
[img_ubuntu-2404_gcc-12]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2404_gcc-12/shields.json
[img_ubuntu-2404_gcc-13]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2404_gcc-13/shields.json
[img_ubuntu-2404_gcc-14]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2404_gcc-14/shields.json
[img_ubuntu-2204_clang-13]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2204_clang-13/shields.json
[img_ubuntu-2204_clang-14]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2204_clang-14/shields.json
[img_ubuntu-2204_clang-15]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-uring/badges/compiler/ubuntu-2204_clang-15/shields.json
Expand Down