summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--azure-pipelines_macosx.yml49
-rwxr-xr-xtools/ci/jobs/xcode.sh11
-rw-r--r--tools/ci/templates/azure/macosx.yml17
3 files changed, 77 insertions, 0 deletions
diff --git a/azure-pipelines_macosx.yml b/azure-pipelines_macosx.yml
new file mode 100644
index 000000000..fb1ccfac2
--- /dev/null
+++ b/azure-pipelines_macosx.yml
@@ -0,0 +1,49 @@
+jobs:
+- job: list_xcode
+ pool:
+ vmImage: 'macOS 10.13'
+ steps:
+ - script: |
+ ls /Applications/ | grep Xcode|sort
+
+- template: tools/ci/templates/azure/macosx.yml
+ parameters:
+ name: xcode_8
+ xcode: Xcode_8.app
+
+- template: tools/ci/templates/azure/macosx.yml
+ parameters:
+ name: xcode_9
+ xcode: Xcode_9.app
+
+- template: tools/ci/templates/azure/macosx.yml
+ parameters:
+ name: xcode
+ xcode: Xcode.app
+
+- template: tools/ci/templates/azure/macosx.yml
+ parameters:
+ name: xcode_8_3_3
+ xcode: Xcode_8.3.3.app
+
+- template: tools/ci/templates/azure/macosx.yml
+ parameters:
+ name: xcode_9_4_1
+ xcode: Xcode_9.4.1.app
+
+- job: vars
+ pool:
+ name: 'Hosted Ubuntu 1604'
+ dependsOn:
+ - xcode_8
+ - xcode_9
+ - xcode
+ - xcode_8_3_3
+ - xcode_9_4_1
+ steps:
+ - script: |
+ curl -X POST \
+ -F token=$(IMAGETOKEN) \
+ -F "ref=macos" \
+ -F "variables[AZUREURL]=$(System.TeamFoundationCollectionUri)$(System.TeamProjectId)/_apis/build/builds/$(Build.BuildId)/artifacts?artifactName=ANAME&api-version=5.0-preview.3&%24format=zip" \
+ https://gitlab.com/api/v4/projects/2872004/trigger/pipeline
diff --git a/tools/ci/jobs/xcode.sh b/tools/ci/jobs/xcode.sh
new file mode 100755
index 000000000..81bb0ff8d
--- /dev/null
+++ b/tools/ci/jobs/xcode.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+uname -a
+sudo xcode-select -switch /Applications/${xcodename} || exit 1
+cd packaging/OSX || exit 1
+./gethttps.sh || exit 1
+cd ../../Xcode || exit 1
+./build.sh || exit 1
+./pack.sh || exit 1
+ls -la build || exit 1
+cp build/manaplus.dmg "${artifacts}/" || exit 1
diff --git a/tools/ci/templates/azure/macosx.yml b/tools/ci/templates/azure/macosx.yml
new file mode 100644
index 000000000..4d3e355df
--- /dev/null
+++ b/tools/ci/templates/azure/macosx.yml
@@ -0,0 +1,17 @@
+parameters:
+ name: ''
+ xcode: ''
+ vmImage: 'macOS 10.13'
+
+jobs:
+- job: ${{ parameters.name }}
+ pool:
+ vmImage: '${{ parameters.vmImage }}'
+ steps:
+ - script: |
+ export xcodename="${{ parameters.xcode }}"
+ export artifacts="$(Build.ArtifactStagingDirectory)"
+ ./tools/ci/jobs/xcode.sh
+ - task: PublishBuildArtifacts@1
+ inputs:
+ artifactName: ${{ parameters.name }}