|
1 | | -name: 'CI Windows On-Push' |
| 1 | +name: "CI Windows On-Push" |
2 | 2 |
|
3 | 3 | on: |
| 4 | + workflow_dispatch: # Allows manual builds |
4 | 5 | push: |
5 | 6 | branches: |
6 | 7 | - master |
7 | 8 |
|
8 | 9 | jobs: |
9 | 10 | windows: |
10 | | - name: 'Windows 32+64bit' |
11 | | - runs-on: [windows-latest] |
| 11 | + name: "Windows 64bit" |
| 12 | + runs-on: windows-latest |
12 | 13 | env: |
13 | | - QT_VERSION: '5.10.1' |
14 | | - WINDOWS_DEPS_VERSION: '2017' |
15 | | - CMAKE_GENERATOR: "Visual Studio 16 2019" |
| 14 | + OBS_DEPS: "2022-08-02" |
| 15 | + CMAKE_GENERATOR: "Visual Studio 17 2022" |
16 | 16 | CMAKE_SYSTEM_VERSION: "10.0" |
| 17 | + # TODO: Don't ACTIONS_ALLOW_UNSECURE_COMMANDS |
| 18 | + ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
17 | 19 | steps: |
18 | | - - name: 'Add msbuild to PATH' |
| 20 | + - name: "Add msbuild to PATH" |
19 | 21 | |
20 | | - - name: 'Checkout' |
| 22 | + - name: "Checkout" |
21 | 23 | uses: actions/checkout@v2 |
22 | 24 | with: |
23 | 25 | path: ${{ github.workspace }}/obs-virtual-cam |
24 | | - submodules: 'recursive' |
25 | | - - name: 'Checkout OBS' |
| 26 | + submodules: "recursive" |
| 27 | + - name: "Checkout OBS" |
26 | 28 | uses: actions/checkout@v2 |
27 | 29 | with: |
28 | 30 | repository: obsproject/obs-studio |
29 | 31 | path: ${{ github.workspace }}/obs-studio |
30 | | - submodules: 'recursive' |
31 | | - - name: 'Get OBS-Studio git info' |
| 32 | + submodules: "recursive" |
| 33 | + - name: "Get OBS-Studio git info" |
32 | 34 | shell: bash |
33 | 35 | working-directory: ${{ github.workspace }}/obs-studio |
34 | 36 | run: | |
35 | 37 | git fetch --prune --unshallow |
36 | 38 | echo ::set-env name=OBS_GIT_BRANCH::$(git rev-parse --abbrev-ref HEAD) |
37 | 39 | echo ::set-env name=OBS_GIT_HASH::$(git rev-parse --short HEAD) |
38 | 40 | echo ::set-env name=OBS_GIT_TAG::$(git describe --tags --abbrev=0) |
39 | | - - name: 'Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})' |
| 41 | + - name: "Checkout last OBS-Studio release (${{ env.OBS_GIT_TAG }})" |
40 | 42 | shell: bash |
41 | 43 | working-directory: ${{ github.workspace }}/obs-studio |
42 | 44 | run: | |
43 | 45 | git checkout ${{ env.OBS_GIT_TAG }} |
44 | 46 | git submodule update |
45 | | - - name: 'Get obs-virtual-cam git info' |
| 47 | + - name: "Get obs-virtual-cam git info" |
46 | 48 | shell: bash |
47 | 49 | working-directory: ${{ github.workspace }}/obs-virtual-cam |
48 | 50 | run: | |
49 | 51 | git fetch --prune --unshallow |
50 | 52 | echo ::set-env name=GIT_BRANCH::${{ github.event.pull_request.head.ref }} |
51 | 53 | echo ::set-env name=GIT_HASH::$(git rev-parse --short HEAD) |
52 | 54 | echo ::set-env name=GIT_TAG::$(git describe --tags --abbrev=0) |
53 | | - - name: 'Install prerequisite: QT' |
| 55 | + - name: "Install prerequisite: QT" |
54 | 56 | run: | |
55 | | - curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_${{ env.QT_VERSION }}.7z -f --retry 5 -C - |
56 | | - 7z x Qt_${{ env.QT_VERSION }}.7z -o"${{ github.workspace }}\cmbuild\QT" |
57 | | - - name: 'Install prerequisite: Pre-built OBS dependencies' |
| 57 | + curl -kLO https://github.com/obsproject/obs-deps/releases/download/${{ env.OBS_DEPS }}/windows-deps-qt6-${{ env.OBS_DEPS }}-x64.zip -f --retry 5 -C - |
| 58 | + 7z x windows-deps-qt6-${{ env.OBS_DEPS }}-x64.zip -o"${{ github.workspace }}\cmbuild\QT" |
| 59 | + - name: "Install prerequisite: Pre-built OBS dependencies" |
58 | 60 | run: | |
59 | | - curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -f --retry 5 -C - |
60 | | - 7z x dependencies${{ env.WINDOWS_DEPS_VERSION }}.zip -o"${{ github.workspace }}\cmbuild\deps" |
61 | | - - name: 'Restore OBS 32-bit build v${{ env.OBS_GIT_TAG }} from cache' |
62 | | - id: build-cache-obs-32 |
63 | | - uses: actions/cache@v1 |
64 | | - env: |
65 | | - CACHE_NAME: 'build-cache-obs-32' |
66 | | - with: |
67 | | - path: ${{ github.workspace }}/obs-studio/build32 |
68 | | - key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }} |
69 | | - restore-keys: | |
70 | | - ${{ runner.os }}-${{ env.CACHE_NAME }}- |
71 | | - - name: 'Configure OBS 32-bit' |
72 | | - if: steps.build-cache-obs-32.outputs.cache-hit != 'true' |
73 | | - working-directory: ${{ github.workspace }}/obs-studio |
74 | | - run: | |
75 | | - mkdir .\build32 |
76 | | - cd .\build32 |
77 | | - cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES .. |
78 | | - - name: 'Build OBS-Studio 32-bit' |
79 | | - if: steps.build-cache-obs-32.outputs.cache-hit != 'true' |
80 | | - working-directory: ${{ github.workspace }}/obs-studio |
81 | | - run: | |
82 | | - msbuild /m /p:Configuration=RelWithDebInfo .\build32\libobs\libobs.vcxproj |
83 | | - msbuild /m /p:Configuration=RelWithDebInfo .\build32\UI\obs-frontend-api\obs-frontend-api.vcxproj |
84 | | - - name: 'Restore OBS 64-bit build v${{ env.OBS_GIT_TAG }} from cache' |
| 61 | + curl -kLO https://github.com/obsproject/obs-deps/releases/download/${{ env.OBS_DEPS }}/windows-deps-${{ env.OBS_DEPS }}-x64.zip -f --retry 5 -C - |
| 62 | + 7z x windows-deps-${{ env.OBS_DEPS }}-x64.zip -o"${{ github.workspace }}\cmbuild\deps" |
| 63 | + - name: "Restore OBS 64-bit build v${{ env.OBS_GIT_TAG }} from cache" |
85 | 64 | id: build-cache-obs-64 |
86 | 65 | uses: actions/cache@v1 |
87 | 66 | env: |
88 | | - CACHE_NAME: 'build-cache-obs-64' |
| 67 | + CACHE_NAME: "build-cache-obs-64" |
89 | 68 | with: |
90 | 69 | path: ${{ github.workspace }}/obs-studio/build64 |
91 | 70 | key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ env.OBS_GIT_TAG }} |
92 | 71 | restore-keys: | |
93 | 72 | ${{ runner.os }}-${{ env.CACHE_NAME }}- |
94 | | - - name: 'Configure OBS 64-bit' |
| 73 | + - name: "Configure OBS 64-bit" |
95 | 74 | if: steps.build-cache-obs-64.outputs.cache-hit != 'true' |
96 | 75 | working-directory: ${{ github.workspace }}/obs-studio |
97 | 76 | run: | |
98 | 77 | mkdir .\build64 |
99 | 78 | cd .\build64 |
100 | | - cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES .. |
101 | | - - name: 'Build OBS-Studio 64-bit' |
| 79 | + cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT" -DDepsPath="${{ github.workspace }}\cmbuild\deps" -DBUILD_CAPTIONS=YES -DCOPIED_DEPENDENCIES=NO -DCOPY_DEPENDENCIES=YES .. |
| 80 | + - name: "Build OBS-Studio 64-bit" |
102 | 81 | if: steps.build-cache-obs-64.outputs.cache-hit != 'true' |
103 | 82 | working-directory: ${{ github.workspace }}/obs-studio |
104 | 83 | run: | |
105 | 84 | msbuild /m /p:Configuration=RelWithDebInfo .\build64\libobs\libobs.vcxproj |
106 | 85 | msbuild /m /p:Configuration=RelWithDebInfo .\build64\UI\obs-frontend-api\obs-frontend-api.vcxproj |
107 | | - - name: 'Configure obs-virtual-cam 64-bit' |
| 86 | + - name: "Configure obs-virtual-cam 64-bit" |
108 | 87 | working-directory: ${{ github.workspace }}/obs-virtual-cam |
109 | 88 | run: | |
110 | 89 | mkdir .\build64 |
111 | 90 | cd .\build64 |
112 | | - cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017_64" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win64" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" -DPTHREAD_LIB="${{ github.workspace }}\obs-studio\build64\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" .. |
113 | | - - name: 'Configure obs-virtual-cam 32-bit' |
114 | | - working-directory: ${{ github.workspace }}/obs-virtual-cam |
115 | | - run: | |
116 | | - mkdir .\build32 |
117 | | - cd .\build32 |
118 | | - cmake -G "${{ env.CMAKE_GENERATOR }}" -A Win32 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT\${{ env.QT_VERSION }}\msvc2017" -DDepsPath="${{ github.workspace }}\cmbuild\deps\win32" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build32\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build32\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build32\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" -DPTHREAD_LIB="${{ github.workspace }}\obs-studio\build32\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" .. |
119 | | - - name: 'Build obs-virtual-cam 64-bit' |
| 91 | + cmake -G "${{ env.CMAKE_GENERATOR }}" -A x64 -DCMAKE_SYSTEM_VERSION="${{ env.CMAKE_SYSTEM_VERSION }}" -DQTDIR="${{ github.workspace }}\cmbuild\QT" -DDepsPath="${{ github.workspace }}\cmbuild\deps" -DLibObs_DIR="${{ github.workspace }}\obs-studio\build64\libobs" -DLIBOBS_INCLUDE_DIR="${{ github.workspace }}\obs-studio\libobs" -DLIBOBS_LIB="${{ github.workspace }}\obs-studio\build64\libobs\RelWithDebInfo\obs.lib" -DOBS_FRONTEND_LIB="${{ github.workspace }}\obs-studio\build64\UI\obs-frontend-api\RelWithDebInfo\obs-frontend-api.lib" -DPTHREAD_LIB="${{ github.workspace }}\obs-studio\build64\deps\w32-pthreads\RelWithDebInfo\w32-pthreads.lib" .. |
| 92 | + - name: "Build obs-virtual-cam 64-bit" |
120 | 93 | working-directory: ${{ github.workspace }}/obs-virtual-cam |
121 | 94 | run: msbuild /m /p:Configuration=RelWithDebInfo .\build64\obs-virtualcam.sln |
122 | | - - name: 'Build obs-virtual-cam 32-bit' |
123 | | - working-directory: ${{ github.workspace }}/obs-virtual-cam |
124 | | - run: msbuild /m /p:Configuration=RelWithDebInfo .\build32\obs-virtualcam.sln |
125 | | - - name: 'Set release filename' |
| 95 | + |
| 96 | + - name: "Set release filename" |
126 | 97 | shell: bash |
127 | 98 | run: | |
128 | 99 | FILENAME="OBS-Virtualcam-${{ env.GIT_TAG }}-Windows" |
129 | 100 | echo "::set-env name=WIN_FILENAME::$FILENAME" |
130 | | - - name: 'Package obs-virtual-cam' |
| 101 | + - name: "Package obs-virtual-cam" |
131 | 102 | working-directory: ${{ github.workspace }}/obs-virtual-cam |
132 | 103 | run: | |
133 | 104 | mkdir build-package\obs-plugins\64bit |
134 | | - mkdir build-package\obs-plugins\32bit |
135 | 105 | mkdir build-package\data\obs-plugins\obs-virtualoutput\locale\ |
136 | 106 | mkdir build-package\bin\64bit |
137 | | - mkdir build-package\bin\32bit |
138 | | - robocopy ${{ github.workspace }}\cmbuild\deps\win32\bin\ .\build-package\bin\32bit\ avutil-56.dll swscale-5.dll |
139 | 107 | robocopy .\build64\src\virtual-output\RelWithDebInfo .\build-package\obs-plugins\64bit\ obs-virtualoutput.dll obs-virtualoutput.stripped.pdb |
140 | 108 | robocopy .\build64\src\virtual-source\RelWithDebInfo .\build-package\bin\64bit\ obs-virtualsource.dll obs-virtualsource.stripped.pdb |
141 | | - robocopy .\build32\src\virtual-output\RelWithDebInfo .\build-package\obs-plugins\32bit\ obs-virtualoutput.dll obs-virtualoutput.stripped.pdb |
142 | | - robocopy .\build32\src\virtual-source\RelWithDebInfo .\build-package\bin\32bit\ obs-virtualsource.dll obs-virtualsource.stripped.pdb |
143 | 109 | robocopy .\locale\ .\build-package\data\obs-plugins\obs-virtualoutput\locale\ *.ini |
144 | 110 | ren .\build-package\obs-plugins\64bit\obs-virtualoutput.stripped.pdb obs-virtualoutput.pdb |
145 | | - ren .\build-package\obs-plugins\32bit\obs-virtualoutput.stripped.pdb obs-virtualoutput.pdb |
146 | 111 | ren .\build-package\bin\64bit\obs-virtualsource.stripped.pdb obs-virtualsource.pdb |
147 | | - ren .\build-package\bin\32bit\obs-virtualsource.stripped.pdb obs-virtualsource.pdb |
148 | 112 | mkdir release |
149 | 113 | 7z a ".\release\${{ env.WIN_FILENAME }}.zip" ".\build-package\*" |
150 | 114 | - name: Install NSIS |
151 | 115 | working-directory: ${{ github.workspace }}/obs-virtual-cam |
152 | 116 | run: | |
153 | | - Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') |
| 117 | + iex "& {$(irm get.scoop.sh)} -RunAsAdmin" |
154 | 118 | scoop bucket add extras |
155 | 119 | scoop install nsis |
156 | 120 | - name: Build obs-virtualcam installer |
157 | 121 | working-directory: ${{ github.workspace }}/obs-virtual-cam |
158 | 122 | run: | |
159 | 123 | cd installer |
160 | 124 | makensis /DVERSION=${{ env.GIT_TAG }} installer.nsi |
161 | | - - name: 'Publish ${{ env.WIN_FILENAME }}.zip' |
| 125 | + - name: "Publish ${{ env.WIN_FILENAME }}.zip" |
162 | 126 | if: success() |
163 | 127 | uses: actions/upload-artifact@v2-preview |
164 | 128 | with: |
165 | | - name: '${{ env.GIT_TAG }}-Windows' |
| 129 | + name: "${{ env.GIT_TAG }}-Windows" |
166 | 130 | path: ${{ github.workspace }}\obs-virtual-cam\release\*.zip |
167 | | - - name: 'Publish ${{ env.WIN_FILENAME }}-Windows-Installer.exe' |
| 131 | + - name: "Publish ${{ env.WIN_FILENAME }}-Windows-Installer.exe" |
168 | 132 | if: success() |
169 | 133 | uses: actions/upload-artifact@v2-preview |
170 | 134 | with: |
171 | | - name: '${{ env.GIT_TAG }}-Windows-Installer' |
| 135 | + name: "${{ env.GIT_TAG }}-Windows-Installer" |
172 | 136 | path: ${{ github.workspace }}\obs-virtual-cam\build-package\*.exe |
0 commit comments