Skip to content
This repository was archived by the owner on Oct 20, 2021. It is now read-only.

Commit 623a584

Browse files
authored
Move iOS ci to MacOS (#86)
1 parent f100bdb commit 623a584

File tree

5 files changed

+31
-10
lines changed

5 files changed

+31
-10
lines changed

.buildkite/hooks/post-checkout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ if [[ -z "${BUILDKITE-}" ]]; then
77
ci/bootstrap.sh
88
exit 0
99
fi
10-
if [[ "${BUILDKITE_AGENT_META_DATA_QUEUE}" != "trigger-pipelines" ]]; then
10+
if [[ "${BUILDKITE_AGENT_META_DATA_QUEUE}" != "trigger-pipelines" ]] && [[ "${BUILDKITE_AGENT_META_DATA_OS}" != "linux" ]]; then
1111
ci/bootstrap.sh
1212
fi

.buildkite/hooks/pre-command

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
set -euo pipefail
33
[[ -n "${DEBUG:-}" ]] && set -x
44

5-
if [[ "${BUILDKITE_AGENT_META_DATA_CAPABLE_OF_BUILDING}" == "gdk-for-unity" ]]; then
5+
if [[ "${BUILDKITE_AGENT_META_DATA_CAPABLE_OF_BUILDING}" == "gdk-for-unity" ]] && [[ "${BUILDKITE_AGENT_META_DATA_OS}" != "linux" ]]; then
66
spatial auth login --log_level debug
77
fi

.buildkite/premerge.steps.yaml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,25 @@ common: &common
3131
- exit_status: 128
3232
limit: 3
3333

34+
macos: &macos
35+
agents:
36+
- "capable_of_building=gdk-for-unity"
37+
- "environment=production"
38+
- "permission_set=builder"
39+
- "platform=macos"
40+
- "queue=${DARWIN_BUILDER_QUEUE:-v4-1582049359-33db24b626f71fa8}"
41+
timeout_in_minutes: 60 # TODO(ENG-548): reduce timeout once agent-cold-start is optimised.
42+
retry:
43+
automatic:
44+
# This is designed to trap and retry failures because agent lost connection. Agent exits with -1 in this case.
45+
- exit_status: -1
46+
limit: 3
47+
3448
# NOTE: step labels turn into commit-status names like {org}/{repo}/{pipeline}/{step-label}, lower-case and hyphenated.
3549
# These are then relied on to have stable names by other things, so once named, please beware renaming has consequences.
3650

3751
steps:
38-
- label: "build :android:"
52+
- label: ":windows: ~ build :android:"
3953
command: bash -c .shared-ci/scripts/build-worker.sh
4054
<<: *common
4155
artifact_paths:
@@ -46,18 +60,19 @@ steps:
4660
BUILD_TARGET_FILTER: "android"
4761
SCRIPTING_BACKEND: "mono"
4862

49-
- label: "build :ios:"
63+
- label: ":darwin: ~ build :ios:"
5064
command: bash -c .shared-ci/scripts/build-worker.sh
51-
<<: *common
65+
<<: *macos
5266
artifact_paths:
5367
- logs/**/*
5468
env:
5569
WORKER_TYPE: "MobileClient"
5670
BUILD_ENVIRONMENT: "local"
5771
BUILD_TARGET_FILTER: "ios"
5872
SCRIPTING_BACKEND: "il2cpp"
73+
TARGET_IOS_SDK: "simulator"
5974

60-
- label: "build UnityClient mono"
75+
- label: ":windows: ~ build UnityClient mono"
6176
command: bash -c .shared-ci/scripts/build-worker.sh
6277
<<: *common
6378
artifact_paths:
@@ -67,7 +82,7 @@ steps:
6782
BUILD_ENVIRONMENT: "cloud"
6883
SCRIPTING_BACKEND: "mono"
6984

70-
- label: "build UnityClient il2cpp"
85+
- label: ":windows: ~ build UnityClient il2cpp"
7186
command: bash -c .shared-ci/scripts/build-worker.sh
7287
<<: *common
7388
artifact_paths:
@@ -77,7 +92,7 @@ steps:
7792
BUILD_ENVIRONMENT: "local"
7893
SCRIPTING_BACKEND: "il2cpp"
7994

80-
- label: "build UnityGameLogic mono"
95+
- label: ":windows: ~ build UnityGameLogic mono"
8196
command: bash -c .shared-ci/scripts/build-worker.sh
8297
<<: *common
8398
artifact_paths:

ci/bootstrap.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ popd
4545
# Clone the GDK for Unity repository
4646

4747
CLONE_URI="[email protected]:spatialos/gdk-for-unity.git"
48-
TARGET_DIRECTORY="$(realpath $(pwd)/../gdk-for-unity)"
48+
pushd ../
49+
TARGET_DIRECTORY="$(pwd)/gdk-for-unity"
50+
popd
4951
PINNED_BRANCH=$(cat ./gdk.pinned | cut -d' ' -f 1)
5052
PINNED_VERSION=$(cat ./gdk.pinned | cut -d' ' -f 2)
5153
SKIP_GDK=false
@@ -95,6 +97,10 @@ if [[ -n ${BUILDKITE:-} ]]; then
9597
EXTRA_ARGS="--copy"
9698
fi
9799

100+
if [[ "${BUILDKITE_AGENT_META_DATA_OS}" == "darwin" ]]; then
101+
PATH="${PATH}:/usr/local/share/dotnet"
102+
fi
103+
98104
dotnet run -p ./.shared-ci/tools/PackageSymLinker/PackageSymLinker.csproj -- \
99105
--packages-source-dir "${TARGET_DIRECTORY}/workers/unity/Packages" \
100106
--package-target-dir "$(pwd)/workers/unity/Packages" "${EXTRA_ARGS}"

ci/shared-ci.pinned

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
master 16af8b4696032d897ba4d8075eaa61355f06f488
1+
master a6c1fcd9562bf40160214acddc7e1a732a66faf4

0 commit comments

Comments
 (0)