Skip to content

Commit 2e20a6c

Browse files
authored
Merge pull request #288 from elbeno/add-gcc-usage
✅ Add GCC to usage tests
2 parents 48b3f4c + 80d3da5 commit 2e20a6c

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/usage_test.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
env:
1313
DEBIAN_FRONTEND: noninteractive
14-
USER_LLVM_VERSION: 14
14+
CMAKE_GENERATOR: Ninja
1515
USER_CMAKE_VERSION: 3.25
1616

1717
jobs:
@@ -21,23 +21,37 @@ jobs:
2121
fail-fast: false
2222
matrix:
2323
cpp_implementation: [FREESTANDING, HOSTED]
24+
compiler: [clang, gcc]
25+
include:
26+
- compiler: clang
27+
cc: "clang"
28+
cxx: "clang++"
29+
install: sudo apt update && sudo apt install -y clang-14
30+
toolchain_root: "/usr/lib/llvm-14"
31+
- compiler: gcc
32+
cc: "gcc-12"
33+
cxx: "g++-12"
34+
install: sudo apt update && sudo apt install -y gcc-12 g++-12
35+
toolchain_root: "/usr"
2436

2537
steps:
2638
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2739

2840
- name: Install compiler
29-
run: sudo apt update && sudo apt-get install -y clang-${{env.USER_LLVM_VERSION}}
41+
run: |
42+
${{ matrix.install }}
43+
sudo apt install -y ninja-build
3044
3145
- name: Install cmake
3246
run: |
3347
pip3 install --upgrade pip
3448
pip3 install --force cmake==${{env.USER_CMAKE_VERSION}}
3549
3650
- name: Configure CMake
37-
working-directory: ${{github.workspace}}/usage_test
3851
env:
39-
CC: "/usr/lib/llvm-${{env.USER_LLVM_VERSION}}/bin/clang"
40-
CXX: "/usr/lib/llvm-${{env.USER_LLVM_VERSION}}/bin/clang++"
52+
CC: ${{matrix.toolchain_root}}/bin/${{matrix.cc}}
53+
CXX: ${{matrix.toolchain_root}}/bin/${{matrix.cxx}}
54+
working-directory: ${{github.workspace}}/usage_test
4155
run: ~/.local/bin/cmake -B build -DCPP_IMPLEMENTATION=${{matrix.cpp_implementation}}
4256

4357
- name: Build

0 commit comments

Comments
 (0)