Skip to content

Commit dab5c81

Browse files
author
wuxianrong
committed
fix ci
1 parent 6dbb59f commit dab5c81

15 files changed

Lines changed: 33 additions & 29 deletions

File tree

.github/workflows/pika.yml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -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: |

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18)
1+
cmake_minimum_required(VERSION 3.5)
22

33
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24:
44
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
@@ -177,7 +177,7 @@ ExternalProject_Add(gflags
177177
URL
178178
https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz
179179
URL_HASH
180-
MD5=1a865b93bacfa963201af3f75b7bd64c
180+
MD5=1a865b93bacfa963201af3f75b7bd64c
181181
DOWNLOAD_NO_PROGRESS
182182
1
183183
UPDATE_COMMAND
@@ -191,6 +191,7 @@ ExternalProject_Add(gflags
191191
BUILD_ALWAYS
192192
1
193193
CMAKE_ARGS
194+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5
194195
-DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX}
195196
-DCMAKE_BUILD_TYPE=${LIB_BUILD_TYPE}
196197
-DGFLAGS_NAMESPACE=gflags

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ C_GREEN="\033[32m"
88

99
C_END="\033[0m"
1010

11-
CMAKE_MIN_VERSION="3.18"
11+
CMAKE_MIN_VERSION="3.5"
1212
TAR_MIN_VERSION="1.26"
1313

1414
BUILD_DIR=output

src/cache/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.18)
1+
cmake_minimum_required (VERSION 3.5)
22

33
set (CMAKE_CXX_STANDARD 17)
44
project (cache)

src/net/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.18)
1+
cmake_minimum_required (VERSION 3.5)
22

33
set (CMAKE_CXX_STANDARD 17)
44

src/net/examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18)
1+
cmake_minimum_required(VERSION 3.5)
22

33
set (CMAKE_CXX_STANDARD 17)
44
add_subdirectory(performance)

src/net/examples/performance/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.18)
1+
cmake_minimum_required (VERSION 3.5)
22

33
aux_source_directory(../src DIR_SRCS)
44
set(CMAKE_CXX_STANDARD 17)

src/net/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18)
1+
cmake_minimum_required(VERSION 3.5)
22

33
include(GoogleTest)
44
aux_source_directory(../src DIR_SRCS)

src/pstd/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.18)
1+
cmake_minimum_required(VERSION 3.5)
22

33
set (CMAKE_CXX_STANDARD 17)
44
project (pstd)

src/pstd/examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required (VERSION 3.18)
1+
cmake_minimum_required (VERSION 3.5)
22

33
aux_source_directory(../src DIR_SRCS)
44
set(CMAKE_CXX_STANDARD 17)

0 commit comments

Comments
 (0)