diff --git a/.github/actions/process-linting-results/action.yml b/.github/actions/process-linting-results/action.yml index e3a802b..1ed6d4a 100644 --- a/.github/actions/process-linting-results/action.yml +++ b/.github/actions/process-linting-results/action.yml @@ -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 diff --git a/.github/workflows/compiler-support.yml b/.github/workflows/compiler-support.yml index 55feee8..bb41b1b 100644 --- a/.github/workflows/compiler-support.yml +++ b/.github/workflows/compiler-support.yml @@ -11,15 +11,17 @@ 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: @@ -27,15 +29,17 @@ jobs: 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} @@ -49,17 +53,7 @@ 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 @@ -67,8 +61,7 @@ jobs: - 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() }} @@ -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 @@ -87,4 +80,3 @@ jobs: with: category: compiler badges: ${{ toJson(needs.build.outputs) }} - \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c1843d9..28e8d2a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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: @@ -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 . diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c079f4..bd70b4b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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() diff --git a/README.md b/README.md index 412cda1..4fdaf8a 100644 --- a/README.md +++ b/README.md @@ -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