Skip to content

Commit b3aab2f

Browse files
committed
Update cmake.yml
1 parent 7abfff0 commit b3aab2f

File tree

1 file changed

+9
-43
lines changed

1 file changed

+9
-43
lines changed

.github/workflows/cmake.yml

Lines changed: 9 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ on:
1818

1919
jobs:
2020
cmake_build:
21-
runs-on: ${{ matrix.os }}
21+
runs-on: ubuntu-latest
22+
23+
container:
24+
image: centos:8
25+
options: --privileged
2226

2327
strategy:
2428
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
@@ -31,33 +35,10 @@ jobs:
3135
#
3236
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
3337
matrix:
34-
os: [ubuntu-latest, windows-latest, macOS-latest]
38+
os: [centos-8]
3539
build_type: ${{ fromJSON(format('[{0}]', inputs.build_type || '"Debug","Release"')) }}
36-
c_compiler: [gcc, clang, cl]
37-
include:
38-
- os: windows-latest
39-
c_compiler: cl
40-
cpp_compiler: cl
41-
- os: ubuntu-latest
42-
c_compiler: gcc
43-
cpp_compiler: g++
44-
- os: ubuntu-latest
45-
c_compiler: clang
46-
cpp_compiler: clang++
47-
- os: macOS-latest
48-
c_compiler: clang
49-
cpp_compiler: clang++
50-
exclude:
51-
- os: windows-latest
52-
c_compiler: gcc
53-
- os: windows-latest
54-
c_compiler: clang
55-
- os: ubuntu-latest
56-
c_compiler: cl
57-
- os: macOS-latest
58-
c_compiler: cl
59-
- os: macOS-latest
60-
c_compiler: gcc
40+
c_compiler: [clang]
41+
cpp_compiler: [clang++]
6142

6243
steps:
6344
- uses: actions/checkout@v4
@@ -71,22 +52,7 @@ jobs:
7152
run: |
7253
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
7354
74-
- name: Install Clang and Libraries
75-
if: matrix.os == 'ubuntu-latest' && matrix.c_compiler == 'clang'
76-
run: |
77-
sudo apt-get update
78-
sudo apt-get install -y clang libc++-dev libc++abi-dev
79-
80-
- name: Set Clang 16 as Default
81-
if: matrix.os == 'ubuntu-24.04' && matrix.c_compiler == 'clang'
82-
run: |
83-
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-16 100
84-
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 100
85-
sudo update-alternatives --set clang /usr/bin/clang-16
86-
sudo update-alternatives --set clang++ /usr/bin/clang++-16
87-
8855
- name: Check Clang Settings
89-
if: matrix.os == 'ubuntu-latest' && matrix.c_compiler == 'clang'
9056
run: |
9157
clang --version
9258
clang++ --version
@@ -128,4 +94,4 @@ jobs:
12894
name: ga-cpp-sdk-${{ matrix.os }}-${{ matrix.c_compiler }}-${{ matrix.build_type }}
12995
path: ${{ steps.strings.outputs.build-output-dir }}/package/
13096
retention-days: 3
131-
97+

0 commit comments

Comments
 (0)