瀏覽代碼

HPCC-27428 Switch to use changed_modules action

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
Gordon Smith 3 年之前
父節點
當前提交
2c54c85b39

+ 1 - 1
.github/workflows/build-and-publish-debug.yml

@@ -15,7 +15,7 @@ on:
 jobs:
   build:
     name: "Build and publish debug container"
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     if: github.repository == 'hpcc-systems/HPCC-Platform'
     steps:
       - name: Checkout

+ 3 - 3
.github/workflows/build-and-publish.yml

@@ -15,7 +15,7 @@ on:
 jobs:
   build:
     name: "Build and publish release container"
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     if: github.repository == 'hpcc-systems/HPCC-Platform'
     steps:
       - name: Checkout
@@ -29,7 +29,7 @@ jobs:
 
   ml-builds:
     needs: build
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     if: github.repository == 'hpcc-systems/HPCC-Platform'
     strategy:
       matrix:
@@ -47,7 +47,7 @@ jobs:
 
   ln-builds:
     needs: build
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     if: github.repository == 'hpcc-systems/HPCC-Platform'
     steps:
     - name: Checkout

+ 5 - 6
.github/workflows/build-containers-pr.yml

@@ -18,21 +18,20 @@ on:
 jobs:
   check-skip:
     # continue-on-error: true # Uncomment once integration is finished
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     # Map a step output to a job output
     outputs:
-      should_skip: ${{ steps.skip_check.outputs.should_skip }}
+      changed: ${{ steps.skip_check.outputs.dockerfiles || steps.skip_check.outputs.platform }}
     steps:
       - id: skip_check
-        uses: hpcc-systems/skip-duplicate-actions@master
+        uses: hpcc-systems/github-actions/changed-modules@main
         with:
           github_token: ${{ github.token }}
-          paths_ignore: '["clienttools/**", "devdoc/**", "docs/**", "helm/**", "initfiles/**" ]'
 
   build-images:
     needs: check-skip
-    if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
-    runs-on: ubuntu-latest
+    if: ${{ needs.check-skip.outputs.changed }}
+    runs-on: ubuntu-20.04
     steps:
       - name: vars
         id: vars

+ 5 - 6
.github/workflows/build-containers-target-branch.yml

@@ -18,21 +18,20 @@ on:
 jobs:
   check-skip:
     # continue-on-error: true # Uncomment once integration is finished
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     # Map a step output to a job output
     outputs:
-      should_skip: ${{ steps.skip_check.outputs.should_skip }}
+      changed: ${{ steps.skip_check.outputs.dockerfiles || steps.skip_check.outputs.platform }}
     steps:
       - id: skip_check
-        uses: hpcc-systems/skip-duplicate-actions@master
+        uses: hpcc-systems/github-actions/changed-modules@main
         with:
           github_token: ${{ github.token }}
-          paths_ignore: '["clienttools/**", "devdoc/**", "docs/**", "helm/**", "initfiles/**" ]'
 
   build-images:
     needs: check-skip
-    if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
-    runs-on: ubuntu-latest
+    if: ${{ needs.check-skip.outputs.changed }}
+    runs-on: ubuntu-20.04
     steps:
       - name: vars
         id: vars

+ 9 - 20
.github/workflows/build-test-eclwatch.yml

@@ -1,15 +1,6 @@
 name: Build Test ECL Watch
 
 on:
-  push:
-    branches:
-      - "master"
-      - "candidate-*"
-      - "!candidate-7.6.*"
-      - "!candidate-7.4.*"
-      - "!candidate-7.2.*"
-      - "!candidate-7.0.*"
-      - "!candidate-6.*"
   pull_request:
     branches:
       - "master"
@@ -22,16 +13,14 @@ on:
 
 jobs:
   pre_job:
-    runs-on: ubuntu-latest
-    # Map a step output to a job output
+    runs-on: ubuntu-20.04
     outputs:
-      should_skip: ${{ steps.skip_check.outputs.should_skip }}
+      eclwatch: ${{ steps.skip_check.outputs.eclwatch }}
     steps:
       - id: skip_check
-        uses: hpcc-systems/skip-duplicate-actions@master
+        uses: hpcc-systems/github-actions/changed-modules@main
         with:
           github_token: ${{ github.token }}
-          paths: '["esp/src/**/*", ".github/workflows/build-test-eclwatch.yml"]'
 
   build:
     strategy:
@@ -40,8 +29,8 @@ jobs:
       fail-fast: false
     name: "Check eclwatch and npm"
     needs: pre_job
-    if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.repository == 'hpcc-systems/HPCC-Platform' }}
-    runs-on: ubuntu-latest
+    if: ${{ needs.pre_job.outputs.eclwatch }}
+    runs-on: ubuntu-20.04
     steps:
       - uses: actions/checkout@v2
         with:
@@ -50,12 +39,12 @@ jobs:
         with:
           node-version: ${{ matrix.node }}
       - name: Cache node modules
