-
Notifications
You must be signed in to change notification settings - Fork 51
164 lines (157 loc) · 4.22 KB
/
build.yml
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
name: build
on:
push:
paths-ignore:
- '**.md'
- 'LICENSE'
- 'publishAar.sh'
- 'docker/**'
pull_request:
permissions:
contents: write
jobs:
build-linux:
strategy:
fail-fast: false
matrix:
name:
- linux-arm
- linux-arm64
- linux-x64
- android
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Disk Cleanup
run: ./disk_cleanup.sh
- name: Setup
run: sudo scripts/apt_install.sh
- name: Build
run: make -C build ${{ matrix.name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libwebrtc-${{ matrix.name }}.tar.xz
path: package/libwebrtc-${{ matrix.name }}.tar.xz
compression-level: 0
build-macos:
strategy:
fail-fast: false
matrix:
name:
- macos-arm64
- macos-x64
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Disk Cleanup
run: ./disk_cleanup_mac.sh
- name: Build
run: make -C build USE_CCACHE=0 ${{ matrix.name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libwebrtc-${{ matrix.name }}.tar.xz
path: package/libwebrtc-${{ matrix.name }}.tar.xz
compression-level: 0
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Disk Cleanup
run: .\disk_cleanup.bat
- name: Build
run: powershell -NoProfile -ExecutionPolicy Unrestricted .\build.windows.ps1
shell: pwsh
- name: Upload artifact x64
uses: actions/upload-artifact@v4
with:
name: libwebrtc-win-x64.7z
path: package/libwebrtc-win-x64.7z
compression-level: 0
- name: Upload artifact x86
uses: actions/upload-artifact@v4
with:
name: libwebrtc-win-x86.7z
path: package/libwebrtc-win-x86.7z
compression-level: 0
build-ios:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Disk Cleanup
run: ./disk_cleanup_mac.sh
- name: Build
run: make -C build USE_CCACHE=0 ios
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: libwebrtc-ios.zip
path: package/libwebrtc-ios.zip
compression-level: 0
release:
strategy:
fail-fast: false
max-parallel: 1
matrix:
name:
- linux-arm
- linux-arm64
- linux-x64
- macos-arm64
- macos-x64
- android
- ios
- win-x64
- win-x86
include:
- name: linux-arm
ext: tar.xz
type: application/x-xz
- name: linux-arm64
ext: tar.xz
type: application/x-xz
- name: linux-x64
ext: tar.xz
type: application/x-xz
- name: macos-arm64
ext: tar.xz
type: application/x-xz
- name: macos-x64
ext: tar.xz
type: application/x-xz
- name: android
ext: tar.xz
type: application/x-xz
- name: ios
ext: zip
type: application/zip
- name: win-x64
ext: 7z
type: application/x-7z-compressed
- name: win-x86
ext: 7z
type: application/x-7z-compressed
name: Release ${{ matrix.name }}
if: contains(github.ref, 'tags/')
needs:
- build-linux
- build-macos
- build-windows
- build-ios
runs-on: ubuntu-latest
steps:
- name: Download ${{ matrix.name }}
uses: actions/download-artifact@v4
with:
name: libwebrtc-${{ matrix.name }}.${{ matrix.ext }}
- name: Upload ${{ matrix.name }} Release asset
uses: ncipollo/release-action@v1
with:
name: Release m${{ github.ref_name }}
allowUpdates: true
draft: false
prerelease: false
artifactContentType: ${{ matrix.type }}
artifacts: libwebrtc-${{ matrix.name }}.${{ matrix.ext }}
token: ${{ secrets.GITHUB_TOKEN }}