You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2023/01/01 11:05:01 UTC

[plc4x] branch develop updated: feat(build): Update build files to only build a language if something changes

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

hutcheb pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new 2a508d60eb feat(build): Update build files to only build a language if something changes
2a508d60eb is described below

commit 2a508d60ebd4dc356c8f6852e00e7ce1481c3878
Author: Ben Hutcheson <be...@gmail.com>
AuthorDate: Sun Jan 1 12:01:46 2023 +0100

    feat(build): Update build files to only build a language if something changes
---
 .../workflows/{ensure-platforms.yml => c-platform.yml}    | 15 ++++++++++-----
 .../workflows/{ensure-platforms.yml => go-platform.yml}   | 15 ++++++++++-----
 .../workflows/{ensure-platforms.yml => java-platform.yml} | 13 +++++++++----
 .github/workflows/python-build.yml                        |  2 +-
 4 files changed, 30 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/ensure-platforms.yml b/.github/workflows/c-platform.yml
similarity index 87%
copy from .github/workflows/ensure-platforms.yml
copy to .github/workflows/c-platform.yml
index cfa84b988e..dbe5aa6d0a 100644
--- a/.github/workflows/ensure-platforms.yml
+++ b/.github/workflows/c-platform.yml
@@ -16,10 +16,15 @@
 # specific language governing permissions and limitations
 # under the License.
 # ----------------------------------------------------------------------------
-name: "Platform compatibility"
+name: "Go Platform compatibility"
 
 on:
   push:
+    branches: [ "develop", "plc4c" ]
+    paths:
+      - code-generation/**
+      - protocols/**
+      - plc4c**
   workflow_dispatch:
     inputs:
       forceUpdates:
@@ -32,7 +37,7 @@ jobs:
     strategy:
       matrix:
         # 8 not anymore supported for building
-        java: [ 11, 17 ]
+        java: [ 17 ]
         os: [ ubuntu-latest, macos-latest, windows-latest ]
       fail-fast: false
     runs-on: ${{ matrix.os }}
@@ -112,8 +117,8 @@ jobs:
       # Note: due to github has no concept of recovering from a fail even if we have our fallback below we append a second un-parallel run behind this to be sure that it works with all checks. Only if that fails too we are ok with a "red" (which should be yellow) cross indicating a problem
       - name: Run mvnw
         run: |
-          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -T 1C -B -P'with-sandbox,with-c,with-go,enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install || ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-c,with-go,enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install
+          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-c,enable-all-checks' -pl :plc4c -am ${{ steps.platform_opts.outputs.platform_opts }} install
 
-      - name: Run mvnv unparallel
+      - name: Run mvnv without BacNet regression tests
         if: ${{ failure() }}
-        run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-c,with-go,skip-bacnet-regression-test' ${{ steps.platform_opts.outputs.platform_opts }} install
\ No newline at end of file
+        run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-c,skip-bacnet-regression-test' -pl :plc4c -am ${{ steps.platform_opts.outputs.platform_opts }} install
\ No newline at end of file
diff --git a/.github/workflows/ensure-platforms.yml b/.github/workflows/go-platform.yml
similarity index 87%
copy from .github/workflows/ensure-platforms.yml
copy to .github/workflows/go-platform.yml
index cfa84b988e..8369158423 100644
--- a/.github/workflows/ensure-platforms.yml
+++ b/.github/workflows/go-platform.yml
@@ -16,10 +16,15 @@
 # specific language governing permissions and limitations
 # under the License.
 # ----------------------------------------------------------------------------
-name: "Platform compatibility"
+name: "Go Platform compatibility"
 
 on:
   push:
+    branches: [ "develop", "plc4go" ]
+    paths:
+      - code-generation/**
+      - protocols/**
+      - plc4go**
   workflow_dispatch:
     inputs:
       forceUpdates:
@@ -32,7 +37,7 @@ jobs:
     strategy:
       matrix:
         # 8 not anymore supported for building
-        java: [ 11, 17 ]
+        java: [ 17 ]
         os: [ ubuntu-latest, macos-latest, windows-latest ]
       fail-fast: false
     runs-on: ${{ matrix.os }}
@@ -112,8 +117,8 @@ jobs:
       # Note: due to github has no concept of recovering from a fail even if we have our fallback below we append a second un-parallel run behind this to be sure that it works with all checks. Only if that fails too we are ok with a "red" (which should be yellow) cross indicating a problem
       - name: Run mvnw
         run: |
-          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -T 1C -B -P'with-sandbox,with-c,with-go,enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install || ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-c,with-go,enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install
+          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-go,enable-all-checks' -pl :plc4go -am ${{ steps.platform_opts.outputs.platform_opts }} install
 
-      - name: Run mvnv unparallel
+      - name: Run mvnv without BacNet regression tests
         if: ${{ failure() }}
-        run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-c,with-go,skip-bacnet-regression-test' ${{ steps.platform_opts.outputs.platform_opts }} install
\ No newline at end of file
+        run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-go,skip-bacnet-regression-test' -pl :plc4go -am ${{ steps.platform_opts.outputs.platform_opts }} install
\ No newline at end of file
diff --git a/.github/workflows/ensure-platforms.yml b/.github/workflows/java-platform.yml
similarity index 86%
rename from .github/workflows/ensure-platforms.yml
rename to .github/workflows/java-platform.yml
index cfa84b988e..dc16d624e3 100644
--- a/.github/workflows/ensure-platforms.yml
+++ b/.github/workflows/java-platform.yml
@@ -16,10 +16,15 @@
 # specific language governing permissions and limitations
 # under the License.
 # ----------------------------------------------------------------------------
-name: "Platform compatibility"
+name: "Go Platform compatibility"
 
 on:
   push:
+    branches: [ "develop", "plc4j" ]
+    paths:
+      - code-generation/**
+      - protocols/**
+      - plc4j**
   workflow_dispatch:
     inputs:
       forceUpdates:
@@ -112,8 +117,8 @@ jobs:
       # Note: due to github has no concept of recovering from a fail even if we have our fallback below we append a second un-parallel run behind this to be sure that it works with all checks. Only if that fails too we are ok with a "red" (which should be yellow) cross indicating a problem
       - name: Run mvnw
         run: |
-          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -T 1C -B -P'with-sandbox,with-c,with-go,enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install || ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-c,with-go,enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install
+          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'enable-all-checks' ${{ steps.platform_opts.outputs.platform_opts }} install
 
-      - name: Run mvnv unparallel
+      - name: Run mvnv without BacNet regression tests
         if: ${{ failure() }}
-        run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-c,with-go,skip-bacnet-regression-test' ${{ steps.platform_opts.outputs.platform_opts }} install
\ No newline at end of file
+        run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'skip-bacnet-regression-test' ${{ steps.platform_opts.outputs.platform_opts }} install
\ No newline at end of file
diff --git a/.github/workflows/python-build.yml b/.github/workflows/python-build.yml
index 59cdd290f4..ba48fb6bad 100644
--- a/.github/workflows/python-build.yml
+++ b/.github/workflows/python-build.yml
@@ -133,6 +133,6 @@ jobs:
 
       - name: Run mvnw
         run: |
-          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -T 1C -B -P'with-sandbox,with-python' -pl :plc4py -am ${{ steps.platform_opts.outputs.platform_opts }} install || ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-python' -pl :plc4py -am ${{ steps.platform_opts.outputs.platform_opts }} install
+          ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-python,enable-all-checks' -pl :plc4py -am ${{ steps.platform_opts.outputs.platform_opts }} install