Skip to content

Commit 112f0fb

Browse files
authored
refactor: updated native interface to m138 (#179)
1 parent 930cd70 commit 112f0fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+481
-367
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 'Maven Build'
2+
3+
description: 'Build the platform dependent Java library'
4+
5+
inputs:
6+
java-version:
7+
description: 'The Java build version.'
8+
required: true
9+
default: '17'
10+
11+
platform-name:
12+
description: 'The target platform.'
13+
required: true
14+
15+
maven-username:
16+
description: 'The Maven username.'
17+
required: true
18+
19+
maven-password:
20+
description: 'The Maven password.'
21+
required: true
22+
23+
runs:
24+
using: "composite"
25+
steps:
26+
- name: Set up WebRTC cache
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/${{ env.WEBRTC_INSTALL_FOLDER }}
30+
key: webrtc-${{ env.WEBRTC_CACHE_BRANCH }}-${{ inputs.platform-name }}-${{ hashFiles('webrtc-jni/pom.xml') }}
31+
restore-keys: webrtc-${{ env.WEBRTC_CACHE_BRANCH }}-${{ inputs.platform-name }}-
32+
33+
- name: Set up Maven cache
34+
uses: actions/cache@v4
35+
with:
36+
path: ~/.m2/repository
37+
key: maven-${{ inputs.platform-name }}-${{ hashFiles('**/pom.xml') }}
38+
restore-keys: maven-${{ inputs.platform-name }}-
39+
40+
- name: Set up JDK
41+
uses: actions/setup-java@v4
42+
with:
43+
architecture: 'x64'
44+
java-version: ${{ inputs.java-version }}
45+
distribution: 'temurin'
46+
server-id: central
47+
server-username: MAVEN_USERNAME
48+
server-password: MAVEN_TOKEN
49+
50+
- name: Build
51+
run: arch -x86_64 mvn package -DskipTests -Pmacos-cross-x86_64
52+
shell: bash
53+
54+
- name: Test
55+
run: arch -x86_64 mvn -B jar:jar surefire:test -Pmacos-cross-x86_64
56+
shell: bash
57+
58+
- name: Deploy
59+
env:
60+
MAVEN_USERNAME: ${{ inputs.maven-username }}
61+
MAVEN_TOKEN: ${{ inputs.maven-password }}
62+
run: arch -x86_64 mvn deploy -DskipTests -Pmacos-cross-x86_64
63+
shell: bash

.github/actions/prepare-macos/action.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ runs:
77
steps:
88
- name: Install required packages
99
run: |
10-
# Required for macos-13
11-
pip install setuptools
12-
# Required for macos-14
10+
# Required on macos-14
1311
brew install python-setuptools
1412
shell: bash
1513

1614
- name: Select Xcode version
17-
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
15+
run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
1816
shell: bash

.github/workflows/build.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
workflow_dispatch:
1717

1818
env:
19-
WEBRTC_CACHE_BRANCH: 6998
19+
WEBRTC_CACHE_BRANCH: 7204
2020
WEBRTC_CHECKOUT_FOLDER: webrtc
2121
WEBRTC_INSTALL_FOLDER: webrtc/build
2222

@@ -83,7 +83,7 @@ jobs:
8383
matrix:
8484
platform:
8585
- name: macos_x86-64
86-
runs-on: macos-13
86+
runs-on: macos-14
8787
- name: macos_arm64
8888
runs-on: macos-14
8989
java: [17]
@@ -96,11 +96,22 @@ jobs:
9696
name: Prepare build
9797
uses: ./.github/actions/prepare-macos
9898

99-
- id: maven-build
100-
name: Maven build
99+
- id: maven-build-arm64
100+
name: Maven build - Apple Silicon
101+
if: matrix.platform.name == 'macos_arm64'
101102
uses: ./.github/actions/build
102103
with:
103104
java-version: ${{ matrix.java }}
104105
platform-name: ${{ matrix.platform.name }}
105106
maven-username: ${{ secrets.MAVEN_USERNAME }}
106107
maven-password: ${{ secrets.MAVEN_TOKEN }}
108+
109+
- id: maven-build-x86_64
110+
name: Maven build - Intel
111+
if: matrix.platform.name == 'macos_x86-64'
112+
uses: ./.github/actions/build-macos-x86_64
113+
with:
114+
java-version: ${{ matrix.java }}
115+
platform-name: ${{ matrix.platform.name }}
116+
maven-username: ${{ secrets.MAVEN_USERNAME }}
117+
maven-password: ${{ secrets.MAVEN_TOKEN }}

.github/workflows/release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Release
22

33
on:
4-
create:
5-
tags:
6-
- 'v*'
74
workflow_dispatch:
85
inputs:
96
developmentVersion:
@@ -12,7 +9,7 @@ on:
129
default: "X.Y.Z-SNAPSHOT"
1310

1411
env:
15-
WEBRTC_CACHE_BRANCH: 6998
12+
WEBRTC_CACHE_BRANCH: 7204
1613
WEBRTC_CHECKOUT_FOLDER: webrtc
1714
WEBRTC_INSTALL_FOLDER: webrtc/build
1815

@@ -153,7 +150,7 @@ jobs:
153150
matrix:
154151
platform:
155152
- name: macos_x86-64
156-
runs-on: macos-13
153+
runs-on: macos-14
157154
- name: macos_arm64
158155
runs-on: macos-14
159156
java: [17]

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@
319319
</properties>
320320
</profile>
321321
<profile>
322-
<id>mac-x86_64</id>
322+
<id>macos-x86_64</id>
323323
<activation>
324324
<os>
325325
<family>mac</family>
@@ -332,7 +332,7 @@
332332
</properties>
333333
</profile>
334334
<profile>
335-
<id>mac-aarch64</id>
335+
<id>macos-aarch64</id>
336336
<activation>
337337
<os>
338338
<family>mac</family>

0 commit comments

Comments
 (0)