@@ -35,20 +35,24 @@ jobs:
3535 run : |
3636 sudo apt-get update
3737 sudo apt-get install -y autoconf libprotobuf-dev protobuf-compiler clang-tidy
38-
38+
39+ - name : Install CMake
40+ uses : lukka/get-cmake@latest # 安装最新 CMake
41+
42+ - name : Check CMake version
43+ run : cmake --version
44+
3945 - name : Configure CMake
4046 # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
4147 # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
42- run : cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
48+ run : cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
4349
4450 - name : Build
4551 # Build your program with the given configuration
46- run : cmake --build build --config ${{ env.BUILD_TYPE }}
47-
48- - name : Cleanup
4952 run : |
50- rm -rf ./deps
51- rm -rf ./buildtrees
53+ cmake --build build --config ${{ env.BUILD_TYPE }} || true
54+ echo "查看构建日志..."
55+ tail -n 50 buildtrees/Stamp/gflags/gflags-configure-err.log
5256
5357 - uses : actions/upload-artifact@v4
5458 with :
@@ -245,6 +249,12 @@ jobs:
245249 brew install --overwrite [email protected] autoconf protobuf llvm wget git 246250 brew install gcc@10 automake cmake make binutils
247251
252+ - name : Cleanup
253+ run : |
254+ rm -rf ./deps
255+ rm -rf ./buildtrees
256+ rm -rf ./output
257+
248258 - name : Configure CMake
249259 run : |
250260 export CC=/usr/local/opt/gcc@10/bin/gcc-10
@@ -254,13 +264,6 @@ jobs:
254264 run : |
255265 cmake --build build --config ${{ env.BUILD_TYPE }}
256266
257- - name : Cleanup
258- run : |
259- cp deps/lib/libz.1.dylib .
260- cp deps/lib/libz.1.dylib tests/integration/
261- rm -rf ./deps
262- rm -rf ./buildtree
263-
264267 - name : Unit Test
265268 working-directory : ${{ github.workspace }}
266269 run : |
0 commit comments