浏览代码

Merge pull request #1477 from RytoEX/ci-appveyor-linux

CI: Build on Linux with AppVeyor
Jim 7 年之前
父节点
当前提交
14ae6351d4
共有 4 个文件被更改,包括 96 次插入25 次删除
  1. 57 0
      CI/install-dependencies-linux-ubuntu16.sh
  2. 4 0
      CI/install-script-linux.sh
  3. 22 0
      CI/install-script-win.cmd
  4. 13 25
      appveyor.yml

+ 57 - 0
CI/install-dependencies-linux-ubuntu16.sh

@@ -0,0 +1,57 @@
+#!/bin/sh
+set -ex
+
+sudo apt-get -qq update
+sudo apt-get install -y \
+        build-essential \
+        checkinstall \
+        cmake \
+        libasound2-dev \
+        libavcodec-dev \
+        libavdevice-dev \
+        libavfilter-dev \
+        libavformat-dev \
+        libavutil-dev \
+        libcurl4-openssl-dev \
+        libfdk-aac-dev \
+        libfontconfig-dev \
+        libfreetype6-dev \
+        libgl1-mesa-dev \
+        libjack-jackd2-dev \
+        libjansson-dev \
+        libluajit-5.1-dev \
+        libpulse-dev \
+        libqt5x11extras5-dev \
+        libspeexdsp-dev \
+        libswresample-dev \
+        libswscale-dev \
+        libudev-dev \
+        libv4l-dev \
+        libvlc-dev \
+        libx11-dev \
+        libx264-dev \
+        libxcb-shm0-dev \
+        libxcb-xinerama0-dev \
+        libxcomposite-dev \
+        libxinerama-dev \
+        pkg-config \
+        python3-dev \
+        qtbase5-dev \
+        swig
+
+
+# build mbedTLS
+cd ~/projects
+mkdir mbedtls
+cd mbedtls
+mbedtlsPath=$PWD
+curl -L -O https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.12.0.tar.gz
+tar -xf mbedtls-2.12.0.tar.gz
+mkdir build
+cd ./build
+cmake -DENABLE_TESTING=Off -DUSE_SHARED_MBEDTLS_LIBRARY=On ../mbedtls-mbedtls-2.12.0
+make -j 12
+sudo make install
+
+# return to OBS build dir
+cd $APPVEYOR_BUILD_FOLDER

+ 4 - 0
CI/install-script-linux.sh

@@ -0,0 +1,4 @@
+#!/bin/sh
+set -ex
+
+build_config=RelWithDebInfo

+ 22 - 0
CI/install-script-win.cmd

@@ -0,0 +1,22 @@
+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 -)
+7z x dependencies2017.zip -odependencies2017
+7z x vlc.zip -ovlc
+7z x cef_binary_%CEF_VERSION%_windows32.zip -oCEF_32
+7z x cef_binary_%CEF_VERSION%_windows64.zip -oCEF_64
+set DepsPath32=%CD%\dependencies2017\win32
+set DepsPath64=%CD%\dependencies2017\win64
+set VLCPath=%CD%\vlc
+set QTDIR32=C:\Qt\5.11.1\msvc2015
+set QTDIR64=C:\Qt\5.11.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
+mkdir build build32 build64
+cd ./build32
+cmake -G "Visual Studio 15 2017" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true -DBUILD_CAPTIONS=true -DCOMPILE_D3D12_HOOK=true -DBUILD_BROWSER=true -DCEF_ROOT_DIR=%CEF_32% ..
+cd ../build64
+cmake -G "Visual Studio 15 2017 Win64" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true -DBUILD_CAPTIONS=true -DCOMPILE_D3D12_HOOK=true -DBUILD_BROWSER=true -DCEF_ROOT_DIR=%CEF_64% ..
+cd ..

+ 13 - 25
appveyor.yml

@@ -1,38 +1,26 @@
-image: Visual Studio 2017
+image:
+ - Ubuntu
+ - Visual Studio 2017
+
 environment:
 environment:
   CURL_VERSION: 7.56.1
   CURL_VERSION: 7.56.1
   CEF_VERSION: 3.3440.1805.gbe070f9
   CEF_VERSION: 3.3440.1805.gbe070f9
+  APPVEYOR_YML_DISABLE_PS_LINUX: true
 
 
 install:
 install:
   - git submodule update --init --recursive
   - git submodule update --init --recursive
-  - 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 -)
-  - 7z x dependencies2017.zip -odependencies2017
-  - 7z x vlc.zip -ovlc
-  - 7z x cef_binary_%CEF_VERSION%_windows32.zip -oCEF_32
-  - 7z x cef_binary_%CEF_VERSION%_windows64.zip -oCEF_64
-  - set DepsPath32=%CD%\dependencies2017\win32
-  - set DepsPath64=%CD%\dependencies2017\win64
-  - set VLCPath=%CD%\vlc
-  - set QTDIR32=C:\Qt\5.11.1\msvc2015
-  - set QTDIR64=C:\Qt\5.11.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
-  - mkdir build build32 build64
-  - cd ./build32
-  - cmake -G "Visual Studio 15 2017" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true -DBUILD_CAPTIONS=true -DCOMPILE_D3D12_HOOK=true -DBUILD_BROWSER=true -DCEF_ROOT_DIR=%CEF_32% ..
-  - cd ../build64
-  - cmake -G "Visual Studio 15 2017 Win64" -DCOPIED_DEPENDENCIES=false -DCOPY_DEPENDENCIES=true -DBUILD_CAPTIONS=true -DCOMPILE_D3D12_HOOK=true -DBUILD_BROWSER=true -DCEF_ROOT_DIR=%CEF_64% ..
+  - cmd: C:\projects\obs-studio\CI\install-script-win.cmd
+  - sh: ./CI/install-dependencies-linux-ubuntu16.sh
+  - sh: ./CI/before-script-linux.sh
+  - sh: ./CI/install-script-linux.sh
 
 
 build_script:
 build_script:
-  - call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build32\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
-  - call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build64\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+  - cmd: call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build32\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+  - cmd: call msbuild /m /p:Configuration=%build_config% C:\projects\obs-studio\build64\obs-studio.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
+  - sh: cd ./build && make -j4 && cd -
 
 
 before_deploy:
 before_deploy:
-  - C:\projects\obs-studio\CI\before-deploy-win.cmd
+  - cmd: C:\projects\obs-studio\CI\before-deploy-win.cmd
 
 
 deploy_script:
 deploy_script:
   - ps: Push-AppveyorArtifact "build.zip" -FileName "$(git describe).zip"
   - ps: Push-AppveyorArtifact "build.zip" -FileName "$(git describe).zip"