Repository navigation
159 lines (148 loc) · 5.44 KB
/
Copy pathplatforms.yml
File metadata and controls
159 lines (148 loc) · 5.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Platforms
# Builds the native libraries of every supported platform, tests each of them on
# a runner of its own OS and architecture, and hands them on as artifacts:
# natives-<platform> holds the webrtc-java native jar, natives-media-<platform>
# the webrtc-java-media one. Nothing is deployed here; the callers do that once,
# from all platforms together, because Maven Central publishes a version as one
# bundle.
#
# Called by build.yml for every push and PR, and by release-publish.yml for the tag it
# releases (and release.yml for dry runs), so that both build exactly the same way.
on:
workflow_call:
inputs:
version:
description: "Optional local project version override for a release dry run."
type: string
default: ''
retention-days:
description: "How long the natives artifacts are kept."
type: number
default: 1
env:
# The default webrtc.install.dir of webrtc-jni/pom.xml, below the home directory.
WEBRTC_INSTALL_FOLDER: webrtc/build
jobs:
build:
name: build (${{ matrix.platform.name }})
strategy:
fail-fast: false
matrix:
# profile: the Maven profile that selects a cross compiled classifier;
# empty when the classifier is the runner's own. The macOS Intel
# build runs on Apple Silicon and cross compiles.
platform:
- name: windows_x86_64
runs-on: windows-2022
profile: ''
- name: windows_arm64
runs-on: windows-2022
profile: windows-aarch64
- name: linux_x86-64
runs-on: ubuntu-22.04
profile: ''
- name: linux_arm64
runs-on: ubuntu-22.04
profile: linux-aarch64
- name: linux_arm
runs-on: ubuntu-22.04
profile: linux-aarch32
- name: macos_arm64
runs-on: macos-14
profile: ''
- name: macos_x86-64
runs-on: macos-14
profile: macos-cross-x86_64
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ github.sha }}
# The media module builds FFmpeg from its third-party submodule.
submodules: true
- name: Prepare build
if: runner.os == 'Windows'
uses: ./.github/actions/prepare-windows
- name: Prepare build
if: runner.os == 'Linux'
uses: ./.github/actions/prepare-linux
- name: Prepare build
if: runner.os == 'macOS'
uses: ./.github/actions/prepare-macos
- name: Set the release dry-run version
if: inputs.version != ''
env:
RELEASE_VERSION: ${{ inputs.version }}
run: mvn -B versions:set -DnewVersion="$RELEASE_VERSION" -DgenerateBackupPoms=false
shell: bash
- name: Maven build
uses: ./.github/actions/build
with:
platform-name: ${{ matrix.platform.name }}
profile: ${{ matrix.platform.profile }}
retention-days: ${{ inputs.retention-days }}
# Every platform is tested on a runner of its own OS and architecture,
# against the natives the build job uploaded, so that what is tested is
# exactly what gets published. Most of them are cross compiled and could not
# be loaded on the runner that built them.
test-natives:
name: test-natives (${{ matrix.platform.name }})
needs: build
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# java-architecture: the JDK architecture, when it differs from the
# runner's. linux_arm runs a 32-bit ARM JDK on an arm64 runner.
platform:
- name: windows_x86_64
runs-on: windows-2022
classifier: windows-x86_64
java-distribution: temurin
java-architecture: ''
- name: windows_arm64
runs-on: windows-11-arm
classifier: windows-aarch64
java-distribution: microsoft
java-architecture: aarch64
- name: linux_x86-64
runs-on: ubuntu-22.04
classifier: linux-x86_64
java-distribution: temurin
java-architecture: ''
- name: linux_arm64
runs-on: ubuntu-22.04-arm
classifier: linux-aarch64
java-distribution: temurin
java-architecture: ''
- name: linux_arm
runs-on: ubuntu-22.04-arm
classifier: linux-aarch32
java-distribution: liberica
java-architecture: armv7
- name: macos_arm64
runs-on: macos-14
classifier: macos-aarch64
java-distribution: temurin
java-architecture: ''
- name: macos_x86-64
runs-on: macos-15-intel
classifier: macos-x86_64
java-distribution: temurin
java-architecture: ''
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
ref: ${{ github.sha }}
- name: Test natives
uses: ./.github/actions/test-natives
with:
platform-name: ${{ matrix.platform.name }}
classifier: ${{ matrix.platform.classifier }}
profile: ${{ matrix.platform.classifier }}
java-distribution: ${{ matrix.platform.java-distribution }}
java-architecture: ${{ matrix.platform.java-architecture }}
version: ${{ inputs.version }}