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
63 changes: 63 additions & 0 deletions .github/actions/build-macos-x86_64/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: 'Maven Build'

description: 'Build the platform dependent Java library'

inputs:
java-version:
description: 'The Java build version.'
required: true
default: '17'

platform-name:
description: 'The target platform.'
required: true

maven-username:
description: 'The Maven username.'
required: true

maven-password:
description: 'The Maven password.'
required: true

runs:
using: "composite"
steps:
- name: Set up WebRTC cache
uses: actions/cache@v4
with:
path: ~/${{ env.WEBRTC_INSTALL_FOLDER }}
key: webrtc-${{ env.WEBRTC_CACHE_BRANCH }}-${{ inputs.platform-name }}-${{ hashFiles('webrtc-jni/pom.xml') }}
restore-keys: webrtc-${{ env.WEBRTC_CACHE_BRANCH }}-${{ inputs.platform-name }}-

- name: Set up Maven cache
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: maven-${{ inputs.platform-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: maven-${{ inputs.platform-name }}-

- name: Set up JDK
uses: actions/setup-java@v4
with:
architecture: 'x64'
java-version: ${{ inputs.java-version }}
distribution: 'temurin'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_TOKEN

- name: Build
run: arch -x86_64 mvn package -DskipTests -Pmacos-cross-x86_64
shell: bash

- name: Test
run: arch -x86_64 mvn -B jar:jar surefire:test -Pmacos-cross-x86_64
shell: bash

- name: Deploy
env:
MAVEN_USERNAME: ${{ inputs.maven-username }}
MAVEN_TOKEN: ${{ inputs.maven-password }}
run: arch -x86_64 mvn deploy -DskipTests -Pmacos-cross-x86_64
shell: bash
6 changes: 2 additions & 4 deletions .github/actions/prepare-macos/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ runs:
steps:
- name: Install required packages
run: |
# Required for macos-13
pip install setuptools
# Required for macos-14
# Required on macos-14
brew install python-setuptools
shell: bash

- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_15.0.1.app/Contents/Developer
run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
shell: bash
19 changes: 15 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
workflow_dispatch:

env:
WEBRTC_CACHE_BRANCH: 6998
WEBRTC_CACHE_BRANCH: 7204
WEBRTC_CHECKOUT_FOLDER: webrtc
WEBRTC_INSTALL_FOLDER: webrtc/build

Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
matrix:
platform:
- name: macos_x86-64
runs-on: macos-13
runs-on: macos-14
- name: macos_arm64
runs-on: macos-14
java: [17]
Expand All @@ -96,11 +96,22 @@ jobs:
name: Prepare build
uses: ./.github/actions/prepare-macos

- id: maven-build
name: Maven build
- id: maven-build-arm64
name: Maven build - Apple Silicon
if: matrix.platform.name == 'macos_arm64'
uses: ./.github/actions/build
with:
java-version: ${{ matrix.java }}
platform-name: ${{ matrix.platform.name }}
maven-username: ${{ secrets.MAVEN_USERNAME }}
maven-password: ${{ secrets.MAVEN_TOKEN }}

- id: maven-build-x86_64
name: Maven build - Intel
if: matrix.platform.name == 'macos_x86-64'
uses: ./.github/actions/build-macos-x86_64
with:
java-version: ${{ matrix.java }}
platform-name: ${{ matrix.platform.name }}
maven-username: ${{ secrets.MAVEN_USERNAME }}
maven-password: ${{ secrets.MAVEN_TOKEN }}
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Release

on:
create:
tags:
- 'v*'
workflow_dispatch:
inputs:
developmentVersion:
Expand All @@ -12,7 +9,7 @@ on:
default: "X.Y.Z-SNAPSHOT"

env:
WEBRTC_CACHE_BRANCH: 6998
WEBRTC_CACHE_BRANCH: 7204
WEBRTC_CHECKOUT_FOLDER: webrtc
WEBRTC_INSTALL_FOLDER: webrtc/build

Expand Down Expand Up @@ -153,7 +150,7 @@ jobs:
matrix:
platform:
- name: macos_x86-64
runs-on: macos-13
runs-on: macos-14
- name: macos_arm64
runs-on: macos-14
java: [17]
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
</properties>
</profile>
<profile>
<id>mac-x86_64</id>
<id>macos-x86_64</id>
<activation>
<os>
<family>mac</family>
Expand All @@ -332,7 +332,7 @@
</properties>
</profile>
<profile>
<id>mac-aarch64</id>
<id>macos-aarch64</id>
<activation>
<os>
<family>mac</family>
Expand Down
Loading