提交 a09ad610 编写于 作者: C Colin Edwards

CI: macOS builds on Azure Pipelines

上级 ef270c8b
...@@ -9,7 +9,7 @@ set -e ...@@ -9,7 +9,7 @@ set -e
# Generate file name variables # Generate file name variables
export GIT_HASH=$(git rev-parse --short HEAD) export GIT_HASH=$(git rev-parse --short HEAD)
export FILE_DATE=$(date +%Y-%m-%d.%H:%M:%S) export FILE_DATE=$(date +%Y-%m-%d.%H-%M-%S)
export FILENAME=$FILE_DATE-$GIT_HASH-$TRAVIS_BRANCH-osx.pkg export FILENAME=$FILE_DATE-$GIT_HASH-$TRAVIS_BRANCH-osx.pkg
cd ./build cd ./build
...@@ -49,20 +49,24 @@ sudo install_name_tool -change \ ...@@ -49,20 +49,24 @@ sudo install_name_tool -change \
hr "Generating .pkg" hr "Generating .pkg"
packagesbuild ../CI/install/osx/CMakeLists.pkgproj packagesbuild ../CI/install/osx/CMakeLists.pkgproj
# Signing stuff if [ -v "$TRAVIS" ]; then
hr "Decrypting Cert" # Signing stuff
openssl aes-256-cbc -K $encrypted_dd3c7f5e9db9_key -iv $encrypted_dd3c7f5e9db9_iv -in ../CI/osxcert/Certificates.p12.enc -out Certificates.p12 -d hr "Decrypting Cert"
hr "Creating Keychain" openssl aes-256-cbc -K $encrypted_dd3c7f5e9db9_key -iv $encrypted_dd3c7f5e9db9_iv -in ../CI/osxcert/Certificates.p12.enc -out Certificates.p12 -d
security create-keychain -p mysecretpassword build.keychain hr "Creating Keychain"
security default-keychain -s build.keychain security create-keychain -p mysecretpassword build.keychain
security unlock-keychain -p mysecretpassword build.keychain security default-keychain -s build.keychain
security set-keychain-settings -t 3600 -u build.keychain security unlock-keychain -p mysecretpassword build.keychain
hr "Importing certs into keychain" security set-keychain-settings -t 3600 -u build.keychain
security import ./Certificates.p12 -k build.keychain -T /usr/bin/productsign -P "" hr "Importing certs into keychain"
# macOS 10.12+ security import ./Certificates.p12 -k build.keychain -T /usr/bin/productsign -P ""
security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain # macOS 10.12+
hr "Signing Package" security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword build.keychain
productsign --sign 2MMRE5MTB8 ./OBS.pkg ./$FILENAME hr "Signing Package"
productsign --sign 2MMRE5MTB8 ./OBS.pkg ./$FILENAME
else
cp ./OBS.pkg ./$FILENAME
fi
# Move to the folder that travis uses to upload artifacts from # Move to the folder that travis uses to upload artifacts from
hr "Moving package to nightly folder for distribution" hr "Moving package to nightly folder for distribution"
......
...@@ -10,7 +10,9 @@ set -e ...@@ -10,7 +10,9 @@ set -e
# Echo all commands before executing # Echo all commands before executing
set -v set -v
git fetch --unshallow if [ -v "$TRAVIS" ]; then
git fetch --unshallow
fi
# Leave obs-studio folder # Leave obs-studio folder
cd ../ cd ../
......
...@@ -9,6 +9,10 @@ OBS Studio <https://obsproject.com> ...@@ -9,6 +9,10 @@ OBS Studio <https://obsproject.com>
:alt: OBS Studio Build Status - AppVeyor CI :alt: OBS Studio Build Status - AppVeyor CI
:target: https://ci.appveyor.com/project/jp9000/obs-studio/branch/master :target: https://ci.appveyor.com/project/jp9000/obs-studio/branch/master
.. image:: https://dev.azure.com/obsjim/obsjim/_apis/build/status/obsproject.obs-studio?branchName=master
:alt: OBS Studio Build Status - Azure Pipelines
:target: https://dev.azure.com/obsjim/obsjim/_build/latest?definitionId=1&branchName=master
.. image:: https://discordapp.com/api/guilds/348973006581923840/widget.png?style=shield .. image:: https://discordapp.com/api/guilds/348973006581923840/widget.png?style=shield
:alt: OBS Studio Discord Server :alt: OBS Studio Discord Server
:target: https://obsproject.com/discord :target: https://obsproject.com/discord
......
# 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
steps:
- script: git submodule update --init --recursive
displayName: 'Checkout Submodules'
- script: ./CI/install-dependencies-osx.sh
displayName: 'Install Dependencies'
- script: ./CI/before-script-osx.sh
displayName: 'Cmake'
- bash: |
cd ./build
make -j4
cd -
displayName: 'Build'
- 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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册