Skip to content

Commit d207a13

Browse files
committed
Speed up CodeQL Java pipeline
We can save time by not compiling C code, since that's checked in the C pipeline, as well as disabling some Maven plugins.
1 parent 1de756b commit d207a13

4 files changed

Lines changed: 52 additions & 2 deletions

File tree

‎.github/workflows/codeql-analysis-java.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454

5555
- run: |
5656
echo "Build junixsocket with Maven (no tests)"
57-
mvn clean install -Pcodeql
57+
mvn clean install -Pcodeql -Pcodeql-skip-c
5858
5959
- name: Perform CodeQL Analysis
6060
uses: github/codeql-action/analyze@v2

‎junixsocket-native/pom.xml‎

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
</plugins>
111111
</build>
112112
</profile>
113-
114113
<profile>
115114
<id>custom-build-directory</id>
116115
<activation>
@@ -122,6 +121,49 @@
122121
<directory>${junixsocket.build.directory}</directory>
123122
</build>
124123
</profile>
124+
<profile>
125+
<id>codeql-skip-c</id>
126+
<build>
127+
<plugins>
128+
<plugin>
129+
<groupId>org.apache.maven.plugins</groupId>
130+
<artifactId>maven-surefire-plugin</artifactId>
131+
<configuration>
132+
<skip>true</skip>
133+
</configuration>
134+
</plugin>
135+
<plugin>
136+
<groupId>com.github.maven-nar</groupId>
137+
<artifactId>nar-maven-plugin</artifactId>
138+
<executions>
139+
<execution>
140+
<id>default-nar-compile</id>
141+
<configuration>
142+
<skip>true</skip>
143+
</configuration>
144+
</execution>
145+
<execution>
146+
<id>codeql-nar-compile</id>
147+
<goals>
148+
<goal>nar-compile</goal>
149+
</goals>
150+
<configuration>
151+
<c>
152+
<sourceDirectory>${basedir}/src/main/c-codeql</sourceDirectory>
153+
<toolPath>${junixsocket.native.default.toolPath}</toolPath>
154+
</c>
155+
<linker>
156+
<prefix>${junixsocket.native.default.toolPath}</prefix>
157+
<toolPath></toolPath>
158+
<name>${junixsocket.native.default.linkerName}</name>
159+
</linker>
160+
</configuration>
161+
</execution>
162+
</executions>
163+
</plugin>
164+
</plugins>
165+
</build>
166+
</profile>
125167
</profiles>
126168
<build>
127169
<plugins>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// I'm a dummy file to speed up CodeQL jobs

‎pom.xml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ In contrast to other implementations, junixsocket extends the Java Sockets API (
161161
<skip>true</skip>
162162
</configuration>
163163
</plugin>
164+
<plugin>
165+
<groupId>org.jacoco</groupId>
166+
<artifactId>jacoco-maven-plugin</artifactId>
167+
<configuration>
168+
<skip>true</skip>
169+
</configuration>
170+
</plugin>
164171
</plugins>
165172
</build>
166173
</profile>

0 commit comments

Comments
 (0)