-
Notifications
You must be signed in to change notification settings - Fork 0
218 lines (216 loc) · 7.16 KB
/
release.yml
File metadata and controls
218 lines (216 loc) · 7.16 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
name: release
on:
release:
types: [published]
jobs:
build-windows:
defaults:
run:
working-directory: .\\build
strategy:
fail-fast: false
matrix:
name:
- windows_x86_64
# - windows_arm64
# - windows_x86
runs-on: windows-2022
outputs:
output-artifact-id: ${{ steps.artifact-upload-step.outputs.artifact-id }}
steps:
- uses: actions/checkout@v5
- name: Determine Release Tag
env:
RELEASE: ${{ github.ref_name }}
id: release_tag
run: |
$tag = $Env:RELEASE.split(".")[0]
echo "tag=$tag" | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
echo "3P_WEBRTC_BUILD_RELEASE_VERSION=$Env:RELEASE" | Out-File -FilePath .\\VERSION -Encoding utf8 -Append
- name: Disk Cleanup
run: |
Get-PSDrive
# Cache 済み Docker Image の削除
# Clean unused docker images
docker image prune -a -f
# Android SDK の削除
# Delete Android SDK
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
# JVM の削除
# Delete JVM
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
Get-PSDrive
- run: "& .\\build.${{ matrix.name }}.ps1 \"${{ steps.release_tag.outputs.tag }}_release\""
- name: Upload Artifact
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: webrtc.${{ matrix.name }}
path: build\_package\${{ matrix.name }}\webrtc.tar.bz2
build-macos:
defaults:
run:
working-directory: ./build
strategy:
fail-fast: false
matrix:
name:
- macos_arm64
- macos_x86_64
# - ios
runs-on: macos-15
outputs:
output-artifact-id: ${{ steps.artifact-upload-step.outputs.artifact-id }}
steps:
- uses: actions/checkout@v5
- name: Select Xcode 16.4
run: sudo xcode-select --switch /Applications/Xcode_16.4.app/Contents/Developer
- run: brew install ninja
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- run: pip install setuptools
- name: Determine Release Tag
env:
RELEASE: ${{ github.ref_name }}
id: release_tag
run: |
echo "tag=${RELEASE%%.*}" >> "$GITHUB_OUTPUT"
echo "3P_WEBRTC_BUILD_RELEASE_VERSION=${RELEASE}" >> "VERSION"
- run: ./build.${{ matrix.name }}.sh "${{ steps.release_tag.outputs.tag }}_release"
- name: Upload Artifact
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: webrtc.${{ matrix.name }}
path: build/_package/${{ matrix.name }}/webrtc.tar.bz2
build-linux:
defaults:
run:
working-directory: ./build
strategy:
fail-fast: false
matrix:
name:
# - raspberry-pi-os_armv6
# - raspberry-pi-os_armv7
# - raspberry-pi-os_armv8
# - ubuntu-18.04_armv8
# - ubuntu-20.04_armv8
# - ubuntu-18.04_x86_64
# - ubuntu-20.04_x86_64
# - ubuntu-22.04_x86_64
- ubuntu-24.04_x86_64
# - android
runs-on: ubuntu-24.04
outputs:
output-artifact-id: ${{ steps.artifact-upload-step.outputs.artifact-id }}
steps:
- uses: actions/checkout@v5
- name: Disk Cleanup
run: |
df -h
docker container prune -f
docker image prune -a -f
# 3.9GB
sudo rm -rf /usr/local/share/boost
# 17GB
sudo rm -rf /usr/share/dotnet
df -h
- name: Determine Release Tag
env:
RELEASE: ${{ github.ref_name }}
id: release_tag
run: |
echo "tag=${RELEASE%%.*}" >> "$GITHUB_OUTPUT"
echo "3P_WEBRTC_BUILD_RELEASE_VERSION=${RELEASE}" >> "VERSION"
- run: ./build.${{ matrix.name }}.sh "${{ steps.release_tag.outputs.tag }}_release"
- name: Upload Artifact
uses: actions/upload-artifact@v4
id: artifact-upload-step
with:
name: webrtc.${{ matrix.name }}
path: build/_package/${{ matrix.name }}/webrtc.tar.bz2
package-macos:
needs:
- build-macos
runs-on: macos-15
steps:
# Checkout first to avoid damaging artifact download below
- name: Checkout
uses: actions/checkout@v5
with:
# Work around the fact that in the context of a pull request github.sha
# references a dynamic merge commit rather than the branch head
# https://frontside.com/blog/2020-05-26-github-actions-pull_request/#how-does-pull_request-affect-actionscheckout
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
submodules: recursive
- name: Download webrtc artifacts
uses: actions/download-artifact@v7
with:
path: _packages
- uses: AlchemyViewer/action-autobuild@v5
with:
checkout: false
token: ${{ github.token }}
build-args: ../build-cmd.sh ${{ needs.build-macos.outputs.output-artifact-id }}
package-windows:
needs:
- build-windows
runs-on: windows-2022
steps:
# Checkout first to avoid damaging artifact download below
- name: Checkout
uses: actions/checkout@v5
with:
# Work around the fact that in the context of a pull request github.sha
# references a dynamic merge commit rather than the branch head
# https://frontside.com/blog/2020-05-26-github-actions-pull_request/#how-does-pull_request-affect-actionscheckout
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
submodules: recursive
- name: Download webrtc artifacts
uses: actions/download-artifact@v7
with:
path: _packages
- uses: AlchemyViewer/action-autobuild@v5
with:
checkout: false
token: ${{ github.token }}
build-args: ../build-cmd.sh ${{ needs.build-windows.outputs.output-artifact-id }}
package-linux:
needs:
- build-linux
runs-on: ubuntu-latest
steps:
# Checkout first to avoid damaging artifact download below
- name: Checkout
uses: actions/checkout@v5
with:
# Work around the fact that in the context of a pull request github.sha
# references a dynamic merge commit rather than the branch head
# https://frontside.com/blog/2020-05-26-github-actions-pull_request/#how-does-pull_request-affect-actionscheckout
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 0
submodules: recursive
- name: Download webrtc artifacts
uses: actions/download-artifact@v7
with:
path: _packages
- uses: AlchemyViewer/action-autobuild@v5
with:
checkout: false
token: ${{ github.token }}
build-args: ../build-cmd.sh ${{ needs.build-linux.outputs.output-artifact-id }}
release:
needs:
- package-windows
- package-macos
- package-linux
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/m')
steps:
- uses: AlchemyViewer/action-autobuild-release@v4