feat: (macOS) Add CI build config file
This commit is contained in:
Родитель
663d0b3e6d
Коммит
116d6a41c4
|
@ -0,0 +1,124 @@
|
|||
jobs:
|
||||
- job: macOS
|
||||
|
||||
pool:
|
||||
name: Default
|
||||
demands:
|
||||
- Agent.OS -equals Darwin
|
||||
- Xamarin.macOS -equals Stable
|
||||
|
||||
variables:
|
||||
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
|
||||
VersionCodeOffset: 400559 # last value for the APK release
|
||||
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .Net Core runtime 2.2.0'
|
||||
inputs:
|
||||
packageType: runtime
|
||||
version: 2.2.0
|
||||
|
||||
- task: nventiveCanaryUpdater@5
|
||||
displayName: 'Canary Update'
|
||||
condition: startsWith(variables['Build.SourceBranch'], 'refs/heads/canaries')
|
||||
inputs:
|
||||
solution: src/Calculator.sln
|
||||
branchToMerge: uno
|
||||
summaryFile: '$(Build.ArtifactStagingDirectory)/Canary.md'
|
||||
resultFile: '$(Build.ArtifactStagingDirectory)/result.json'
|
||||
nugetUpdaterVersion: 2.0.2
|
||||
packageAuthor: nventive
|
||||
|
||||
#- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh 5_18_1"
|
||||
# displayName: Select Xamarin Version
|
||||
|
||||
- bash: |
|
||||
shopt -s nullglob
|
||||
function join_by { local IFS="$1"; shift; echo "$*"; }
|
||||
lib_path=$(join_by ';' $(Agent.WorkFolder)/_tasks/GitVersion*/4.0.*/lib/osx)
|
||||
echo LD_LIBRARY_PATH: $lib_path
|
||||
echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$lib_path"
|
||||
displayName: Update LD_LIBRARY_PATH for GitVersion
|
||||
|
||||
- task: GitVersion@5
|
||||
inputs:
|
||||
useConfigFile: true
|
||||
configFilePath: gitversion.yml
|
||||
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .Net Core runtime 3.1.x'
|
||||
inputs:
|
||||
packageType: runtime
|
||||
version: 3.1.x
|
||||
|
||||
- task: InstallAppleCertificate@2
|
||||
displayName: 'Install an Apple certificate'
|
||||
inputs:
|
||||
certSecureFile: 'nventive-appstore-prod-20190521.p12'
|
||||
certPwd: '$(iOSSigning.CertificatePwd)'
|
||||
signingIdentity: '$(iOSSigning.CertificateIdentity)'
|
||||
|
||||
- task: InstallAppleProvisioningProfile@1
|
||||
displayName: 'Install an Apple provisioning profile'
|
||||
inputs:
|
||||
provProfileSecureFile: 'Uno_Calculator.mobileprovision'
|
||||
|
||||
- task: NuGetToolInstaller@0
|
||||
inputs:
|
||||
versionSpec: 4.9.1
|
||||
checkLatest: false
|
||||
|
||||
- task: NuGetCommand@2
|
||||
inputs:
|
||||
command: 'restore'
|
||||
restoreSolution: '$(build.sourcesdirectory)/src/Calculator.macOS/Calculator.macOS.csproj'
|
||||
|
||||
- bash: |
|
||||
cd $(build.sourcesdirectory)/src/CalcManager
|
||||
chmod +x build_macos.sh
|
||||
./build_macos.sh
|
||||
|
||||
displayName: Build native CalcManager
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: '$(build.sourcesdirectory)/src/build/build.csproj'
|
||||
msbuildLocationMethod: version
|
||||
msbuildVersion: latest
|
||||
msbuildArchitecture: x86
|
||||
msbuildArguments: /r /p:BuildPlatformTarget=macOS /bl:$(build.artifactstagingdirectory)/build.binlog
|
||||
clean: false
|
||||
maximumCpuCount: true
|
||||
restoreNugetPackages: false
|
||||
logProjectEvents: true
|
||||
createLogFile: true
|
||||
|
||||
- task: MSBuild@1
|
||||
inputs:
|
||||
solution: '$(build.sourcesdirectory)/src/Calculator.macOS/Calculator.macOS.csproj'
|
||||
msbuildLocationMethod: version
|
||||
msbuildVersion: latest
|
||||
msbuildArchitecture: x86
|
||||
msbuildArguments: /r /p:Configuration=Release /p:Platform=iPhone /bl:$(build.artifactstagingdirectory)/build.binlog "/p:InformationalVersion=$GITVERSION_INFORMATIONALVERSION"
|
||||
clean: false
|
||||
maximumCpuCount: true
|
||||
restoreNugetPackages: false
|
||||
logProjectEvents: true
|
||||
createLogFile: true
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Publish macOS Binaries'
|
||||
inputs:
|
||||
SourceFolder: $(build.sourcesdirectory)/src/Calculator.macOS/bin/iPhone/Release
|
||||
Contents: '*.ipa'
|
||||
TargetFolder: $(build.artifactstagingdirectory)
|
||||
CleanTargetFolder: false
|
||||
OverWrite: false
|
||||
flattenFolders: false
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
condition: always()
|
||||
inputs:
|
||||
PathtoPublish: $(build.artifactstagingdirectory)
|
||||
ArtifactName: Uno-Calculator-macOS
|
||||
ArtifactType: Container
|
Загрузка…
Ссылка в новой задаче