-        uses: actions/cache@v1
+        uses: actions/cache@v2
         with:
-          path: node_modules
-          key: npm-deps-${{ hashFiles('package-lock.json') }}
+          path: ./esp/src/node_modules
+          key: npm-deps-${{ hashFiles('./esp/src/package-lock.json') }}
           restore-keys: |
-            npm-deps-${{ hashFiles('package-lock.json') }}
+            npm-deps-${{ hashFiles('./esp/src/package-lock.json') }}
       - name: Install Dependencies
         working-directory: ./esp/src
         run: npm ci

+ 11 - 13
.github/workflows/build-vcpkg.yml

@@ -18,17 +18,14 @@ on:
 
 jobs:
   check-skip:
-    # continue-on-error: true # Uncomment once integration is finished
     runs-on: ubuntu-20.04
-    # Map a step output to a job output
     outputs:
-      should_skip: ${{ steps.skip_check.outputs.should_skip }}
+      platform: ${{ steps.skip_check.outputs.platform }}
     steps:
       - id: skip_check
-        uses: hpcc-systems/skip-duplicate-actions@master
+        uses: hpcc-systems/github-actions/changed-modules@main
         with:
           github_token: ${{ github.token }}
-          paths_ignore: '["docs/**", "esp/src/**/*", "dockerfiles/**", "helm/**", "ecllibrary/**", "testing/**", "initfiles/**" ]'
 
   build:
     strategy:
@@ -70,9 +67,10 @@ jobs:
         run: |
           echo ${{ matrix.os }} ${{ matrix.triplet }}
           echo "Checkout to $Env:GITHUB_WORKSPACE"
+          echo "Platform Changed:  ${{ needs.check-skip.outputs.platform }}"
 
       - name: Ubuntu Dependencies
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' && matrix.os == 'ubuntu-20.04' }}
+        if: ${{ needs.check-skip.outputs.platform && matrix.os == 'ubuntu-20.04' }}
         shell: "bash"
         run: |
           sudo apt-get update -y
@@ -88,33 +86,33 @@ jobs:
           sudo apt-get install -y nodejs
 
       - name: OSX Dependencies
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' && matrix.os == 'macos-11' }}
+        if: ${{ needs.check-skip.outputs.platform && matrix.os == 'macos-11' }}
         shell: "bash"
         run: |
           brew install bison flex pkg-config automake libtool cmake
 
       - name: "Remove builtin vcpkg"
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
+        if: ${{ needs.check-skip.outputs.platform }}
         working-directory: .
         shell: "bash"
         run: |
           ${{ matrix.sudo }} rm -rf "$VCPKG_INSTALLATION_ROOT"
 
       - name: Check out source code
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
+        if: ${{ needs.check-skip.outputs.platform }}
         uses: actions/checkout@v2
         with:
           submodules: recursive
 
       - name: "vcpkg Bootstrap"
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
+        if: ${{ needs.check-skip.outputs.platform }}
         working-directory: .
         shell: "bash"
         run: |
           ./vcpkg/bootstrap-vcpkg.sh
 
       - name: "Setup NuGet credentials"
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
+        if: ${{ needs.check-skip.outputs.platform }}
         working-directory: ./vcpkg
         shell: "bash"
         run: |
@@ -130,7 +128,7 @@ jobs:
             -source "https://nuget.pkg.github.com/hpcc-systems/index.json"
 
       - name: "Generate HPCC-Platform Build Files"
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
+        if: ${{ needs.check-skip.outputs.platform }}
         working-directory: .
         shell: "bash"
         run: |
@@ -139,7 +137,7 @@ jobs:
           cmake .. -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake ${{ matrix.cmake_config_options }}
 
       - name: "Build HPCC-Platform"
-        if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
+        if: ${{ needs.check-skip.outputs.platform }}
         working-directory: ./build
         shell: "bash"
         run: |

+ 5 - 6
.github/workflows/codeql-eclwatch.yml

@@ -24,16 +24,15 @@ on:
 
 jobs:
   pre_job:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     # Map a step output to a job output
     outputs:
-      should_skip: ${{ steps.skip_check.outputs.should_skip }}
+      eclwatch: ${{ steps.skip_check.outputs.eclwatch }}
     steps:
       - id: skip_check
-        uses: hpcc-systems/skip-duplicate-actions@master
+        uses: hpcc-systems/github-actions/changed-modules@main
         with:
           github_token: ${{ github.token }}
-          paths: '["esp/eclwatch/**/*", "esp/src/**/*", ".github/workflows/codeql-eclwatch.yml"]'
 
   analyze:
     name: Analyze
@@ -47,8 +46,8 @@ jobs:
         # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
 
     needs: pre_job
