From 50c73fd6c80d0e5f78baa492f2e63aa0c70fc9b5 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 16:08:07 +0800 Subject: [PATCH 01/15] add centos CI instead of rockylinux --- .github/workflows/pika.yml | 109 ++++++++++++++++++++++++++++--------- 1 file changed, 82 insertions(+), 27 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index 79320d7a0..d04a6604c 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -84,59 +84,43 @@ jobs: chmod +x integrate_test.sh sh integrate_test.sh - build_on_rocky: + + build_on_centos: runs-on: ubuntu-latest container: - image: rockylinux:9 + image: cheniujh/pika-ci-centos7 steps: - - name: Install deps - run: | - dnf update -y - dnf install -y bash cmake wget git autoconf gcc perl-Digest-SHA tcl which tar g++ tar epel-release gcc-c++ libstdc++-devel gcc-toolset-13 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: 1.19 - - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 - name: Configure CMake run: | - source /opt/rh/gcc-toolset-13/enable - cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address . - + source /opt/rh/devtoolset-10/enable + cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address - uses: actions/cache@v3 with: path: ${{ github.workspace }}/deps - key: ${{ runner.os }}-rocky-deps-${{ hashFiles('**/CMakeLists.txt') }} + key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }} - uses: actions/cache@v3 with: path: ${{ github.workspace }}/buildtrees - key: ${{ runner.os }}-rocky-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} + key: ${{ runner.os }}-centos-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} - name: Build run: | - source /opt/rh/gcc-toolset-13/enable + source /opt/rh/devtoolset-10/enable cmake --build build --config ${{ env.BUILD_TYPE }} - - - name: Cleanup - run: | - rm -rf ./deps - rm -rf ./buildtrees - - name: Test working-directory: ${{ github.workspace }}/build run: ctest -C ${{ env.BUILD_TYPE }} - name: Unit Test working-directory: ${{ github.workspace }} - run: ./pikatests.sh all clean + run: ./pikatests.sh all - name: Start codis, pika master and pika slave working-directory: ${{ github.workspace }}/build @@ -145,7 +129,6 @@ jobs: ../tests/integration/start_master_and_slave.sh chmod +x ../tests/integration/start_codis.sh ../tests/integration/start_codis.sh - - name: Run Go E2E Tests working-directory: ${{ github.workspace }}/build run: | @@ -155,6 +138,78 @@ jobs: chmod +x integrate_test.sh sh integrate_test.sh + +# build_on_rocky: +# runs-on: ubuntu-latest +# container: +# image: rockylinux:9 +# +# steps: +# - name: Install deps +# run: | +# dnf update -y +# dnf install -y bash cmake wget git autoconf gcc perl-Digest-SHA tcl which tar g++ tar epel-release gcc-c++ libstdc++-devel gcc-toolset-13 +# +# - name: Set up Go +# uses: actions/setup-go@v5 +# with: +# go-version: 1.19 +# +# - name: Checkout +# uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# +# - name: Configure CMake +# run: | +# source /opt/rh/gcc-toolset-13/enable +# cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address . +# +# - uses: actions/cache@v3 +# with: +# path: ${{ github.workspace }}/deps +# key: ${{ runner.os }}-rocky-deps-${{ hashFiles('**/CMakeLists.txt') }} +# +# - uses: actions/cache@v3 +# with: +# path: ${{ github.workspace }}/buildtrees +# key: ${{ runner.os }}-rocky-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} +# +# - name: Build +# run: | +# source /opt/rh/gcc-toolset-13/enable +# cmake --build build --config ${{ env.BUILD_TYPE }} +# +# - name: Cleanup +# run: | +# rm -rf ./deps +# rm -rf ./buildtrees +# +# - name: Test +# working-directory: ${{ github.workspace }}/build +# run: ctest -C ${{ env.BUILD_TYPE }} +# +# - name: Unit Test +# working-directory: ${{ github.workspace }} +# run: ./pikatests.sh all clean +# +# - name: Start codis, pika master and pika slave +# working-directory: ${{ github.workspace }}/build +# run: | +# chmod +x ../tests/integration/start_master_and_slave.sh +# ../tests/integration/start_master_and_slave.sh +# chmod +x ../tests/integration/start_codis.sh +# ../tests/integration/start_codis.sh +# +# - name: Run Go E2E Tests +# working-directory: ${{ github.workspace }}/build +# run: | +# cd ../tools/pika_keys_analysis/ +# go test -v ./... +# cd ../../tests/integration/ +# chmod +x integrate_test.sh +# sh integrate_test.sh + build_on_macos: runs-on: macos-13 From c4c9322ee81d220d1c2787c6b92e3ae1c1ecebc5 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 16:16:49 +0800 Subject: [PATCH 02/15] add image version --- .github/workflows/pika.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index d04a6604c..2e6a0a9cc 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -88,7 +88,7 @@ jobs: build_on_centos: runs-on: ubuntu-latest container: - image: cheniujh/pika-ci-centos7 + image: cheniujh/pika-ci-centos7:v1 steps: - name: Checkout From a0036794e692c52dc90ce6f7e33ca547ec8afe14 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 16:30:02 +0800 Subject: [PATCH 03/15] change node js version to 14 --- .github/workflows/pika.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index 2e6a0a9cc..611cf7ccf 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -95,6 +95,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 + node-version: '14' - name: Configure CMake run: | From 8e6c9d392ce400a7fa09b28863603450f461e0d9 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 16:37:53 +0800 Subject: [PATCH 04/15] revised --- .github/workflows/pika.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index 611cf7ccf..89dddea9d 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -91,11 +91,16 @@ jobs: image: cheniujh/pika-ci-centos7:v1 steps: + - name: use SCL + run: | + sudo yum install centos-release-scl + sudo yum install devtoolset-9 + scl enable devtoolset-9 bash + - name: Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - node-version: '14' - name: Configure CMake run: | From 72b67a0d524387f96f22023ea0e61c758cbcd7b9 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 16:38:59 +0800 Subject: [PATCH 05/15] remove sudo --- .github/workflows/pika.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index 89dddea9d..bf515cb70 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -93,8 +93,8 @@ jobs: steps: - name: use SCL run: | - sudo yum install centos-release-scl - sudo yum install devtoolset-9 + yum install centos-release-scl + yum install devtoolset-9 scl enable devtoolset-9 bash - name: Checkout From 56ee655c24eb99f797c4530d364b3e249eb8bf11 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 17:25:05 +0800 Subject: [PATCH 06/15] change checkout version --- .github/workflows/pika.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index bf515cb70..093268deb 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -98,7 +98,7 @@ jobs: scl enable devtoolset-9 bash - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v1 with: fetch-depth: 0 From 97053353e9a96d6c3cf4db478ef41a91fa6e227e Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 17:26:07 +0800 Subject: [PATCH 07/15] revised --- .github/workflows/pika.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index 093268deb..b6fc7a667 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -91,12 +91,6 @@ jobs: image: cheniujh/pika-ci-centos7:v1 steps: - - name: use SCL - run: | - yum install centos-release-scl - yum install devtoolset-9 - scl enable devtoolset-9 bash - - name: Checkout uses: actions/checkout@v1 with: From b77a77eca406fa0631bf6bb7664f3209499a3c26 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Mon, 4 Nov 2024 21:39:38 +0800 Subject: [PATCH 08/15] use new pushed docker image --- .github/workflows/pika.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index b6fc7a667..a4b30b669 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -88,7 +88,7 @@ jobs: build_on_centos: runs-on: ubuntu-latest container: - image: cheniujh/pika-ci-centos7:v1 + image: cheniujh/pika-centos7-ci:v5 steps: - name: Checkout From 22a1581f9e3bff195d41e2f7a4074ce137e9328e Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Tue, 5 Nov 2024 09:41:58 +0800 Subject: [PATCH 09/15] try v2 cache and checkout --- .github/workflows/pika.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index a4b30b669..64fa6ac75 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -92,7 +92,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v2 with: fetch-depth: 0 @@ -105,7 +105,7 @@ jobs: path: ${{ github.workspace }}/deps key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }} - - uses: actions/cache@v3 + - uses: actions/cache@v2 with: path: ${{ github.workspace }}/buildtrees key: ${{ runner.os }}-centos-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} From bd56eb568de30d4e806db7cc630953f0e58ef21a Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Tue, 5 Nov 2024 09:43:09 +0800 Subject: [PATCH 10/15] revised checkout to v1 --- .github/workflows/pika.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index 64fa6ac75..cec046e73 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -92,7 +92,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v1 with: fetch-depth: 0 From 20960fdcaec792cb97ee8f6a7c2b5d0bda4defa1 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Tue, 5 Nov 2024 09:44:36 +0800 Subject: [PATCH 11/15] try cache v1 --- .github/workflows/pika.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index cec046e73..ddcdcb1c7 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -105,7 +105,7 @@ jobs: path: ${{ github.workspace }}/deps key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }} - - uses: actions/cache@v2 + - uses: actions/cache@v1 with: path: ${{ github.workspace }}/buildtrees key: ${{ runner.os }}-centos-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} From 67b91484c9bb61c0140d35a559e5394d94348f90 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Tue, 5 Nov 2024 09:46:35 +0800 Subject: [PATCH 12/15] try cache v1 again --- .github/workflows/pika.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index ddcdcb1c7..cf388acf7 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -100,7 +100,7 @@ jobs: run: | source /opt/rh/devtoolset-10/enable cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address - - uses: actions/cache@v3 + - uses: actions/cache@v1 with: path: ${{ github.workspace }}/deps key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }} From 39e5f22f3e41db74dd73527df63a9831aa5e5ff3 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Tue, 5 Nov 2024 09:48:06 +0800 Subject: [PATCH 13/15] cancel cache --- .github/workflows/pika.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index cf388acf7..8c31bc4d5 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -100,15 +100,15 @@ jobs: run: | source /opt/rh/devtoolset-10/enable cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address - - uses: actions/cache@v1 - with: - path: ${{ github.workspace }}/deps - key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }} - - - uses: actions/cache@v1 - with: - path: ${{ github.workspace }}/buildtrees - key: ${{ runner.os }}-centos-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} +# - uses: actions/cache@v1 +# with: +# path: ${{ github.workspace }}/deps +# key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }} +# +# - uses: actions/cache@v1 +# with: +# path: ${{ github.workspace }}/buildtrees +# key: ${{ runner.os }}-centos-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} - name: Build run: | From 7caef8e2fd034a6d2f5abd65d4473a89dac056e1 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Tue, 5 Nov 2024 10:43:07 +0800 Subject: [PATCH 14/15] add clean space logic --- .github/workflows/pika.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index 8c31bc4d5..fef4cc878 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -114,13 +114,19 @@ jobs: run: | source /opt/rh/devtoolset-10/enable cmake --build build --config ${{ env.BUILD_TYPE }} + + - name: Cleanup + run: | + rm -rf ./deps + rm -rf ./buildtrees + - name: Test working-directory: ${{ github.workspace }}/build run: ctest -C ${{ env.BUILD_TYPE }} - name: Unit Test working-directory: ${{ github.workspace }} - run: ./pikatests.sh all + run: ./pikatests.sh all clean - name: Start codis, pika master and pika slave working-directory: ${{ github.workspace }}/build From a0bce17a3601d3413f40b04b6455083daf345a95 Mon Sep 17 00:00:00 2001 From: cheniujh <1271435567@qq.com> Date: Wed, 6 Nov 2024 11:21:19 +0800 Subject: [PATCH 15/15] remove unnecessary comments --- .github/workflows/pika.yml | 80 -------------------------------------- 1 file changed, 80 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index fef4cc878..007f73aee 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -100,15 +100,6 @@ jobs: run: | source /opt/rh/devtoolset-10/enable cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -# - uses: actions/cache@v1 -# with: -# path: ${{ github.workspace }}/deps -# key: ${{ runner.os }}-centos-deps-${{ hashFiles('**/CMakeLists.txt') }} -# -# - uses: actions/cache@v1 -# with: -# path: ${{ github.workspace }}/buildtrees -# key: ${{ runner.os }}-centos-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} - name: Build run: | @@ -145,77 +136,6 @@ jobs: sh integrate_test.sh -# build_on_rocky: -# runs-on: ubuntu-latest -# container: -# image: rockylinux:9 -# -# steps: -# - name: Install deps -# run: | -# dnf update -y -# dnf install -y bash cmake wget git autoconf gcc perl-Digest-SHA tcl which tar g++ tar epel-release gcc-c++ libstdc++-devel gcc-toolset-13 -# -# - name: Set up Go -# uses: actions/setup-go@v5 -# with: -# go-version: 1.19 -# -# - name: Checkout -# uses: actions/checkout@v4 -# with: -# fetch-depth: 0 -# -# - name: Configure CMake -# run: | -# source /opt/rh/gcc-toolset-13/enable -# cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address . -# -# - uses: actions/cache@v3 -# with: -# path: ${{ github.workspace }}/deps -# key: ${{ runner.os }}-rocky-deps-${{ hashFiles('**/CMakeLists.txt') }} -# -# - uses: actions/cache@v3 -# with: -# path: ${{ github.workspace }}/buildtrees -# key: ${{ runner.os }}-rocky-buildtrees-${{ hashFiles('**/CMakeLists.txt') }} -# -# - name: Build -# run: | -# source /opt/rh/gcc-toolset-13/enable -# cmake --build build --config ${{ env.BUILD_TYPE }} -# -# - name: Cleanup -# run: | -# rm -rf ./deps -# rm -rf ./buildtrees -# -# - name: Test -# working-directory: ${{ github.workspace }}/build -# run: ctest -C ${{ env.BUILD_TYPE }} -# -# - name: Unit Test -# working-directory: ${{ github.workspace }} -# run: ./pikatests.sh all clean -# -# - name: Start codis, pika master and pika slave -# working-directory: ${{ github.workspace }}/build -# run: | -# chmod +x ../tests/integration/start_master_and_slave.sh -# ../tests/integration/start_master_and_slave.sh -# chmod +x ../tests/integration/start_codis.sh -# ../tests/integration/start_codis.sh -# -# - name: Run Go E2E Tests -# working-directory: ${{ github.workspace }}/build -# run: | -# cd ../tools/pika_keys_analysis/ -# go test -v ./... -# cd ../../tests/integration/ -# chmod +x integrate_test.sh -# sh integrate_test.sh - build_on_macos: runs-on: macos-13