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

Commit 9ce7c43

Browse files
authored
NPM Packages support (#60)
* Upgrade to NPM Packages * Update pin * Changelog * Update bootstrap * Update buildkite agent
1 parent 3a20d4c commit 9ce7c43

File tree

9 files changed

+88
-16
lines changed

9 files changed

+88
-16
lines changed

.buildkite/premerge.steps.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ common: &common
1313
- "environment=production"
1414
- "permission_set=builder"
1515
- "platform=windows"
16-
- "queue=v3-1558109315-a75758857a3cdfbe-------z"
16+
- "queue=v3-1562257704-92dadf3bbbe69f0b-------z"
1717
- "scaler_version=2"
1818
- "minimum_instances=1"
1919
- "agent_count=1"
@@ -46,7 +46,7 @@ steps:
4646
BUILD_TARGET_FILTER: "android"
4747
SCRIPTING_BACKEND: "mono"
4848

49-
- label: "build iOS"
49+
- label: "build :ios:"
5050
command: bash -c .shared-ci/scripts/build-worker.sh
5151
<<: *common
5252
artifact_paths:

.buildkite/release-qa.steps.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ common: &common
1313
- "environment=production"
1414
- "permission_set=builder"
1515
- "platform=windows"
16-
- "queue=v3-1558109315-a75758857a3cdfbe-------z"
16+
- "queue=v3-1562257704-92dadf3bbbe69f0b-------z"
1717
- "scaler_version=2"
1818
- "minimum_instances=1"
1919
- "agent_count=1"
@@ -47,7 +47,7 @@ steps:
4747
BUILD_TARGET_FILTER: "android"
4848
SCRIPTING_BACKEND: "mono"
4949

50-
- label: "build iOS"
50+
- label: "build :ios:"
5151
command: bash -c .shared-ci/scripts/build-worker.sh
5252
<<: *common
5353
artifact_paths:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Changed
6+
7+
- Changed manifest to use GDK Packages with NPM instead of sideloading.
8+
59
### Internal
610

711
- Split the `MobileClient` build into separate `iOS` and `Android` buildkite steps.

ci/bootstrap.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
#!/usr/bin/env bash
22
set -e -u -x -o pipefail
33

4+
function isLinux() {
5+
[[ "$(uname -s)" == "Linux" ]];
6+
}
7+
8+
function isMacOS() {
9+
[[ "$(uname -s)" == "Darwin" ]];
10+
}
11+
12+
function isWindows() {
13+
! ( isLinux || isMacOS );
14+
}
15+
416
cd "$(dirname "$0")/../"
517

618
SHARED_CI_DIR="$(pwd)/.shared-ci"
@@ -29,6 +41,17 @@ CLONE_URI="[email protected]:spatialos/gdk-for-unity.git"
2941
TARGET_DIRECTORY="$(realpath $(pwd)/../gdk-for-unity)"
3042
PINNED_VERSION=$(cat ./gdk.pinned)
3143

44+
if [[ -z ${BUILDKITE:-} ]]; then
45+
echo "Warning: About to delete ${TARGET_DIRECTORY}. Please confirm. (Default is Cancel)"
46+
read -p "Y/N > " -r
47+
echo # (optional) move to a new line
48+
if [[ $REPLY =~ ^[Yy]$ ]]; then
49+
echo "Deleting..."
50+
else
51+
exit 1
52+
fi
53+
fi
54+
3255
rm -rf "${TARGET_DIRECTORY}"
3356

3457
mkdir "${TARGET_DIRECTORY}"
@@ -39,4 +62,22 @@ pushd "${TARGET_DIRECTORY}"
3962
git remote add origin "${CLONE_URI}"
4063
git fetch --depth 20 origin develop
4164
git checkout "${PINNED_VERSION}"
65+
./init.sh
4266
popd
67+
68+
if isWindows; then
69+
if [[ -z ${BUILDKITE:-} ]]; then
70+
powershell Start-Process -Verb RunAs -WindowStyle Hidden -Wait -FilePath dotnet.exe -ArgumentList "run", "-p", "$(pwd)/.shared-ci/tools/PackageSymLinker/PackageSymLinker.csproj", "\-\-", "--packages-source-dir", "${TARGET_DIRECTORY}/workers/unity/Packages", "--package-target-dir", "$(pwd)/workers/unity/Packages"
71+
exit 0
72+
fi
73+
fi
74+
75+
EXTRA_ARGS=""
76+
77+
if [[ -n ${BUILDKITE:-} ]]; then
78+
EXTRA_ARGS="--copy"
79+
fi
80+
81+
dotnet run -p ./.shared-ci/tools/PackageSymLinker/PackageSymLinker.csproj -- \
82+
--packages-source-dir "${TARGET_DIRECTORY}/workers/unity/Packages" \
83+
--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-
e056fe31826b64dbdf51b6974ba36d9908e32f9e
1+
3af739d9470a84ef58b6f72e57df06387cd0dd27

gdk.pinned

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4e97647d387f5e1eb8f403431a70f891ff837e45
1+
25fc8cc14bbaa92cfd28cf46a995b5e5f44528ed

init.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
set -e -u -x -o pipefail
3+
4+
cd "$(dirname "$0")"
5+
6+
./ci/bootstrap.sh

workers/unity/Packages/.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
io.improbable.gdk.buildsystem
2+
io.improbable.gdk.core
3+
io.improbable.gdk.deploymentlauncher
4+
io.improbable.gdk.gameobjectcreation
5+
io.improbable.gdk.mobile
6+
io.improbable.gdk.playerlifecycle
7+
io.improbable.gdk.querybasedinteresthelper
8+
io.improbable.gdk.testutils
9+
io.improbable.gdk.tools
10+
io.improbable.gdk.transformsynchronization
11+
io.improbable.worker.sdk
12+
io.improbable.worker.sdk.mobile

workers/unity/Packages/manifest.json

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"dependencies": {
3-
"com.improbable.gdk.buildsystem": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.buildsystem",
4-
"com.improbable.gdk.core": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.core",
5-
"com.improbable.gdk.deploymentlauncher": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.deploymentlauncher",
6-
"com.improbable.gdk.gameobjectcreation": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.gameobjectcreation",
7-
"com.improbable.gdk.mobile": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.mobile",
8-
"com.improbable.gdk.playerlifecycle": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.playerlifecycle",
9-
"com.improbable.gdk.testutils": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.testutils",
10-
"com.improbable.gdk.tools": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.tools",
11-
"com.improbable.gdk.transformsynchronization": "file:../../../../gdk-for-unity/workers/unity/Packages/com.improbable.gdk.transformsynchronization",
3+
"io.improbable.gdk.buildsystem": "0.2.4",
4+
"io.improbable.gdk.core": "0.2.4",
5+
"io.improbable.gdk.deploymentlauncher": "0.2.4",
6+
"io.improbable.gdk.gameobjectcreation": "0.2.4",
7+
"io.improbable.gdk.mobile": "0.0.8",
8+
"io.improbable.gdk.playerlifecycle": "0.2.4",
9+
"io.improbable.gdk.testutils": "0.2.4",
10+
"io.improbable.gdk.tools": "0.2.4",
11+
"io.improbable.gdk.transformsynchronization": "0.2.4",
1212
"com.unity.ads": "2.0.8",
1313
"com.unity.analytics": "3.3.2",
1414
"com.unity.package-manager-ui": "2.1.2",
@@ -47,5 +47,14 @@
4747
"com.unity.modules.wind": "1.0.0",
4848
"com.unity.modules.xr": "1.0.0"
4949
},
50-
"registry": "https://staging-packages.unity.com"
50+
"registry": "https://staging-packages.unity.com",
51+
"scopedRegistries": [
52+
{
53+
"name": "Improbable",
54+
"url": "https://npm.improbable.io/gdk-for-unity/",
55+
"scopes": [
56+
"io.improbable"
57+
]
58+
}
59+
]
5160
}

0 commit comments

Comments
 (0)