94 строки
3.6 KiB
YAML
94 строки
3.6 KiB
YAML
trigger:
|
|
- master
|
|
|
|
pr:
|
|
- master
|
|
|
|
pool:
|
|
vmImage: macOS-12
|
|
|
|
variables:
|
|
Configuration: Release
|
|
SDK:
|
|
|
|
# Xcode 13.2.1 version is the last one that has compatible bitcode with Xcode 13.0 (minimal supported).
|
|
XCODE_PATH: '/Applications/Xcode_13.2.1.app/Contents/Developer'
|
|
|
|
jobs:
|
|
- job:
|
|
displayName: Build SDK for All Platforms
|
|
steps:
|
|
- checkout: self
|
|
|
|
- bash: 'brew install doxygen graphviz protobuf-c'
|
|
displayName: 'Install dependencies'
|
|
|
|
- task: Xcode@5
|
|
displayName: 'Build Crash Reporter'
|
|
inputs:
|
|
xcWorkspacePath: CrashReporter.xcodeproj
|
|
scheme: 'CrashReporter'
|
|
xcodeVersion: specifyPath
|
|
xcodeDeveloperDir: '$(XCODE_PATH)'
|
|
args: 'SYMROOT="$(Build.BinariesDirectory)" GCC_TREAT_WARNINGS_AS_ERRORS=YES SWIFT_TREAT_WARNINGS_AS_ERRORS=YES'
|
|
|
|
- bash: |
|
|
cp -f "Release-macosx/libCrashReporter.a" "Release/Static/libCrashReporter-MacOSX-Static.a"
|
|
lipo -info "Release/Static/libCrashReporter-MacOSX-Static.a"
|
|
rm -rf "Release/Mac OS X Framework/CrashReporter.framework" "Release/Mac OS X Framework/CrashReporter.framework.dSYM"
|
|
cp -R "Release-macosx/CrashReporter.framework" "Release-macosx/CrashReporter.framework.dSYM" "Release/Mac OS X Framework"
|
|
lipo -info "Release/Mac OS X Framework/CrashReporter.framework/CrashReporter"
|
|
cp -f "Release-macosx/plcrashutil" "Release/Tools"
|
|
lipo -info "Release/Tools/plcrashutil"
|
|
displayName: 'Prepare macOS Framework and Tools'
|
|
workingDirectory: '$(Build.BinariesDirectory)'
|
|
|
|
- bash: |
|
|
VERSION="$(cd $BUILD_SOURCESDIRECTORY && agvtool vers -terse)"
|
|
[[ $BUILD_SOURCEBRANCH != 'refs/heads/master' ]] && VERSION="$VERSION+$(cd $BUILD_SOURCESDIRECTORY && git rev-parse --short $BUILD_SOURCEVERSION)"
|
|
"$BUILD_SOURCESDIRECTORY/Scripts/create-archive.sh" "PLCrashReporter-$VERSION" "iOS Framework" "tvOS Framework" "Mac OS X Framework" "Tools"
|
|
"$BUILD_SOURCESDIRECTORY/Scripts/create-archive.sh" "PLCrashReporter-Static-$VERSION" Static/* "Tools"
|
|
"$BUILD_SOURCESDIRECTORY/Scripts/create-archive.sh" "PLCrashReporter-XCFramework-$VERSION" "CrashReporter.xcframework" "Tools"
|
|
"$BUILD_SOURCESDIRECTORY/Scripts/create-archive.sh" "PLCrashReporter-Static-$VERSION.xcframework" "XCFrameworkStatic/CrashReporter.xcframework" "Tools"
|
|
displayName: 'Create Archives'
|
|
workingDirectory: '$(Build.BinariesDirectory)/Release'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Archives to Staging Directory'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)/Release'
|
|
Contents: '*.zip'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: ManifestGeneratorTask@0
|
|
displayName: 'Manifest Generator'
|
|
inputs:
|
|
BuildDropPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifacts'
|
|
inputs:
|
|
ArtifactName: Release
|
|
|
|
- bash: |
|
|
mkdir -p $(Build.ArtifactStagingDirectory)/Info
|
|
echo $BUILD_SOURCEVERSION > $(Build.ArtifactStagingDirectory)/Info/COMMIT
|
|
VERSION="$(cd $BUILD_SOURCESDIRECTORY && agvtool vers -terse)"
|
|
echo $VERSION > $(Build.ArtifactStagingDirectory)/Info/VERSION
|
|
displayName: 'Collect Version Information'
|
|
|
|
- task: ManifestGeneratorTask@0
|
|
displayName: 'Manifest Generator'
|
|
inputs:
|
|
BuildDropPath: '$(Build.ArtifactStagingDirectory)/Info'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Version Information'
|
|
inputs:
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)/Info'
|
|
ArtifactName: Info
|
|
|
|
- template: analyze-and-test-template.yml
|
|
parameters:
|
|
platforms: [iOS, macOS, tvOS, MacCatalyst]
|