You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pegasus.apache.org by wa...@apache.org on 2022/08/24 13:12:06 UTC

[incubator-pegasus] branch master updated: fix(actions): build unit tests with portable rocksdb (#1136)

This is an automated email from the ASF dual-hosted git repository.

wangdan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d09eb7a9 fix(actions): build unit tests with portable rocksdb (#1136)
3d09eb7a9 is described below

commit 3d09eb7a9ad539e1b561212705a7bed1c06ca911
Author: Dan Wang <wa...@apache.org>
AuthorDate: Wed Aug 24 21:12:01 2022 +0800

    fix(actions): build unit tests with portable rocksdb (#1136)
---
 .github/workflows/lint_and_test_cpp.yaml      | 18 +++++++++++++++---
 .github/workflows/thirdparty-regular-push.yml | 15 ++++++++++++++-
 docker/thirdparties-bin/Dockerfile            |  3 ++-
 3 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/lint_and_test_cpp.yaml b/.github/workflows/lint_and_test_cpp.yaml
index b0f8e12ef..67d0c0c86 100644
--- a/.github/workflows/lint_and_test_cpp.yaml
+++ b/.github/workflows/lint_and_test_cpp.yaml
@@ -34,6 +34,9 @@ on:
       - '*dev'
     paths:
       - '.github/workflows/lint_and_test_cpp.yaml'
+      - '.github/workflows/thirdparty-regular-push.yml'
+      - 'docker/thirdparties-src/**'
+      - 'docker/thirdparties-bin/**'
       - 'CMakeLists.txt'
       - 'run.sh'
       - 'cmake_modules/**'
@@ -76,6 +79,9 @@ jobs:
         with:
           filters: |
             thirdparty:
+              - '.github/workflows/thirdparty-regular-push.yml'
+              - 'docker/thirdparties-src/**'
+              - 'docker/thirdparties-bin/**'
               - 'thirdparty/**'
       - name: Unpack prebuilt third-parties
         if: steps.changes.outputs.thirdparty == 'false'
@@ -85,7 +91,7 @@ jobs:
         working-directory: thirdparty
         run: |
           mkdir build
-          cmake -DCMAKE_BUILD_TYPE=Release -B build/
+          cmake -DCMAKE_BUILD_TYPE=Release -DROCKSDB_PORTABLE=ON -B build/
           cmake --build build/ -j $(nproc)
       - name: Compilation
         run: |
@@ -180,6 +186,9 @@ jobs:
         with:
           filters: |
             thirdparty:
+              - '.github/workflows/thirdparty-regular-push.yml'
+              - 'docker/thirdparties-src/**'
+              - 'docker/thirdparties-bin/**'
               - 'thirdparty/**'
       - name: Unpack prebuilt third-parties
         if: steps.changes.outputs.thirdparty == 'false'
@@ -189,7 +198,7 @@ jobs:
         working-directory: thirdparty
         run: |
           mkdir build
-          cmake -DCMAKE_BUILD_TYPE=Release -B build/
+          cmake -DCMAKE_BUILD_TYPE=Release -DROCKSDB_PORTABLE=ON -B build/
           cmake --build build/ -j $(nproc)
       - name: Compilation
         run: |
@@ -280,6 +289,9 @@ jobs:
         with:
           filters: |
             thirdparty:
+              - '.github/workflows/thirdparty-regular-push.yml'
+              - 'docker/thirdparties-src/**'
+              - 'docker/thirdparties-bin/**'
               - 'thirdparty/**'
       - name: Unpack prebuilt third-parties
         if: steps.changes.outputs.thirdparty == 'false'
@@ -289,7 +301,7 @@ jobs:
         working-directory: thirdparty
         run: |
           mkdir build
-          cmake -DCMAKE_BUILD_TYPE=Release -B build/
+          cmake -DCMAKE_BUILD_TYPE=Release -DROCKSDB_PORTABLE=ON -B build/
           cmake --build build/ -j $(nproc)
       - name: Compilation
         run: |
diff --git a/.github/workflows/thirdparty-regular-push.yml b/.github/workflows/thirdparty-regular-push.yml
index 280d5caec..c00cfce7d 100644
--- a/.github/workflows/thirdparty-regular-push.yml
+++ b/.github/workflows/thirdparty-regular-push.yml
@@ -66,6 +66,7 @@ jobs:
 
   build_push_bin_docker_images:
     runs-on: ubuntu-latest
+    needs: build_push_src_docker_images
     strategy:
       fail-fast: false
       matrix:
@@ -86,7 +87,7 @@ jobs:
         with:
           username: ${{ secrets.DOCKERHUB_USER }}
           password: ${{ secrets.DOCKERHUB_TOKEN }}
-      - name: Build and push
+      - name: Build and push for production
         uses: docker/build-push-action@v2.10.0
         with:
           context: .
@@ -97,5 +98,17 @@ jobs:
           build-args: |
             GITHUB_BRANCH=${{ github.ref_name }}
             OS_VERSION=${{ matrix.osversion }}
+      - name: Build and push for test
+        uses: docker/build-push-action@v2.10.0
+        with:
+          context: .
+          file: ./docker/thirdparties-bin/Dockerfile
+          push: true
+          tags: |
+            apache/pegasus:thirdparties-bin-test-${{ matrix.osversion }}-${{ github.ref_name }}
+          build-args: |
+            GITHUB_BRANCH=${{ github.ref_name }}
+            OS_VERSION=${{ matrix.osversion }}
+            ROCKSDB_PORTABLE=ON
       - name: Image digest
         run: echo ${{ steps.docker_build.outputs.digest }}
diff --git a/docker/thirdparties-bin/Dockerfile b/docker/thirdparties-bin/Dockerfile
index eda3eddfd..3033a7cdb 100644
--- a/docker/thirdparties-bin/Dockerfile
+++ b/docker/thirdparties-bin/Dockerfile
@@ -26,10 +26,11 @@ COPY --from=builder /root/thirdparties-src.zip /root/thirdparties-src.zip
 
 ARG GITHUB_BRANCH=master
 ARG GITHUB_REPOSITORY_URL=https://github.com/apache/incubator-pegasus.git
+ARG ROCKSDB_PORTABLE=OFF
 RUN git clone --depth=1 --branch=${GITHUB_BRANCH} ${GITHUB_REPOSITORY_URL} \
     && cd incubator-pegasus/thirdparty \
     && unzip /root/thirdparties-src.zip -d . \
-    && cmake -DCMAKE_BUILD_TYPE=Release -DROCKSDB_PORTABLE=OFF -B build/ . \
+    && cmake -DCMAKE_BUILD_TYPE=Release -DROCKSDB_PORTABLE=${ROCKSDB_PORTABLE} -B build/ . \
     && cmake --build build/ -j $(($(nproc)/2+1)) \
     && zip -r ~/thirdparties-bin.zip output/ build/Source/rocksdb/cmake build/Source/http-parser build/Source/hadoop build/Download/zookeeper \
     && cd ~ \


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pegasus.apache.org
For additional commands, e-mail: commits-help@pegasus.apache.org