Skip to content

Commit 75005ec

Browse files
committed
Update cmake.yml
1 parent 9142ce1 commit 75005ec

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,41 @@ 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+
run: |
115+
docker run --rm -v "${{ github.workspace }}:/workspace" -w /workspace centos:7 bash -c '
116+
yum -y update && \
117+
yum -y groupinstall "Development Tools" && \
118+
yum -y install epel-release && \
119+
yum -y install clang cmake make which && \
120+
export CC=clang && export CXX=clang++ && \
121+
mkdir -p build && \
122+
cmake -B build -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S . && \
123+
cmake --build build --config ${{ matrix.build_type }} --verbose && \
124+
cd build && ctest --build-config ${{ matrix.build_type }} --verbose --output-on-failure && cd .. && \
125+
mkdir -p build/package && \
126+
cp build/${{ matrix.build_type }}/*GameAnalytics.* build/package/ 2>/dev/null || true && \
127+
cp -r include build/package/ 2>/dev/null || true
128+
'
129+
130+
- name: Upload Build Artifact
131+
uses: actions/upload-artifact@v4
132+
with:
133+
name: ga-cpp-sdk-centos7-clang-${{ matrix.build_type }}
134+
path: ${{ github.workspace }}/build/package/
135+
retention-days: 3
136+

0 commit comments

Comments
 (0)