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/17 03:03:15 UTC

[incubator-pegasus] branch master updated: fix(github): fix the conditions for file changes that trigger workflows (#1123)

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 d2773824d fix(github): fix the conditions for file changes that trigger workflows (#1123)
d2773824d is described below

commit d2773824d71304650eb0b5bdffb9ab460cd36eab
Author: Dan Wang <wa...@apache.org>
AuthorDate: Wed Aug 17 11:03:10 2022 +0800

    fix(github): fix the conditions for file changes that trigger workflows (#1123)
---
 .github/workflows/lint_and_test_cpp.yaml | 48 +++++++-------------------------
 1 file changed, 10 insertions(+), 38 deletions(-)

diff --git a/.github/workflows/lint_and_test_cpp.yaml b/.github/workflows/lint_and_test_cpp.yaml
index bfba00c58..b0f8e12ef 100644
--- a/.github/workflows/lint_and_test_cpp.yaml
+++ b/.github/workflows/lint_and_test_cpp.yaml
@@ -32,6 +32,13 @@ on:
       - 'v[0-9]+.*' # release branch
       - ci-test # testing branch for github action
       - '*dev'
+    paths:
+      - '.github/workflows/lint_and_test_cpp.yaml'
+      - 'CMakeLists.txt'
+      - 'run.sh'
+      - 'cmake_modules/**'
+      - 'src/**'
+      - 'thirdparty/**'
 
   # for manually triggering workflow
   workflow_dispatch:
@@ -68,13 +75,6 @@ jobs:
         id: changes
         with:
           filters: |
-            base:
-              - 'cmake_modules/**'
-              - 'CMakeLists.txt'
-              - 'run.sh'
-              - '.github/workflows/lint_and_test_cpp.yaml'
-            src:
-              - 'src/**'
             thirdparty:
               - 'thirdparty/**'
       - name: Unpack prebuilt third-parties
@@ -88,22 +88,19 @@ jobs:
           cmake -DCMAKE_BUILD_TYPE=Release -B build/
           cmake --build build/ -j $(nproc)
       - name: Compilation
-        if: steps.changes.outputs.base == 'true' || steps.changes.outputs.src == 'true' || steps.changes.outputs.thirdparty == 'true'
         run: |
           ccache -p
           ccache -z
           ./run.sh build --test --skip_thirdparty -j $(nproc) -t release
           ccache -s
       - name: Pack Server
-        if: steps.changes.outputs.base == 'true' || steps.changes.outputs.src == 'true' || steps.changes.outputs.thirdparty == 'true'
         run: ./run.sh pack_server
       - name: Pack Tools
-        if: steps.changes.outputs.base == 'true' || steps.changes.outputs.src == 'true' || steps.changes.outputs.thirdparty == 'true'
         run: ./run.sh pack_tools
       - name: Tar files
         run: |
           rm -rf thirdparty
-          tar -zcvhf release__builder.tar DSN_ROOT/ src/builder/bin src/builder/src/server/test/config.ini  --exclude='*CMakeFiles*'
+          tar -zcvhf release__builder.tar DSN_ROOT/ src/builder/bin src/builder/src/server/test/config.ini --exclude='*CMakeFiles*'
       - name: Upload Artifact
         uses: actions/upload-artifact@v3
         with:
@@ -182,13 +179,6 @@ jobs:
         id: changes
         with:
           filters: |
-            base:
-              - 'cmake_modules/**'
-              - 'CMakeLists.txt'
-              - 'run.sh'
-              - '.github/workflows/lint_and_test_cpp.yaml'
-            src:
-              - 'src/**'
             thirdparty:
               - 'thirdparty/**'
       - name: Unpack prebuilt third-parties
@@ -202,7 +192,6 @@ jobs:
           cmake -DCMAKE_BUILD_TYPE=Release -B build/
           cmake --build build/ -j $(nproc)
       - name: Compilation
-        if: steps.changes.outputs.base == 'true' || steps.changes.outputs.src == 'true' || steps.changes.outputs.thirdparty == 'true'
         run: |
           ccache -p
           ccache -z
@@ -211,7 +200,7 @@ jobs:
       - name: Tar files
         run: |
           rm -rf thirdparty
-          tar -zcvhf release_address_builder.tar DSN_ROOT/ src/builder/bin src/builder/src/server/test/config.ini  --exclude='*CMakeFiles*'
+          tar -zcvhf release_address_builder.tar DSN_ROOT/ src/builder/bin src/builder/src/server/test/config.ini --exclude='*CMakeFiles*'
       - name: Upload Artifact
         uses: actions/upload-artifact@v3
         with:
@@ -290,13 +279,6 @@ jobs:
         id: changes
         with:
           filters: |
-            base:
-              - 'cmake_modules/**'
-              - 'CMakeLists.txt'
-              - 'run.sh'
-              - '.github/workflows/lint_and_test_cpp.yaml'
-            src:
-              - 'src/**'
             thirdparty:
               - 'thirdparty/**'
       - name: Unpack prebuilt third-parties
@@ -310,7 +292,6 @@ jobs:
           cmake -DCMAKE_BUILD_TYPE=Release -B build/
           cmake --build build/ -j $(nproc)
       - name: Compilation
-        if: steps.changes.outputs.base == 'true' || steps.changes.outputs.src == 'true' || steps.changes.outputs.thirdparty == 'true'
         run: |
           ccache -p
           ccache -z
@@ -319,7 +300,7 @@ jobs:
       - name: Tar files
         run: |
           rm -rf thirdparty
-          tar -zcvhf release_undefined_builder.tar DSN_ROOT/ src/builder/bin src/builder/src/server/test/config.ini  --exclude='*CMakeFiles*'
+          tar -zcvhf release_undefined_builder.tar DSN_ROOT/ src/builder/bin src/builder/src/server/test/config.ini --exclude='*CMakeFiles*'
       - name: Upload Artifact
         uses: actions/upload-artifact@v3
         with:
@@ -412,16 +393,7 @@ jobs:
           mkdir -p build
           cmake -DCMAKE_BUILD_TYPE=Release -B build/ -DMACOS_OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
           cmake --build build/ -j $(sysctl -n hw.physicalcpu)
-      - uses: dorny/paths-filter@v2
-        id: changes
-        with:
-          filters: |
-            src:
-              - 'src/**'
-            thirdparty:
-              - 'thirdparty/**'
       - name: Compilation
-        if: steps.changes.outputs.src == 'true' || steps.changes.outputs.thirdparty == 'true'
         run: |
           ccache -p
           ccache -z


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