Skip to content

Commit 1d0867f

Browse files
committed
fix: give the Swing tests webrtc-java's natives in the test-natives lane
1 parent 66148ad commit 1d0867f

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎.github/actions/test-natives/action.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,15 @@ runs:
132132
"$JAVA_HOME/bin/jar" xf "$WEBRTC_JAR"
133133
rm -rf META-INF
134134
ls -l
135+
cd - > /dev/null
136+
137+
# The Swing module's tests need only webrtc-java's natives, and read
138+
# them from a directory of the same name for the same reason.
139+
mkdir -p webrtc-swing/target/natives
140+
cd webrtc-swing/target/natives
141+
"$JAVA_HOME/bin/jar" xf "$WEBRTC_JAR"
142+
rm -rf META-INF
143+
ls -l
135144
shell: bash
136145

137146
# One reactor for all, so that webrtc-java-media and webrtc-java-swing

‎webrtc-swing/pom.xml‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,26 @@
1515
Swing extension for webrtc-java. Shows the video of the client API in Swing windows.
1616
</description>
1717

18+
<build>
19+
<plugins>
20+
<plugin>
21+
<groupId>org.apache.maven.plugins</groupId>
22+
<artifactId>maven-surefire-plugin</artifactId>
23+
<configuration>
24+
<!-- Where the test-natives lane unpacks webrtc-java's natives.
25+
In a reactor that runs only up to the test phase, Maven
26+
answers webrtc-java's classifier artifact with that
27+
module's output directory, which holds no native
28+
library. Elsewhere the directory does not exist and the
29+
natives come from the classifier jar as usual. -->
30+
<additionalClasspathElements>
31+
<additionalClasspathElement>${project.build.directory}/natives</additionalClasspathElement>
32+
</additionalClasspathElements>
33+
</configuration>
34+
</plugin>
35+
</plugins>
36+
</build>
37+
1838
<dependencies>
1939
<dependency>
2040
<groupId>dev.onvoid.webrtc</groupId>

0 commit comments

Comments
 (0)