Skip to content

Commit

Permalink
👷 Upgrade ci workflow to match github
Browse files Browse the repository at this point in the history
  • Loading branch information
Thalhammer committed Dec 22, 2023
1 parent 61556a4 commit 2fddde8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/compiler-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
fail-fast: false
matrix:
compiler:
- { tag: "ubuntu-2204_clang-12", name: "Ubuntu 22.04 Clang 12", cxx: "/usr/bin/clang++-12", cc: "/usr/bin/clang-12", runs-on: "ubuntu-22.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" }
Expand All @@ -29,9 +29,9 @@ 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-2204_clang-12: ${{ steps.status.outputs.ubuntu-2204_clang-12 }}
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 }}
Expand All @@ -46,6 +46,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Ubuntu 22.04 container has libstdc++13 installed which is incompatible with clang < 15 in C++20
- name: Uninstall libstdc++-13-dev
if: (matrix.compiler.tag == 'ubuntu-2204_clang-14') || (matrix.compiler.tag == 'ubuntu-2204_clang-13')
run: |
sudo apt autoremove libstdc++-13-dev gcc-13 libgcc-13-dev
sudo apt install libstdc++-12-dev gcc-12 libgcc-12-dev
- name: Install grpc
if: contains(matrix.compiler.runs-on, 'ubuntu')
uses: ./.github/actions/install/grpc
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ Tested and supported compilers:
| [![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-2204_clang-12][img_ubuntu-2204_clang-12]][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-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-curl/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-curl/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-curl/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-curl/badges/compiler/ubuntu-2004_gcc-10/shields.json
[img_ubuntu-2204_clang-12]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-curl/badges/compiler/ubuntu-2204_clang-12/shields.json
[img_ubuntu-2204_clang-13]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-curl/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-curl/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-curl/badges/compiler/ubuntu-2204_clang-15/shields.json
[img_ubuntu-2204_gcc-10]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-curl/badges/compiler/ubuntu-2204_gcc-10/shields.json
[img_ubuntu-2204_gcc-11]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/asyncpp/asyncpp-curl/badges/compiler/ubuntu-2204_gcc-11/shields.json
[Compiler-Support]: https://github.com/asyncpp/asyncpp-curl/actions/workflows/compiler-support.yml
Expand Down
15 changes: 9 additions & 6 deletions cmake/GetGRPC.cmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
if(TARGET grpc++ AND TARGET grpc AND TARGET grpc_cpp_plugin)
if(TARGET grpc++
AND TARGET grpc
AND TARGET grpc_cpp_plugin)
message(STATUS "Using existing grpc target.")
if(NOT TARGET gRPC::grpc++)
add_library(gRPC::grpc++ ALIAS grpc++)
endif()
if(NOT TARGET gRPC::grpc)
add_library(gRPC::grpc ALIAS grpc)
add_library(gRPC::grpc ALIAS grpc)
endif()
if(NOT TARGET gRPC::grpc_cpp_plugin)
add_executable(gRPC::grpc_cpp_plugin ALIAS grpc_cpp_plugin)
add_executable(gRPC::grpc_cpp_plugin ALIAS grpc_cpp_plugin)
endif()
elseif(HUNTER_ENABLED)
hunter_add_package(gRPC)
Expand Down Expand Up @@ -54,10 +56,11 @@ else()
INTERFACE GRPC_ASAN_SUPPRESSED)
if(NOT TARGET gRPC::grpc_cpp_plugin)
add_executable(gRPC::grpc_cpp_plugin IMPORTED GLOBAL)
set_property(TARGET gRPC::grpc_cpp_plugin PROPERTY IMPORTED_LOCATION
${gRPCPP_PB_PLUGIN})
set_property(TARGET gRPC::grpc_cpp_plugin
PROPERTY IMPORTED_LOCATION ${gRPCPP_PB_PLUGIN})
endif()
set_target_properties(gRPC::grpc_cpp_plugin PROPERTIES IMPORTED_GLOBAL TRUE)
set_target_properties(gRPC::grpc_cpp_plugin PROPERTIES IMPORTED_GLOBAL
TRUE)
add_library(protobuf::libprotobuf ALIAS PkgConfig::Protobuf)
if(NOT TARGET protobuf::protoc)
add_executable(protobuf::protoc IMPORTED GLOBAL)
Expand Down
1 change: 0 additions & 1 deletion cmake/Hunter/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ hunter_config(

hunter_config(Protobuf VERSION 3.19.4-p0 CMAKE_ARGS
CMAKE_POSITION_INDEPENDENT_CODE=ON)

0 comments on commit 2fddde8

Please sign in to comment.