@@ -17,49 +17,36 @@ jobs:
1717 strategy :
1818 matrix :
1919 sys :
20- - { compiler: 'gcc', version: '7' }
21- - { compiler: 'gcc', version: '8' }
22- - { compiler: 'gcc', version: '9' }
23- - { compiler: 'gcc', version: '10' }
2420 - { compiler: 'gcc', version: '11' }
25- - { compiler: 'clang', version: '8' }
26- - { compiler: 'clang', version: '10' }
27- - { compiler: 'clang', version: '12' }
28- - { compiler: 'clang', version: '13' }
29- - { compiler: 'clang', version: '14' }
30- - { compiler: 'clang', version: '15' }
21+ - { compiler: 'gcc', version: '12' }
22+ - { compiler: 'gcc', version: '13' }
23+ - { compiler: 'gcc', version: '14' }
24+ - { compiler: 'clang', version: '17' }
25+ - { compiler: 'clang', version: '18' }
26+ - { compiler: 'clang', version: '19' }
27+ - { compiler: 'clang', version: '20' }
3128
3229 steps :
33- - name : Setup compiler
34- if : ${{ matrix.sys.compiler == 'gcc' }}
35- run : |
36- GCC_VERSION=${{ matrix.sys.version }}
37- sudo apt-get update
38- sudo apt-get --no-install-suggests --no-install-recommends install g++-$GCC_VERSION
39- CC=gcc-$GCC_VERSION
40- echo "CC=$CC" >> $GITHUB_ENV
41- CXX=g++-$GCC_VERSION
42- echo "CXX=$CXX" >> $GITHUB_ENV
30+ - name : Install GCC
31+ if : matrix.compiler == 'gcc'
32+ uses : egor-tensin/setup-gcc@v1
33+ with :
34+ version : ${{matrix.version}}
35+ platform : x64
4336
44- - name : Setup compiler
45- if : ${{ matrix.sys. compiler == 'clang' }}
37+ - name : Install LLVM and Clang
38+ if : matrix.compiler == 'clang'
4639 run : |
47- LLVM_VERSION=${{ matrix.sys.version }}
48- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - || exit 1
49- if [[ $LLVM_VERSION -ge 13 ]]; then
50- sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_VERSION main" || exit 1
51- else
52- sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal main" || exit 1
53- fi || exit 1
54- sudo apt-get update || exit 1
55- sudo apt-get --no-install-suggests --no-install-recommends install clang-$LLVM_VERSION || exit 1
56- sudo apt-get --no-install-suggests --no-install-recommends install g++-9 g++-9-multilib || exit 1
57- sudo ln -s /usr/include/asm-generic /usr/include/asm
58- CC=clang-$LLVM_VERSION
59- echo "CC=$CC" >> $GITHUB_ENV
60- CXX=clang++-$LLVM_VERSION
61- echo "CXX=$CXX" >> $GITHUB_ENV
62-
40+ wget https://apt.llvm.org/llvm.sh
41+ chmod +x llvm.sh
42+ sudo ./llvm.sh ${{matrix.version}}
43+ sudo apt-get install -y clang-tools-${{matrix.version}}
44+ sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${{matrix.version}} 200
45+ sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{matrix.version}} 200
46+ sudo update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.version}} 200
47+ sudo update-alternatives --set clang /usr/bin/clang-${{matrix.version}}
48+ sudo update-alternatives --set clang++ /usr/bin/clang++-${{matrix.version}}
49+ sudo update-alternatives --set clang-scan-deps /usr/bin/clang-scan-deps-${{matrix.version}}
6350 - name : Checkout code
6451 uses : actions/checkout@v3
6552
0 commit comments