From 48bc4b522567daca32f59c6623d1f8e95e0cb684 Mon Sep 17 00:00:00 2001 From: Mixficsol <838844609@qq.com> Date: Mon, 17 Jul 2023 00:30:50 +0800 Subject: [PATCH 1/2] Supports compilation on Centos --- .github/workflows/pika.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index d32c218ad..f0a65d74a 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -76,8 +76,7 @@ jobs: # You can convert this to a matrix build if you need cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ubuntu-latest - container: - image: centos:7 + container: docker.io/centos:7 steps: - name: Install deps From 1a070a32ef2b778743b78c4d354cbbaa4157d53b Mon Sep 17 00:00:00 2001 From: Mixficsol <838844609@qq.com> Date: Mon, 17 Jul 2023 00:39:09 +0800 Subject: [PATCH 2/2] Add test --- .github/workflows/pika.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index f0a65d74a..09ccf1ffe 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -79,10 +79,22 @@ jobs: container: docker.io/centos:7 steps: + - uses: actions/checkout@v3 + + - name: cache dependencies + uses: actions/cache@v2 + id: cache + with: + path: | + ${{ github.workspace }}/${{ env.INSTALL_LOCATION }} + ~/.cache/pip + key: ${{ runner.os }}-dependencies + - name: Install deps # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: | + yum install -y wget tar gcc automake autoconf libtool make yum install -y wget git autoconf centos-release-scl yum install -y devtoolset-10-gcc devtoolset-10-gcc-c++ devtoolset-10-make devtoolset-10-bin-util yum install -y llvm-toolset-7 @@ -90,6 +102,10 @@ jobs: source /opt/rh/devtoolset-10/enable gcc --version make --version + + yum install -y python3 + python3 --version + python3 -m pip install redis - name: Install cmake @@ -128,3 +144,19 @@ jobs: source /opt/rh/devtoolset-10/enable ctest -C ${{env.BUILD_TYPE}} + - name: Unit Test + working-directory: ${{github.workspace}} + run: | + ./pikatests.sh all + + # master on port 9221, slave on port 9231, all with 2 db + - name: Start pika master and slave + working-directory: ${{github.workspace}}/build + run: | + chmod +x ../tests/integration/start_master_and_slave.sh + ../tests/integration/start_master_and_slave.sh + + - name: Run Python E2E Tests + working-directory: ${{github.workspace}}/build + run: | + python3 ../tests/integration/pika_replication_test.py