From b14b18e4be45a3fd8a9f8b794d9f95012dc7d2b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20L?= Date: Sun, 17 Mar 2019 14:45:41 +0100 Subject: [PATCH 1/8] ci(macos): setup Azure Pipelines --- .travis.yml | 22 ---------------------- CI/install-build-obs-macos.sh | 6 ++++++ CI/install-dependencies-macos.sh | 6 +++--- CI/package-macos.sh | 9 +++------ azure-pipelines.yml | 20 ++++++++++++++++++++ 5 files changed, 32 insertions(+), 31 deletions(-) create mode 100644 azure-pipelines.yml diff --git a/.travis.yml b/.travis.yml index a8a74aa1..8e712fbb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,16 +32,6 @@ matrix: after_success: - docker exec -it xenial /root/obs-websocket/CI/package-xenial.sh - - os: osx - env: _macos_build - osx_image: xcode9.4 - before_install: - - "./CI/install-dependencies-macos.sh" - - "./CI/install-build-obs-macos.sh" - script: "./CI/build-macos.sh" - after_success: - - ./CI/package-macos.sh - deploy: - provider: s3 region: eu-central-1 @@ -57,15 +47,3 @@ deploy: - "$TRAVIS_OS_NAME = linux" - "-d /home/travis/package" all_branches: true -- provider: s3 - region: eu-central-1 - bucket: obs-websocket-osx-builds - access_key_id: "$AWS_ID" - secret_access_key: "$AWS_SECRET" - local_dir: release - skip_cleanup: true - acl: public_read - on: - repo: Palakis/obs-websocket - condition: "$TRAVIS_OS_NAME = osx" - all_branches: true diff --git a/CI/install-build-obs-macos.sh b/CI/install-build-obs-macos.sh index 6a33d9b4..351ce239 100755 --- a/CI/install-build-obs-macos.sh +++ b/CI/install-build-obs-macos.sh @@ -20,6 +20,10 @@ if [ "${HAS_GIT}" = "" ]; then exit 1 fi +echo "[obs-websocket] Downloading and unpacking OBS dependencies" +wget --quiet --retry-connrefused --waitretry=1 https://obs-nightly.s3.amazonaws.com/osx-deps-2018-08-09.tar.gz +tar -xf ./osx-deps-2018-08-09.tar.gz -C /tmp + # Build obs-studio cd .. echo "[obs-websocket] Cloning obs-studio from GitHub.." @@ -30,6 +34,8 @@ git checkout $OBSLatestTag mkdir build && cd build echo "[obs-websocket] Building obs-studio.." cmake .. \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \ -DDISABLE_PLUGINS=true \ + -DDepsPath=/tmp/obsdeps \ -DCMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake \ && make -j4 diff --git a/CI/install-dependencies-macos.sh b/CI/install-dependencies-macos.sh index 44a1e4b5..2761c419 100755 --- a/CI/install-dependencies-macos.sh +++ b/CI/install-dependencies-macos.sh @@ -19,7 +19,7 @@ echo "[obs-websocket] Updating Homebrew.." brew update >/dev/null echo "[obs-websocket] Checking installed Homebrew formulas.." BREW_PACKAGES=$(brew list) -BREW_DEPENDENCIES="ffmpeg libav cmake" +BREW_DEPENDENCIES="jack speexdsp ccache swig mbedtls" for DEPENDENCY in ${BREW_DEPENDENCIES}; do if echo "${BREW_PACKAGES}" | grep -q "^${DEPENDENCY}\$"; then @@ -39,7 +39,7 @@ echo "[obs-websocket] Installing obs-websocket dependency 'QT 5.10.1'.." # Pouring from the bottle is much quicker though, so use bottle for now. # =!= NOTICE =!= -brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/9a70413d137839de0054571e5f85fd07ee400955/Formula/qt.rb +brew install brew install https://gist.githubusercontent.com/DDRBoxman/b3956fab6073335a4bf151db0dcbd4ad/raw/ed1342a8a86793ea8c10d8b4d712a654da121ace/qt.rb # Pin this version of QT5 to avoid `brew upgrade` # upgrading it to incompatible version @@ -56,4 +56,4 @@ if [ "${HAS_PACKAGES}" = "" ]; then echo "[obs-websocket] Installing Packaging app (might require password due to 'sudo').." curl -o './Packages.pkg' --retry-connrefused -s --retry-delay 1 'https://s3-us-west-2.amazonaws.com/obs-nightly/Packages.pkg' sudo installer -pkg ./Packages.pkg -target / -fi \ No newline at end of file +fi diff --git a/CI/package-macos.sh b/CI/package-macos.sh index 7fc2e59b..5411ad2d 100755 --- a/CI/package-macos.sh +++ b/CI/package-macos.sh @@ -13,13 +13,10 @@ echo "[obs-websocket] Preparing package build" export QT_CELLAR_PREFIX="$(/usr/bin/find /usr/local/Cellar/qt -d 1 | sort -t '.' -k 1,1n -k 2,2n -k 3,3n | tail -n 1)" export GIT_HASH=$(git rev-parse --short HEAD) +export GIT_BRANCH_OR_TAG=$(git name-rev --name-only HEAD | awk -F/ '{print $NF}') -export VERSION="$GIT_HASH-$TRAVIS_BRANCH" -export LATEST_VERSION="$TRAVIS_BRANCH" -if [ -n "${TRAVIS_TAG}" ]; then - export VERSION="$TRAVIS_TAG" - export LATEST_VERSION="$TRAVIS_TAG" -fi +export VERSION="$GIT_HASH-$GIT_BRANCH_OR_TAG" +export LATEST_VERSION="$GIT_BRANCH_OR_TAG" export FILENAME="obs-websocket-$VERSION.pkg" export LATEST_FILENAME="obs-websocket-latest-$LATEST_VERSION.pkg" diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..6e318056 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,20 @@ +pool: + vmImage: 'macOS-10.13' + +steps: +- script: ./CI/install-dependencies-macos.sh + displayName: 'Install Dependencies' + +- script: ./CI/install-build-obs-macos.sh + displayName: 'Build OBS' + +- script: ./CI/build-macos.sh + displayName: 'Build obs-websocket' + +- script: ./CI/package-macos.sh + displayName: 'Package' + +- task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: './package' + artifactName: 'build' From e06b3e20521db51ddd056d81fcb06ce50f1c31a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20L?= Date: Sun, 17 Mar 2019 14:48:17 +0100 Subject: [PATCH 2/8] readme: Azure Pipelines CI badge --- BUILDING.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index fcd9e423..52b91656 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -57,5 +57,6 @@ This will result in a ready-to-use `obs-websocket.pkg` installer in the `release ## Automated Builds -- Windows : [![Automated Build status for Windows](https://ci.appveyor.com/api/projects/status/github/Palakis/obs-websocket)](https://ci.appveyor.com/project/Palakis/obs-websocket/history) -- Linux & OS X : [![Automated Build status for Linux & OS X](https://travis-ci.org/Palakis/obs-websocket.svg?branch=master)](https://travis-ci.org/Palakis/obs-websocket) +- Windows: [![Automated Build status for Windows](https://ci.appveyor.com/api/projects/status/github/Palakis/obs-websocket)](https://ci.appveyor.com/project/Palakis/obs-websocket/history) +- Linux: [![Automated Build status for Linux](https://travis-ci.org/Palakis/obs-websocket.svg?branch=master)](https://travis-ci.org/Palakis/obs-websocket) +- macOS: [![Automated Build status for macOS](https://img.shields.io/azure-devops/build/Palakis/obs-websocket/Palakis.obs-websocket.svg)](https://dev.azure.com/Palakis/obs-websocket/_build) From 4f607df5fcf4706a09cbf222eb0b24303c8d9414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20L?= Date: Sun, 17 Mar 2019 15:01:01 +0100 Subject: [PATCH 3/8] ci(macos): fix typo --- CI/install-dependencies-macos.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CI/install-dependencies-macos.sh b/CI/install-dependencies-macos.sh index 2761c419..61ed0d1e 100755 --- a/CI/install-dependencies-macos.sh +++ b/CI/install-dependencies-macos.sh @@ -1,5 +1,7 @@ #!/bin/sh +set -ev + OSTYPE=$(uname) if [ "${OSTYPE}" != "Darwin" ]; then @@ -39,7 +41,7 @@ echo "[obs-websocket] Installing obs-websocket dependency 'QT 5.10.1'.." # Pouring from the bottle is much quicker though, so use bottle for now. # =!= NOTICE =!= -brew install brew install https://gist.githubusercontent.com/DDRBoxman/b3956fab6073335a4bf151db0dcbd4ad/raw/ed1342a8a86793ea8c10d8b4d712a654da121ace/qt.rb +brew install https://gist.githubusercontent.com/DDRBoxman/b3956fab6073335a4bf151db0dcbd4ad/raw/ed1342a8a86793ea8c10d8b4d712a654da121ace/qt.rb # Pin this version of QT5 to avoid `brew upgrade` # upgrading it to incompatible version From eeeca8afd0be8049592f5dec9bac774a0c8cc830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Sun, 17 Mar 2019 15:38:59 +0100 Subject: [PATCH 4/8] ci(macos): remove set -ev --- CI/install-dependencies-macos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/install-dependencies-macos.sh b/CI/install-dependencies-macos.sh index 61ed0d1e..0adf464b 100755 --- a/CI/install-dependencies-macos.sh +++ b/CI/install-dependencies-macos.sh @@ -1,6 +1,6 @@ #!/bin/sh -set -ev + OSTYPE=$(uname) From 4bc02a7389a63cee576ceb358d7363ea87407a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Thu, 21 Mar 2019 21:56:07 +0100 Subject: [PATCH 5/8] ci(macos): install boost --- CI/install-dependencies-macos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/install-dependencies-macos.sh b/CI/install-dependencies-macos.sh index 0adf464b..21a3ae55 100755 --- a/CI/install-dependencies-macos.sh +++ b/CI/install-dependencies-macos.sh @@ -21,7 +21,7 @@ echo "[obs-websocket] Updating Homebrew.." brew update >/dev/null echo "[obs-websocket] Checking installed Homebrew formulas.." BREW_PACKAGES=$(brew list) -BREW_DEPENDENCIES="jack speexdsp ccache swig mbedtls" +BREW_DEPENDENCIES="jack speexdsp ccache swig mbedtls boost" for DEPENDENCY in ${BREW_DEPENDENCIES}; do if echo "${BREW_PACKAGES}" | grep -q "^${DEPENDENCY}\$"; then From 5f2dfb24ca79671d41a3f4afc981097dac35791f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Thu, 21 Mar 2019 22:18:29 +0100 Subject: [PATCH 6/8] ci(macos): checkout submodules --- BUILDING.md | 6 +++--- azure-pipelines.yml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 52b91656..a5a9f4a0 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -57,6 +57,6 @@ This will result in a ready-to-use `obs-websocket.pkg` installer in the `release ## Automated Builds -- Windows: [![Automated Build status for Windows](https://ci.appveyor.com/api/projects/status/github/Palakis/obs-websocket)](https://ci.appveyor.com/project/Palakis/obs-websocket/history) -- Linux: [![Automated Build status for Linux](https://travis-ci.org/Palakis/obs-websocket.svg?branch=master)](https://travis-ci.org/Palakis/obs-websocket) -- macOS: [![Automated Build status for macOS](https://img.shields.io/azure-devops/build/Palakis/obs-websocket/Palakis.obs-websocket.svg)](https://dev.azure.com/Palakis/obs-websocket/_build) + - Windows: [![Automated Build status for Windows](https://ci.appveyor.com/api/projects/status/github/Palakis/obs-websocket)](https://ci.appveyor.com/project/Palakis/obs-websocket/history) + - Linux: [![Automated Build status for Linux](https://travis-ci.org/Palakis/obs-websocket.svg?branch=master)](https://travis-ci.org/Palakis/obs-websocket) + - macOS: [![Automated Build status for macOS](https://img.shields.io/azure-devops/build/Palakis/obs-websocket/Palakis.obs-websocket.svg)](https://dev.azure.com/Palakis/obs-websocket/_build) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6e318056..d4df21db 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +2,9 @@ pool: vmImage: 'macOS-10.13' steps: +- checkout: self + submodules: true + - script: ./CI/install-dependencies-macos.sh displayName: 'Install Dependencies' From 3cce89ea3f05b6bc3444cee9c638f92977f1180a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Thu, 21 Mar 2019 22:28:08 +0100 Subject: [PATCH 7/8] ci(macos): fix artifacts publishing --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d4df21db..ec85baf6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -19,5 +19,5 @@ steps: - task: PublishBuildArtifacts@1 inputs: - pathtoPublish: './package' + pathtoPublish: './release' artifactName: 'build' From cb3af837c6020554448440b5662510e11313f945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Thu, 21 Mar 2019 22:36:30 +0100 Subject: [PATCH 8/8] readme: fix building.md --- BUILDING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index a5a9f4a0..52b91656 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -57,6 +57,6 @@ This will result in a ready-to-use `obs-websocket.pkg` installer in the `release ## Automated Builds - - Windows: [![Automated Build status for Windows](https://ci.appveyor.com/api/projects/status/github/Palakis/obs-websocket)](https://ci.appveyor.com/project/Palakis/obs-websocket/history) - - Linux: [![Automated Build status for Linux](https://travis-ci.org/Palakis/obs-websocket.svg?branch=master)](https://travis-ci.org/Palakis/obs-websocket) - - macOS: [![Automated Build status for macOS](https://img.shields.io/azure-devops/build/Palakis/obs-websocket/Palakis.obs-websocket.svg)](https://dev.azure.com/Palakis/obs-websocket/_build) +- Windows: [![Automated Build status for Windows](https://ci.appveyor.com/api/projects/status/github/Palakis/obs-websocket)](https://ci.appveyor.com/project/Palakis/obs-websocket/history) +- Linux: [![Automated Build status for Linux](https://travis-ci.org/Palakis/obs-websocket.svg?branch=master)](https://travis-ci.org/Palakis/obs-websocket) +- macOS: [![Automated Build status for macOS](https://img.shields.io/azure-devops/build/Palakis/obs-websocket/Palakis.obs-websocket.svg)](https://dev.azure.com/Palakis/obs-websocket/_build)