Skip to content

Commit 975005c

Browse files
committed
Update cmake.yml
1 parent d0d9f14 commit 975005c

File tree

1 file changed

+2
-45
lines changed

1 file changed

+2
-45
lines changed

.github/workflows/cmake.yml

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818

1919
jobs:
2020
cmake_build:
21-
runs-on: ubuntu-22.04
21+
runs-on: debian-11
2222

2323
strategy:
2424
# 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,7 +31,7 @@ jobs:
3131
#
3232
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
3333
matrix:
34-
os: [ubuntu-22.04]
34+
os: [debian-11]
3535
build_type: ${{ fromJSON(format('[{0}]', inputs.build_type || '"Debug","Release"')) }}
3636
c_compiler: [clang]
3737
cpp_compiler: [clang++]
@@ -96,46 +96,3 @@ jobs:
9696
path: ${{ steps.strings.outputs.build-output-dir }}/package/
9797
retention-days: 3
9898

99-
cmake_build_centos:
100-
runs-on: ubuntu-22.04
101-
102-
steps:
103-
- uses: actions/checkout@v4
104-
with:
105-
submodules: true
106-
107-
- name: Set reusable strings
108-
id: strings
109-
shell: bash
110-
run: |
111-
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
112-
113-
- name: Build and Test in CentOS 7 (glibc 2.17)
114-
env:
115-
BUILD_TYPE: ${{ inputs.build_type || 'Release' }}
116-
run: |
117-
docker run --rm -v "${{ github.workspace }}:/workspace" -w /workspace centos:7 bash -c '
118-
sed -i "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-Base.repo && \
119-
sed -i "s|#baseurl=|baseurl=|g" /etc/yum.repos.d/CentOS-Base.repo && \
120-
sed -i "s|http://mirror.centos.org|http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Base.repo && \
121-
yum -y update && \
122-
yum -y groupinstall "Development Tools" && \
123-
yum -y install epel-release && \
124-
yum -y install clang cmake make which && \
125-
export CC=clang && export CXX=clang++ && \
126-
mkdir -p build && \
127-
cmake -B build -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=$BUILD_TYPE -S . && \
128-
cmake --build build --config $BUILD_TYPE --verbose && \
129-
cd build && ctest --build-config $BUILD_TYPE --verbose --output-on-failure && cd .. && \
130-
mkdir -p build/package && \
131-
cp build/$BUILD_TYPE/*GameAnalytics.* build/package/ 2>/dev/null || true && \
132-
cp -r include build/package/ 2>/dev/null || true
133-
'
134-
135-
- name: Upload Build Artifact
136-
uses: actions/upload-artifact@v4
137-
with:
138-
name: ga-cpp-sdk-centos7-clang-${{ inputs.build_type || 'Release' }}
139-
path: ${{ github.workspace }}/build/package/
140-
retention-days: 3
141-

0 commit comments

Comments
 (0)