From e17cadaf38172b9e85a0df2181f97df301d78d79 Mon Sep 17 00:00:00 2001 From: Colin Edwards Date: Wed, 6 Mar 2019 00:02:06 -0600 Subject: [PATCH] CI: Build for windows on Azure Pipelines --- CI/before-deploy-win.cmd | 6 +-- CI/install-qt-win.cmd | 4 ++ CI/install-script-win.cmd | 12 +++--- appveyor.yml | 2 + azure-pipelines.yml | 82 ++++++++++++++++++++++++++------------- 5 files changed, 70 insertions(+), 36 deletions(-) create mode 100644 CI/install-qt-win.cmd diff --git a/CI/before-deploy-win.cmd b/CI/before-deploy-win.cmd index 0597fe00e..e9dcb48dd 100644 --- a/CI/before-deploy-win.cmd +++ b/CI/before-deploy-win.cmd @@ -1,3 +1,3 @@ -robocopy C:\projects\obs-studio\build32\rundir\RelWithDebInfo C:\projects\obs-studio\build\ /E /XF .gitignore -robocopy C:\projects\obs-studio\build64\rundir\RelWithDebInfo C:\projects\obs-studio\build\ /E /XC /XN /XO /XF .gitignore -7z a build.zip C:\projects\obs-studio\build\* \ No newline at end of file +robocopy .\build32\rundir\RelWithDebInfo .\build\ /E /XF .gitignore +robocopy .\build64\rundir\RelWithDebInfo .\build\ /E /XC /XN /XO /XF .gitignore +7z a build.zip .\build\* \ No newline at end of file diff --git a/CI/install-qt-win.cmd b/CI/install-qt-win.cmd new file mode 100644 index 000000000..46e14e8ad --- /dev/null +++ b/CI/install-qt-win.cmd @@ -0,0 +1,4 @@ +curl -kLO https://cdn-fastly.obsproject.com/downloads/Qt_5.10.1.7z -f --retry 5 -C - +7z x Qt_5.10.1.7z -oQt +mv Qt C:\QtDep +dir C:\QtDep \ No newline at end of file diff --git a/CI/install-script-win.cmd b/CI/install-script-win.cmd index ffbfbf06f..4935a2f76 100644 --- a/CI/install-script-win.cmd +++ b/CI/install-script-win.cmd @@ -1,7 +1,7 @@ -if exist dependencies2017.zip (curl -kLO https://obsproject.com/downloads/dependencies2017.zip -f --retry 5 -z dependencies2017.zip) else (curl -kLO https://obsproject.com/downloads/dependencies2017.zip -f --retry 5 -C -) -if exist vlc.zip (curl -kLO https://obsproject.com/downloads/vlc.zip -f --retry 5 -z vlc.zip) else (curl -kLO https://obsproject.com/downloads/vlc.zip -f --retry 5 -C -) -if exist cef_binary_%CEF_VERSION%_windows32.zip (curl -kLO https://obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows32.zip -f --retry 5 -z cef_binary_%CEF_VERSION%_windows32.zip) else (curl -kLO https://obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows32.zip -f --retry 5 -C -) -if exist cef_binary_%CEF_VERSION%_windows64.zip (curl -kLO https://obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows64.zip -f --retry 5 -z cef_binary_%CEF_VERSION%_windows64.zip) else (curl -kLO https://obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows64.zip -f --retry 5 -C -) +if exist dependencies2017.zip (curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies2017.zip -f --retry 5 -z dependencies2017.zip) else (curl -kLO https://cdn-fastly.obsproject.com/downloads/dependencies2017.zip -f --retry 5 -C -) +if exist vlc.zip (curl -kLO https://cdn-fastly.obsproject.com/downloads/vlc.zip -f --retry 5 -z vlc.zip) else (curl -kLO https://cdn-fastly.obsproject.com/downloads/vlc.zip -f --retry 5 -C -) +if exist cef_binary_%CEF_VERSION%_windows32.zip (curl -kLO https://cdn-fastly.obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows32.zip -f --retry 5 -z cef_binary_%CEF_VERSION%_windows32.zip) else (curl -kLO https://cdn-fastly.obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows32.zip -f --retry 5 -C -) +if exist cef_binary_%CEF_VERSION%_windows64.zip (curl -kLO https://cdn-fastly.obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows64.zip -f --retry 5 -z cef_binary_%CEF_VERSION%_windows64.zip) else (curl -kLO https://cdn-fastly.obsproject.com/downloads/cef_binary_%CEF_VERSION%_windows64.zip -f --retry 5 -C -) 7z x dependencies2017.zip -odependencies2017 7z x vlc.zip -ovlc 7z x cef_binary_%CEF_VERSION%_windows32.zip -oCEF_32 @@ -9,8 +9,8 @@ if exist cef_binary_%CEF_VERSION%_windows64.zip (curl -kLO https://obsproject.co set DepsPath32=%CD%\dependencies2017\win32 set DepsPath64=%CD%\dependencies2017\win64 set VLCPath=%CD%\vlc -set QTDIR32=C:\Qt\5.11\msvc2015 -set QTDIR64=C:\Qt\5.11\msvc2017_64 +set QTDIR32=C:\QtDep\5.10.1\msvc2017 +set QTDIR64=C:\QtDep\5.10.1\msvc2017_64 set CEF_32=%CD%\CEF_32\cef_binary_%CEF_VERSION%_windows32 set CEF_64=%CD%\CEF_64\cef_binary_%CEF_VERSION%_windows64 set build_config=RelWithDebInfo diff --git a/appveyor.yml b/appveyor.yml index c3bc24410..dd4dd223c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,6 +17,7 @@ environment: install: - git submodule update --init --recursive + - cmd: C:\projects\obs-studio\CI\install-qt-win.cmd - cmd: C:\projects\obs-studio\CI\install-script-win.cmd - sh: ./CI/install-dependencies-linux-ubuntu16.sh - sh: ./CI/before-script-linux.sh @@ -40,6 +41,7 @@ cache: - vlc.zip - 'cef_binary_%CEF_VERSION%_windows32.zip' - 'cef_binary_%CEF_VERSION%_windows64.zip' + - Qt_5.10.1.7z notifications: - provider: Webhook diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e74bb5bec..f58b568bd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,37 +1,65 @@ -# Starter pipeline -# Start with a minimal pipeline that you can customize to build and deploy your code. -# Add steps that build, run tests, deploy, and more: # https://aka.ms/yaml -pool: - vmImage: 'macOS-10.13' - variables: CMAKE_PREFIX_PATH: /usr/local/opt/qt5/lib/cmake - CEF_BUILD_VERSION: 3.3282.1726.gc8368c8 + CEF_BUILD_VERSION: 3.3282.1726.gc8368c8 + CEF_VERSION: 3.3440.1805.gbe070f9 -steps: -- script: git submodule update --init --recursive - displayName: 'Checkout Submodules' +jobs: +- job: 'Build_macOS' + pool: + vmImage: 'macos-10.13' + steps: + - script: git submodule update --init --recursive + displayName: 'Checkout Submodules' + - script: ./CI/install-dependencies-osx.sh + displayName: 'Install Dependencies' -- script: ./CI/install-dependencies-osx.sh - displayName: 'Install Dependencies' + - script: ./CI/before-script-osx.sh + displayName: 'Cmake' -- script: ./CI/before-script-osx.sh - displayName: 'Cmake' + - bash: | + cd ./build + make -j4 + cd - + displayName: 'Build' -- bash: | - cd ./build - make -j4 - cd - - displayName: 'Build' + - script: ./CI/before-deploy-osx.sh + condition: ne(variables['Build.Reason'], 'PullRequest') + displayName: 'Before Deploy' -- script: ./CI/before-deploy-osx.sh - condition: ne(variables['Build.Reason'], 'PullRequest') - displayName: 'Before Deploy' + - task: PublishBuildArtifacts@1 + condition: ne(variables['Build.Reason'], 'PullRequest') + inputs: + pathtoPublish: './nightly' + artifactName: build + +- job: 'Build_Windows' + pool: + vmImage: 'vs2017-win2016' + steps: + - script: git submodule update --init --recursive + displayName: 'Checkout Submodules' + - script: ./CI/install-qt-win.cmd + displayName: 'Install QT' + - script: ./CI/install-script-win.cmd + displayName: 'Download / Setup Deps' + - task: MSBuild@1 + displayName: 'Build 32-bit' + inputs: + msbuildArguments: '/m /p:Configuration=RelWithDebInfo' + solution: .\build32\obs-studio.sln + - task: MSBuild@1 + displayName: 'Build 64-bit' + inputs: + msbuildArguments: '/m /p:Configuration=RelWithDebInfo' + solution: .\build64\obs-studio.sln + - script: ./CI/before-deploy-win.cmd + condition: ne(variables['Build.Reason'], 'PullRequest') + displayName: 'Before deploy' + - task: PublishBuildArtifacts@1 + condition: ne(variables['Build.Reason'], 'PullRequest') + inputs: + pathtoPublish: './build' + artifactName: winbuild -- task: PublishBuildArtifacts@1 - condition: ne(variables['Build.Reason'], 'PullRequest') - inputs: - pathtoPublish: './nightly' - artifactName: build