|
18 | 18 |
|
19 | 19 | jobs: |
20 | 20 | cmake_build: |
21 | | - runs-on: ubuntu-22.04 |
| 21 | + runs-on: debian-11 |
22 | 22 |
|
23 | 23 | strategy: |
24 | 24 | # 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 | 31 | # |
32 | 32 | # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. |
33 | 33 | matrix: |
34 | | - os: [ubuntu-22.04] |
| 34 | + os: [debian-11] |
35 | 35 | build_type: ${{ fromJSON(format('[{0}]', inputs.build_type || '"Debug","Release"')) }} |
36 | 36 | c_compiler: [clang] |
37 | 37 | cpp_compiler: [clang++] |
|
96 | 96 | path: ${{ steps.strings.outputs.build-output-dir }}/package/ |
97 | 97 | retention-days: 3 |
98 | 98 |
|
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