From 415fb732454370a4dd7791b1370b4b4a8c92ff75 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Tue, 13 Apr 2021 05:35:13 -0700 Subject: [PATCH] CI: Update and improve Ubuntu build --- CI/{build-ubuntu.sh => linux/build-plugin-ubuntu.sh} | 3 +++ CI/{ => linux}/install-dependencies-ubuntu.sh | 9 ++++++++- CI/{package-ubuntu.sh => linux/package-plugin-ubuntu.sh} | 4 ++-- azure-pipelines.yml | 8 ++++---- 4 files changed, 17 insertions(+), 7 deletions(-) rename CI/{build-ubuntu.sh => linux/build-plugin-ubuntu.sh} (57%) rename CI/{ => linux}/install-dependencies-ubuntu.sh (53%) rename CI/{package-ubuntu.sh => linux/package-plugin-ubuntu.sh} (81%) diff --git a/CI/build-ubuntu.sh b/CI/linux/build-plugin-ubuntu.sh similarity index 57% rename from CI/build-ubuntu.sh rename to CI/linux/build-plugin-ubuntu.sh index 498840ef..584242f4 100755 --- a/CI/build-ubuntu.sh +++ b/CI/linux/build-plugin-ubuntu.sh @@ -1,6 +1,9 @@ #!/bin/sh set -ex +echo "[obs-websocket] Running CMake.." mkdir build && cd build cmake -DCMAKE_INSTALL_PREFIX=/usr -DUSE_UBUNTU_FIX=true .. + +echo "[obs-websocket] Building plugin.." make -j4 diff --git a/CI/install-dependencies-ubuntu.sh b/CI/linux/install-dependencies-ubuntu.sh similarity index 53% rename from CI/install-dependencies-ubuntu.sh rename to CI/linux/install-dependencies-ubuntu.sh index 4ed044da..43cd58f1 100755 --- a/CI/install-dependencies-ubuntu.sh +++ b/CI/linux/install-dependencies-ubuntu.sh @@ -1,9 +1,11 @@ #!/bin/sh set -ex +echo "[obs-websocket] Installing obs-studio PPA and updates.." sudo add-apt-repository -y ppa:obsproject/obs-studio sudo apt-get -qq update +echo "[obs-websocket] Installing obs-studio and dependencies.." sudo apt-get install -y \ libc-dev-bin \ libc6-dev git \ @@ -13,7 +15,12 @@ sudo apt-get install -y \ obs-studio \ qtbase5-dev +echo "[obs-websocket] Installed OBS Version: $(obs --version)" + +ls /usr/include/ +ls /usr/include/obs/ + # Dirty hack -sudo wget -O /usr/include/obs/obs-frontend-api.h https://raw.githubusercontent.com/obsproject/obs-studio/26.0.0/UI/obs-frontend-api/obs-frontend-api.h +sudo wget -O /usr/include/obs/obs-frontend-api.h https://raw.githubusercontent.com/obsproject/obs-studio/26.1.2/UI/obs-frontend-api/obs-frontend-api.h sudo ldconfig diff --git a/CI/package-ubuntu.sh b/CI/linux/package-plugin-ubuntu.sh similarity index 81% rename from CI/package-ubuntu.sh rename to CI/linux/package-plugin-ubuntu.sh index 517e0054..fb3aac46 100755 --- a/CI/package-ubuntu.sh +++ b/CI/linux/package-plugin-ubuntu.sh @@ -7,7 +7,7 @@ export PKG_VERSION="1-$GIT_HASH-$BRANCH_SHORT_NAME-git" if [[ $BRANCH_FULL_NAME =~ ^refs/tags/ ]]; then export PKG_VERSION="$BRANCH_SHORT_NAME" - echo "[obs-websocket] Branch is a tag. Setting version to $PKG_VERSION." + echo "[obs-websocket] Branch is a tag. Setting version to $PKG_VERSION." fi cd ./build @@ -18,7 +18,7 @@ PAGER="cat" sudo checkinstall -y --type=debian --fstrans=no --nodoc \ --pkglicense="GPLv2.0" --maintainer="stephane.lepin@gmail.com" \ --pkggroup="video" \ --pkgsource="https://github.com/Palakis/obs-websocket" \ - --requires="obs-studio \(\>= 25.0.7\), libqt5core5a, libqt5widgets5, qt5-image-formats-plugins" \ + --requires="obs-studio \(\>= 26.1.0\), libqt5core5a, libqt5widgets5, qt5-image-formats-plugins" \ --pakdir="../package" sudo chmod ao+r ../package/* diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4103d3af..ff54ad50 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -131,7 +131,7 @@ jobs: - job: 'Build_Linux' pool: - vmImage: 'ubuntu-18.04' + vmImage: 'ubuntu-20.04' variables: BUILD_REASON: $(Build.Reason) BRANCH_SHORT_NAME: $(Build.SourceBranchName) @@ -140,13 +140,13 @@ jobs: - checkout: self submodules: true - - script: ./CI/install-dependencies-ubuntu.sh + - script: ./CI/linux/install-dependencies-ubuntu.sh displayName: 'Install dependencies' - - script: ./CI/build-ubuntu.sh + - script: ./CI/linux/build-plugin-ubuntu.sh displayName: 'Build obs-websocket' - - script: ./CI/package-ubuntu.sh + - script: ./CI/linux/package-plugin-ubuntu.sh displayName: 'Package obs-websocket' - task: PublishBuildArtifacts@1