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
16 changes: 16 additions & 0 deletions .github/actions/release-macos-x86_64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,19 @@ runs:
if-no-files-found: error
retention-days: 7
overwrite: true

# The media module's natives go the same way. Only the classifier jar: the
# main jar is platform independent and publish-central builds it itself. The
# name matches publish-central's natives-* download pattern, which merges
# both uploads into one flat directory.
- name: Upload media native library jar
uses: actions/upload-artifact@v7
with:
name: natives-media-${{ inputs.platform-name }}
path: |
webrtc-java-media/target/webrtc-java-media-*-windows-*.jar
webrtc-java-media/target/webrtc-java-media-*-linux-*.jar
webrtc-java-media/target/webrtc-java-media-*-macos-*.jar
if-no-files-found: error
retention-days: 7
overwrite: true
16 changes: 16 additions & 0 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,19 @@ runs:
if-no-files-found: error
retention-days: 7
overwrite: true

# The media module's natives go the same way. Only the classifier jar: the
# main jar is platform independent and publish-central builds it itself. The
# name matches publish-central's natives-* download pattern, which merges
# both uploads into one flat directory.
- name: Upload media native library jar
uses: actions/upload-artifact@v7
with:
name: natives-media-${{ inputs.platform-name }}
path: |
webrtc-java-media/target/webrtc-java-media-*-windows-*.jar
webrtc-java-media/target/webrtc-java-media-*-linux-*.jar
webrtc-java-media/target/webrtc-java-media-*-macos-*.jar
if-no-files-found: error
retention-days: 7
overwrite: true
16 changes: 14 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,13 @@ jobs:
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

# release:prepare runs "clean verify" over the whole reactor, and the media
# module in it builds FFmpeg from its third-party submodule.
- name: Update development version
uses: actions/checkout@v6
with:
ref: main
submodules: true

# A dry run transforms the poms and writes release.properties, but creates no
# commit and no tag, so there is nothing to amend or push below.
Expand Down Expand Up @@ -328,6 +331,10 @@ jobs:
echo "::error::Missing native library jar for $classifier"
status=1
fi
if [ ! -f "natives/webrtc-java-media-$version-$classifier.jar" ]; then
echo "::error::Missing media native library jar for $classifier"
status=1
fi
done

exit $status
Expand Down Expand Up @@ -360,7 +367,7 @@ jobs:
MAVEN_TOKEN: ${{ inputs.dryRun && 'dry-run-must-not-upload' || secrets.MAVEN_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
run: >
mvn -B deploy -pl .,webrtc -Prelease -DskipTests
mvn -B deploy -pl .,webrtc,webrtc-java-media -Prelease -DskipTests
-Dnatives.dir="$PWD/natives"
-DskipPublishing=${{ inputs.dryRun }}

Expand All @@ -374,7 +381,9 @@ jobs:
echo
echo "Artifacts destined for the deployment bundle:"
echo '```'
ls -1 webrtc/target/*.jar webrtc/target/*.asc natives/*.asc 2>/dev/null || true
ls -1 webrtc/target/*.jar webrtc/target/*.asc \
webrtc-java-media/target/*.jar webrtc-java-media/target/*.asc \
natives/*.asc 2>/dev/null || true
echo '```'
} >> "$GITHUB_STEP_SUMMARY"

Expand All @@ -388,6 +397,9 @@ jobs:
webrtc/target/central-*/**
webrtc/target/*.jar
webrtc/target/*.asc
webrtc-java-media/target/central-*/**
webrtc-java-media/target/*.jar
webrtc-java-media/target/*.asc
natives/*.asc
if-no-files-found: warn
retention-days: 7
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/media/media-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ Once installed, depend on it alongside `webrtc-java`. It takes two entries: one
<dependency>
<groupId>dev.onvoid.webrtc</groupId>
<artifactId>webrtc-java-media</artifactId>
<version>0.19.0-SNAPSHOT</version>
<version>{{ VERSION }}</version>
</dependency>
<dependency>
<groupId>dev.onvoid.webrtc</groupId>
<artifactId>webrtc-java-media</artifactId>
<version>0.19.0-SNAPSHOT</version>
<version>{{ VERSION }}</version>
<classifier>windows-x86_64</classifier>
</dependency>
```
Expand Down
86 changes: 86 additions & 0 deletions webrtc-java-media/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,92 @@
</properties>
</profile>

<!-- Release: attach the natives jars of all supported platforms, which
the release workflow has collected into "natives.dir" from the
per-platform build jobs, as webrtc does with its own. Nothing is
built natively then, and no natives jar is made for the host: the
one downloaded for it is attached instead.

Run with: mvn deploy -pl .,webrtc,webrtc-java-media -Prelease -Dnatives.dir=/abs/path -->
<profile>
<id>attach-natives-all</id>
<activation>
<property>
<name>natives.dir</name>
</property>
</activation>
<properties>
<cmake.generate.phase>none</cmake.generate.phase>
<cmake.compile.phase>none</cmake.compile.phase>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>natives-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-natives</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${natives.dir}/${project.artifactId}-${project.version}-windows-x86_64.jar</file>
<type>jar</type>
<classifier>windows-x86_64</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.artifactId}-${project.version}-windows-aarch64.jar</file>
<type>jar</type>
<classifier>windows-aarch64</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.artifactId}-${project.version}-linux-x86_64.jar</file>
<type>jar</type>
<classifier>linux-x86_64</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.artifactId}-${project.version}-linux-aarch64.jar</file>
<type>jar</type>
<classifier>linux-aarch64</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.artifactId}-${project.version}-linux-aarch32.jar</file>
<type>jar</type>
<classifier>linux-aarch32</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.artifactId}-${project.version}-macos-x86_64.jar</file>
<type>jar</type>
<classifier>macos-x86_64</classifier>
</artifact>
<artifact>
<file>${natives.dir}/${project.artifactId}-${project.version}-macos-aarch64.jar</file>
<type>jar</type>
<classifier>macos-aarch64</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<!-- The platform profiles mirror webrtc-jni's, by name and by the
toolchain file each one selects, so that both native libraries of
a given classifier are built for the same target the same way. -->
Expand Down
2 changes: 1 addition & 1 deletion webrtc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
build jobs. Maven Central publishes a version as one atomic bundle, hence
all classifiers must be attached to a single deployment.

Run with: mvn deploy -pl .,webrtc -Prelease -Dnatives.dir=/abs/path
Run with: mvn deploy -pl .,webrtc,webrtc-java-media -Prelease -Dnatives.dir=/abs/path
-->
<profile>
<id>attach-natives-all</id>
Expand Down
Loading