-
Notifications
You must be signed in to change notification settings - Fork 14
59 lines (51 loc) · 1.65 KB
/
usage_test.yml
File metadata and controls
59 lines (51 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Usage Test
permissions: read-all
on:
workflow_dispatch:
merge_group:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
DEBIAN_FRONTEND: noninteractive
CMAKE_GENERATOR: Ninja
USER_CMAKE_VERSION: 3.25
jobs:
usage_test:
runs-on: ${{ github.repository_owner == 'intel' && 'intel-' || '' }}ubuntu-22.04
strategy:
fail-fast: false
matrix:
cpp_implementation: [FREESTANDING, HOSTED]
compiler: [clang, gcc]
include:
- compiler: clang
cc: "clang"
cxx: "clang++"
install: sudo apt update && sudo apt install -y clang-14
toolchain_root: "/usr/lib/llvm-14"
- compiler: gcc
cc: "gcc-12"
cxx: "g++-12"
install: sudo apt update && sudo apt install -y gcc-12 g++-12
toolchain_root: "/usr"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install compiler
run: |
${{ matrix.install }}
sudo apt install -y ninja-build
- name: Install cmake
run: |
pip3 install --upgrade pip
pip3 install --force cmake==${{env.USER_CMAKE_VERSION}}
- name: Configure CMake
env:
CC: ${{matrix.toolchain_root}}/bin/${{matrix.cc}}
CXX: ${{matrix.toolchain_root}}/bin/${{matrix.cxx}}
working-directory: ${{github.workspace}}/usage_test
run: ~/.local/bin/cmake -B build -DCPP_IMPLEMENTATION=${{matrix.cpp_implementation}}
- name: Build
working-directory: ${{github.workspace}}/usage_test
run: ~/.local/bin/cmake --build build