1
+ name : Compiler Compatibility CI
2
+
3
+ on :
4
+ push :
5
+ branches : [master]
6
+ pull_request :
7
+
8
+ jobs :
9
+ build :
10
+ strategy :
11
+ fail-fast : false
12
+ matrix :
13
+ compiler :
14
+ - { 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" }
15
+ - { 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" }
16
+ - { 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" }
17
+ - { 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" }
18
+ - { 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" }
19
+ - { 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" }
20
+ - { 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" }
21
+ - { 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" }
22
+ - { 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" }
23
+ runs-on : ${{ matrix.compiler.runs-on }}
24
+ name : Compiler ${{ matrix.compiler.name }}
25
+ env :
26
+ CXX : ${{ matrix.compiler.cxx }}
27
+ CC : ${{ matrix.compiler.cc }}
28
+ outputs :
29
+ # 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
30
+ ubuntu-2204_clang-13 : ${{ steps.status.outputs.ubuntu-2204_clang-13 }}
31
+ ubuntu-2204_clang-14 : ${{ steps.status.outputs.ubuntu-2204_clang-14 }}
32
+ ubuntu-2204_clang-15 : ${{ steps.status.outputs.ubuntu-2204_clang-15 }}
33
+ ubuntu-2204_gcc-10 : ${{ steps.status.outputs.ubuntu-2204_gcc-10 }}
34
+ ubuntu-2204_gcc-11 : ${{ steps.status.outputs.ubuntu-2204_gcc-11 }}
35
+ ubuntu-2004_clang-12 : ${{ steps.status.outputs.ubuntu-2004_clang-12 }}
36
+ ubuntu-2004_clang-11 : ${{ steps.status.outputs.ubuntu-2004_clang-11 }}
37
+ ubuntu-2004_clang-10 : ${{ steps.status.outputs.ubuntu-2004_clang-10 }}
38
+ ubuntu-2004_gcc-10 : ${{ steps.status.outputs.ubuntu-2004_gcc-10 }}
39
+ defaults :
40
+ run :
41
+ shell : bash -l {0}
42
+ steps :
43
+ - name : Checkout repository
44
+ uses : actions/checkout@v3
45
+ # Ubuntu 22.04 container has libstdc++13 installed which is incompatible with clang < 15 in C++20
46
+ - name : Uninstall libstdc++-13-dev
47
+ if : (matrix.compiler.tag == 'ubuntu-2204_clang-14') || (matrix.compiler.tag == 'ubuntu-2204_clang-13')
48
+ run : |
49
+ sudo apt autoremove libstdc++-13-dev gcc-13 libgcc-13-dev
50
+ sudo apt install -y --no-install-recommends libstdc++-12-dev gcc-12 libgcc-12-dev
51
+ - name : Install dependencies
52
+ if : startsWith(matrix.compiler.tag,'ubuntu-2204')
53
+ run : |
54
+ sudo apt install -y --no-install-recommends liburing-dev
55
+ - name : Install dependencies
56
+ if : startsWith(matrix.compiler.tag,'ubuntu-2004')
57
+ run : |
58
+ sudo apt install -y --no-install-recommends libc6-dev wget
59
+ wget http://de.archive.ubuntu.com/ubuntu/pool/main/libu/liburing/liburing2_2.1-2build1_amd64.deb
60
+ wget http://de.archive.ubuntu.com/ubuntu/pool/main/libu/liburing/liburing-dev_2.1-2build1_amd64.deb
61
+ sudo dpkg -i liburing*.deb
62
+ rm liburing*.deb
63
+ - name : Install gtest
64
+ uses : ./.github/actions/install/gtest
65
+ - name : Configure
66
+ run : cmake -S. -Bbuild -DASYNCPP_BUILD_TEST=ON -DASYNCPP_WITH_ASAN=ON -DASYNCPP_WITH_TSAN=OFF
67
+ - name : Build
68
+ run : cmake --build build --config Debug
69
+ - name : Test
70
+ working-directory : ${{ github.workspace }}/build
71
+ run : ./asyncpp_uring-test
72
+ - name : Update Result
73
+ id : status
74
+ if : ${{ always() }}
75
+ run : echo "${{ matrix.compiler.tag }}=${{ job.status }}" >> $GITHUB_OUTPUT
76
+
77
+ badge-upload :
78
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && always() }}
79
+ needs : [build]
80
+ runs-on : ubuntu-20.04
81
+ name : Publish badges
82
+ steps :
83
+ - name : Checkout repository
84
+ uses : actions/checkout@v3
85
+ - name : Publish Badges
86
+ uses : ./.github/actions/badge
87
+ with :
88
+ category : compiler
89
+ badges : ${{ toJson(needs.build.outputs) }}
90
+
0 commit comments