-    if: ${{ needs.pre_job.outputs.should_skip != 'true' && github.repository == 'hpcc-systems/HPCC-Platform' }}
-    runs-on: ubuntu-latest
+    if: ${{ needs.pre_job.outputs.eclwatch && github.repository == 'hpcc-systems/HPCC-Platform' }}
+    runs-on: ubuntu-20.04
 
     steps:
       - name: Checkout repository

+ 1 - 1
.github/workflows/jirabot.yml

@@ -12,7 +12,7 @@ on:
 
 jobs:
   jirabot:
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     steps:
       - uses: "actions/setup-python@v2"
         with:

+ 1 - 1
.github/workflows/nightly-publish.yml

@@ -6,7 +6,7 @@ on:
 jobs:
   build:
     name: "Nightly build and publish release container"
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     if: github.repository == 'hpcc-systems/HPCC-Platform'
     steps:
       - name: vars

+ 7 - 8
.github/workflows/smoketest.yml

@@ -48,22 +48,22 @@ on:
 jobs:
   check-skip:
     # continue-on-error: true # Uncomment once integration is finished
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     # Map a step output to a job output
     outputs:
-      should_skip: ${{ steps.skip_check.outputs.should_skip }}
+      platform: ${{ steps.skip_check.outputs.platform }}
+      eclwatch: ${{ steps.skip_check.outputs.eclwatch }}
     steps:
       - id: skip_check
         if: ${{ ! contains(github.event.pull_request.labels.*.name, 'smoketest-force-rerun') }}
-        uses: hpcc-systems/skip-duplicate-actions@master
+        uses: hpcc-systems/github-actions/changed-modules@main
         with:
           github_token: ${{ github.token }}
-          paths_ignore: '["clienttools/**", "devdoc/**", "dockerfiles/**", "docs/**", "helm/**" ]'
 
   build-and-setup:
     name: Build platform and regress setup
     needs: check-skip
-    if: ${{ needs.check-skip.outputs.should_skip != 'true' }}
+    if: ${{ needs.check-skip.outputs.platform || needs.check-skip.outputs.eclwatch }}
     runs-on: ubuntu-20.04
     timeout-minutes: 150 # the build step has its own timeout, however the job can sometimes take time to download dependencies
     outputs:
@@ -388,7 +388,7 @@ jobs:
   # TODO: needs to process results, capture report, to be assembled by workflow when all jobs done
   regression-jobs:
     needs: build-and-setup
-    if: ${{ needs.build-and-setup.outputs.cache-state != '' && github.event_name == 'pull_request' }}
+    if: ${{ needs.build-and-setup.outputs.cache-state != '' && github.event_name == 'pull_request' && needs.check-skip.outputs.platform }}
     timeout-minutes: 60 # each matrix step has its own timeout, however the job can sometimes take time to download dependencies
     runs-on: ubuntu-20.04
     strategy:
@@ -518,7 +518,7 @@ jobs:
   # but as this is relatively quick and in parallel with others, it probably doesn't matter
   eclwatch-ui-tests:
     needs: build-and-setup
-    if: ${{ needs.build-and-setup.outputs.cache-state != '' && github.event_name == 'pull_request' }}
+    if: ${{ needs.build-and-setup.outputs.cache-state != '' && github.event_name == 'pull_request' && needs.check-skip.outputs.eclwatch }}
     timeout-minutes: 30 # the ui-tests run step has its own timeout, however the job can sometimes take time to download dependencies
     runs-on: ubuntu-20.04
     steps:
@@ -601,4 +601,3 @@ jobs:
         name: ECLWatchUiTest
         path: install/test-ui/eclWatchUiTest.log
         if-no-files-found: error
-

+ 1 - 1
.github/workflows/test-eclhelper.yml

@@ -9,7 +9,7 @@ on:
 jobs:
   build:
     name: "Check eclhelper interface"
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     steps:
       - name: Checkout pr
         uses: actions/checkout@v2

+ 5 - 6
.github/workflows/test-helm.yml

@@ -25,21 +25,20 @@ on:
 jobs:
   pre_job:
      # continue-on-error: true # Uncomment once integration is finished
-     runs-on: ubuntu-latest
+     runs-on: ubuntu-20.04
      # Map a step output to a job output
      outputs:
-       should_skip: ${{ steps.skip_check.outputs.should_skip }}
+       helm: ${{ steps.skip_check.outputs.helm }}
      steps:
        - id: skip_check
-         uses: hpcc-systems/skip-duplicate-actions@master
+         uses: hpcc-systems/github-actions/changed-modules@main
          with:
            github_token: ${{ github.token }}
-           paths: '["helm/**/*", "testing/helm/**/*" ]'
   build:
     name: "Check helm chart lint"
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-20.04
     needs: pre_job
-    if: ${{ github.repository == 'hpcc-systems/HPCC-Platform' && needs.pre_job.outputs.should_skip != 'true' }}
+    if: ${{ github.repository == 'hpcc-systems/HPCC-Platform' && needs.pre_job.outputs.helm }}
     steps:
       - uses: actions/checkout@v2
         with: