-
Notifications
You must be signed in to change notification settings - Fork 38
176 lines (146 loc) · 7.23 KB
/
main.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
165
166
167
168
169
170
171
172
173
174
175
176
name: 'Mac/Linux CI'
on:
push:
paths-ignore: ['**.md']
pull_request:
paths-ignore: ['**.md']
workflow_dispatch:
inputs:
publish:
description: 'Publish Release'
required: true
type: boolean
tagname:
description: 'Tag Name'
required: false
type: string
jobs:
macosarm64:
name: 'MacOS Arm64'
runs-on: macos-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Extract obs-deps'
run: |
mkdir ${{github.workspace}}/deps/obs-deps
tar -C ${{github.workspace}}/deps/obs-deps -x -f ${{github.workspace}}/CI/deps/macos-deps-2022-08-02-arm64.tar.xz
- name: 'Checkout obs-studio'
uses: actions/checkout@v4
with:
repository: 'obsproject/obs-studio'
submodules: recursive
path: 'deps/obs-studio'
ref: '28.1.2'
- name: 'OBS Cmake'
run: cmake -B ${{github.workspace}}/deps/obs-studio/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="arm64" -DENABLE_PLUGINS=OFF -DDISABLE_UI=ON -DENABLE_UI=OFF -DCOMPILE_PYTHON=OFF -DDISABLE_PYTHON=ON -DENABLE_SCRIPTING=OFF -DBUILD_BROWSER=OFF -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/deps/obs-deps" ${{github.workspace}}/deps/obs-studio
- name: 'Build OBS'
run: |
cmake --build ${{github.workspace}}/deps/obs-studio/build --config=Release
cmake --install ${{github.workspace}}/deps/obs-studio/build --config=Release
- name: 'Cmake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="arm64" -DMAKE_BUNDLE=ON -DDISABLE_X86_SIMD=ON -DBUILTIN_FFTW=ON -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps;${{github.workspace}}/deps/obs-studio/build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/bin"
- name: 'Build'
run: |
cmake --build ${{github.workspace}}/build --config=RelWithDebInfo
cmake --install ${{github.workspace}}/build --config=RelWithDebInfo
- name: 'Package'
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request'
run: cmake --build ${{github.workspace}}/build --config=RelWithDebInfo --target package
- name: 'Upload'
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: Waveform_${{github.ref_name}}_MacOS_arm64
path: ${{github.workspace}}/build/*.pkg
macos64:
name: 'MacOS x64'
runs-on: macos-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Extract obs-deps'
run: |
mkdir ${{github.workspace}}/deps/obs-deps
tar -C ${{github.workspace}}/deps/obs-deps -x -f ${{github.workspace}}/CI/deps/macos-deps-2022-08-02-x86_64.tar.xz
- name: 'Checkout obs-studio'
uses: actions/checkout@v4
with:
repository: 'obsproject/obs-studio'
submodules: recursive
path: 'deps/obs-studio'
ref: '28.1.2'
- name: 'OBS Cmake'
run: cmake -B ${{github.workspace}}/deps/obs-studio/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="x86_64" -DENABLE_PLUGINS=OFF -DDISABLE_UI=ON -DENABLE_UI=OFF -DCOMPILE_PYTHON=OFF -DDISABLE_PYTHON=ON -DENABLE_SCRIPTING=OFF -DBUILD_BROWSER=OFF -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/deps/obs-deps" ${{github.workspace}}/deps/obs-studio
- name: 'Build OBS'
run: |
cmake --build ${{github.workspace}}/deps/obs-studio/build --config=Release
cmake --install ${{github.workspace}}/deps/obs-studio/build --config=Release
- name: 'Cmake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES="x86_64" -DMAKE_BUNDLE=ON -DBUILTIN_FFTW=ON -DCMAKE_PREFIX_PATH="${{github.workspace}}/deps/obs-deps;${{github.workspace}}/deps/obs-studio/build" -DCMAKE_INSTALL_PREFIX="${{github.workspace}}/bin"
- name: 'Build'
run: |
cmake --build ${{github.workspace}}/build --config=RelWithDebInfo
cmake --install ${{github.workspace}}/build --config=RelWithDebInfo
- name: 'Package'
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request'
run: cmake --build ${{github.workspace}}/build --config=RelWithDebInfo --target package
- name: 'Upload'
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: Waveform_${{github.ref_name}}_MacOS_x86_64
path: ${{github.workspace}}/build/*.pkg
ubuntu64:
name: 'Ubuntu x64'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Install dependencies'
run: |
sudo apt-get -qq update
sudo apt-get install -y libobs-dev libfftw3-dev
- name: 'Cmake'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DSTATIC_FFTW=ON -DMAKE_DEB=ON -DCMAKE_INSTALL_PREFIX=/usr
- name: 'Build'
working-directory: ${{github.workspace}}/build
run: make
- name: 'Package'
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request'
working-directory: ${{github.workspace}}/build
run: make package
- name: 'Upload'
if: success() && ((github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch')) && github.event_name != 'pull_request'
uses: actions/upload-artifact@v4
with:
name: Waveform_${{github.ref_name}}_Ubuntu_x86_64
path: ${{github.workspace}}/build/*.deb
publish_release:
if: ((github.ref_type == 'tag') || (inputs.publish == true)) && github.event_name != 'pull_request'
needs: [macosarm64, macos64, ubuntu64]
name: 'Publish Release'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Download artifacts'
uses: actions/download-artifact@v4
with:
path: ${{github.workspace}}/assets
- name: 'Publish'
uses: softprops/action-gh-release@v1
with:
files: |
${{github.workspace}}/assets/*/*.deb
${{github.workspace}}/assets/*/*.pkg
body_path: ${{github.workspace}}/changelog.md
tag_name: ${{inputs.publish && inputs.tagname || github.ref_name}}
name: ${{inputs.publish && inputs.tagname || github.ref_name}}
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') }}