Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/c-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,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 }} -B -P'with-c,enable-all-checks' -pl :plc4c -am ${{ 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,update-generated-code' -pl :plc4c -am ${{ steps.platform_opts.outputs.platform_opts }} install

- 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-c,skip-bacnet-regression-test' -pl :plc4c -am ${{ steps.platform_opts.outputs.platform_opts }} install
run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-c,skip-bacnet-regression-test,update-generated-code' -pl :plc4c -am ${{ steps.platform_opts.outputs.platform_opts }} install
4 changes: 2 additions & 2 deletions .github/workflows/go-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ 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 }} -B -P'with-go,enable-all-checks' -pl :plc4go -am ${{ 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,update-generated-code' -pl :plc4go -am ${{ steps.platform_opts.outputs.platform_opts }} install

- name: Upload Test Report (first failure)
uses: actions/upload-artifact@v3
Expand All @@ -192,7 +192,7 @@ jobs:

- 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-go,skip-bacnet-regression-test' -pl :plc4go -am ${{ steps.platform_opts.outputs.platform_opts }} install
run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-go,skip-bacnet-regression-test,update-generated-code' -pl :plc4go -am ${{ steps.platform_opts.outputs.platform_opts }} install

- name: Upload Test Report
uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/java-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ 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 }} -B -P'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,update-generated-code' ${{ steps.platform_opts.outputs.platform_opts }} install

- name: Upload Test Report (first failure)
uses: actions/upload-artifact@v3
Expand All @@ -145,7 +145,7 @@ jobs:

- 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'skip-bacnet-regression-test' ${{ steps.platform_opts.outputs.platform_opts }} install
run: ./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'skip-bacnet-regression-test,update-generated-code' ${{ steps.platform_opts.outputs.platform_opts }} install

- name: Upload Test Report
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:

- name: Run mvnw
run: |
./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
./mvnw${{ steps.platform_suffix.outputs.platform_suffix }} ${{ steps.extra_options.outputs.extra_options }} -B -P'with-sandbox,with-python,enable-all-checks,update-generated-code' -pl :plc4py -am ${{ steps.platform_opts.outputs.platform_opts }} install

# - name: Perform CodeQL Analysis
# uses: github/codeql-action/analyze@v2
288 changes: 148 additions & 140 deletions plc4c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,66 +42,6 @@
<option.with-proxies>OFF</option.with-proxies>
</properties>

<profiles>
<!-- When running on jenkins, download the sonar build-wrapper, so we can do a code analysis -->
<profile>
<id>jenkins-build</id>
<!-- This is needed by the groovy hack script -->
<properties>
<cmake.root>${project.build.directory}/dependency/cmake/bin</cmake.root>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<!-- Get the build-wrapper from our sonarcloud server -->
<execution>
<id>get-build-wrapper</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<skipCache>true</skipCache>
<url>https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
<skipCache>true</skipCache>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<executions>
<!-- rename the cmake binary and generate a script that adds the sonar build-wrapper -->
<execution>
<id>modify-cmake</id>
<phase>process-test-sources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>${project.basedir}/SonarcloudBuildWrapperHack.groovy</source>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -140,55 +80,6 @@
</execution-->
</executions>
</plugin>
<!--
Generate the driver code.
-->
<plugin>
<groupId>org.apache.plc4x.plugins</groupId>
<artifactId>plc4x-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-driver-modbus</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>modbus</protocolName>
<languageName>c</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/generated-sources</outputDir>
</configuration>
</execution>
<execution>
<id>generate-driver-plc4x</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>plc4x</protocolName>
<protocolVersion>0</protocolVersion>
<languageName>c</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/generated-sources</outputDir>
</configuration>
</execution>
<execution>
<id>generate-driver-s7</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>s7</protocolName>
<languageName>c</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/generated-sources</outputDir>
</configuration>
</execution>
</executions>
</plugin>

<!-- Transform the ParserSerializer tests into c code -->
<plugin>
Expand Down Expand Up @@ -379,37 +270,154 @@
</pluginManagement>
</build>

<!-- This dependency is just to ensure thrift is built first -->
<dependencies>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-code-generation-language-c</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<profiles>
<profile>
<id>update-generated-code</id>
<build>
<plugins>
<!--
Generate the driver code.
-->
<plugin>
<groupId>org.apache.plc4x.plugins</groupId>
<artifactId>plc4x-maven-plugin</artifactId>
<executions>
<execution>
<id>generate-driver-modbus</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>modbus</protocolName>
<languageName>c</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/generated-sources</outputDir>
</configuration>
</execution>
<execution>
<id>generate-driver-plc4x</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>plc4x</protocolName>
<protocolVersion>0</protocolVersion>
<languageName>c</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/generated-sources</outputDir>
</configuration>
</execution>
<execution>
<id>generate-driver-s7</id>
<phase>generate-sources</phase>
<goals>
<goal>generate-driver</goal>
</goals>
<configuration>
<protocolName>s7</protocolName>
<languageName>c</languageName>
<outputFlavor>read-write</outputFlavor>
<outputDir>${project.basedir}/generated-sources</outputDir>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>


<dependencies>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-code-generation-language-c</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-modbus</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-plc4x</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-s7</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
</dependencies>
</profile>

<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-modbus</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-plc4x</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4x-protocols-s7</artifactId>
<version>0.12.0-SNAPSHOT</version>
<!-- Scope is 'provided' as this way it's not shipped with the driver -->
<scope>provided</scope>
</dependency>
</dependencies>
<!-- When running on jenkins, download the sonar build-wrapper, so we can do a code analysis -->
<profile>
<id>jenkins-build</id>
<!-- This is needed by the groovy hack script -->
<properties>
<cmake.root>${project.build.directory}/dependency/cmake/bin</cmake.root>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.googlecode.maven-download-plugin</groupId>
<artifactId>download-maven-plugin</artifactId>
<executions>
<!-- Get the build-wrapper from our sonarcloud server -->
<execution>
<id>get-build-wrapper</id>
<phase>generate-sources</phase>
<goals>
<goal>wget</goal>
</goals>
<configuration>
<skipCache>true</skipCache>
<url>https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip</url>
<unpack>true</unpack>
<outputDirectory>${project.build.directory}</outputDirectory>
<skipCache>true</skipCache>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<executions>
<!-- rename the cmake binary and generate a script that adds the sonar build-wrapper -->
<execution>
<id>modify-cmake</id>
<phase>process-test-sources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>${project.basedir}/SonarcloudBuildWrapperHack.groovy</source>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.groovy</groupId>
<artifactId>groovy</artifactId>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading