✨ Implement Websocket per message compression extension (#11) #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compiler Compatibility CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- { 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" } | |
- { tag: "windows-2022_msvc17", name: "Windows Server 2022 MSVC 17", cxx: "", cc: "", runs-on: "windows-2022" } | |
- { tag: "windows-2019_msvc16", name: "Windows Server 2019 MSVC 16", cxx: "", cc: "", runs-on: "windows-2019" } | |
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-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 }} | |
windows-2022_msvc17: ${{ steps.status.outputs.windows-2022_msvc17 }} | |
windows-2019_msvc16: ${{ steps.status.outputs.windows-2019_msvc16 }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
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: Configure | |
if: contains(matrix.compiler.runs-on, 'ubuntu') | |
run: cmake -S. -Bbuild -DASYNCPP_BUILD_TEST=ON -DASYNCPP_WITH_ASAN=ON | |
- name: Configure | |
if: contains(matrix.compiler.runs-on, 'ubuntu') != true | |
run: cmake -S. -Bbuild -DASYNCPP_BUILD_TEST=ON -DASYNCPP_WITH_ASAN=OFF | |
- name: Build | |
run: cmake --build build --config Debug | |
- name: Test | |
working-directory: ${{ github.workspace }}/build | |
if: contains(matrix.compiler.runs-on, 'windows') != true | |
run: ./asyncpp_curl-test | |
- name: Test | |
if: contains(matrix.compiler.runs-on, 'windows') | |
working-directory: ${{ github.workspace }}/build | |
run: Debug/asyncpp_curl-test.exe | |
- name: Update Result | |
id: status | |
if: ${{ always() }} | |
run: echo "${{ matrix.compiler.tag }}=${{ job.status }}" >> $GITHUB_OUTPUT | |
badge-upload: | |
if: ${{ github.event_name == 'push' && always() }} | |
needs: [build] | |
runs-on: ubuntu-20.04 | |
name: Publish badges | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Publish Badges | |
uses: ./.github/actions/badge | |
with: | |
category: compiler | |
badges: ${{ toJson(needs.build.outputs) }} | |