@@ -111,26 +111,31 @@ jobs:
111111 echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
112112
113113 - name : Build and Test in CentOS 7 (glibc 2.17)
114+ env :
115+ BUILD_TYPE : ${{ inputs.build_type || 'Release' }}
114116 run : |
115117 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 && \
116121 yum -y update && \
117122 yum -y groupinstall "Development Tools" && \
118123 yum -y install epel-release && \
119124 yum -y install clang cmake make which && \
120125 export CC=clang && export CXX=clang++ && \
121126 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 .. && \
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 .. && \
125130 mkdir -p build/package && \
126- cp build/${{ matrix.build_type }} /*GameAnalytics.* build/package/ 2>/dev/null || true && \
131+ cp build/$BUILD_TYPE /*GameAnalytics.* build/package/ 2>/dev/null || true && \
127132 cp -r include build/package/ 2>/dev/null || true
128133 '
129134
130135 - name : Upload Build Artifact
131136 uses : actions/upload-artifact@v4
132137 with :
133- name : ga-cpp-sdk-centos7-clang-${{ matrix .build_type }}
138+ name : ga-cpp-sdk-centos7-clang-${{ inputs .build_type || 'Release' }}
134139 path : ${{ github.workspace }}/build/package/
135140 retention-days : 3
136141
0 commit comments