mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-02-02 22:59:06 +08:00
Compare commits
79 Commits
v2.0-alpha
...
v2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f79830454 | ||
|
|
f054aaa35d | ||
|
|
0756841374 | ||
|
|
579daa93a6 | ||
|
|
1adfabf512 | ||
|
|
cdee7d1d9a | ||
|
|
fb633660a4 | ||
|
|
c15f955669 | ||
|
|
2684be2dee | ||
|
|
db2d8b6dbd | ||
|
|
c068855899 | ||
|
|
5b8bf1c8b7 | ||
|
|
47b25cf3b1 | ||
|
|
36891ec921 | ||
|
|
2652cb78a7 | ||
|
|
f77696efae | ||
|
|
4556fc4ff1 | ||
|
|
d066039c26 | ||
|
|
8abce48a48 | ||
|
|
5ae03dfef6 | ||
|
|
4be5d2ddf4 | ||
|
|
a61c02481f | ||
|
|
2b399b2641 | ||
|
|
40891d6b43 | ||
|
|
441be81543 | ||
|
|
1bc7130fea | ||
|
|
419c5bb965 | ||
|
|
d98a0ed32d | ||
|
|
ca9d445c3c | ||
|
|
89c1b38c3b | ||
|
|
b72639aac0 | ||
|
|
9a40b8903e | ||
|
|
f1c154a23c | ||
|
|
9440c54d51 | ||
|
|
1ae498bcf1 | ||
|
|
8ed8ccb20c | ||
|
|
efa2eddee9 | ||
|
|
9358a3a890 | ||
|
|
d975f3b80f | ||
|
|
693ff829de | ||
|
|
ff46e7645f | ||
|
|
eb42a8c9b8 | ||
|
|
1abb902750 | ||
|
|
8e0583a14b | ||
|
|
b94200d3d4 | ||
|
|
a6ebcb5b75 | ||
|
|
c7907c7e78 | ||
|
|
9f13e1d9cf | ||
|
|
ec0cdeacc9 | ||
|
|
03ae77dc7c | ||
|
|
4e38a84fe7 | ||
|
|
3d0eb0805b | ||
|
|
7871734e90 | ||
|
|
018e347c3d | ||
|
|
05e37305c1 | ||
|
|
15a02a4b1b | ||
|
|
c45cd78d0d | ||
|
|
a3e783f430 | ||
|
|
239273ca72 | ||
|
|
11a0d0947e | ||
|
|
13fdcad790 | ||
|
|
e97ec82110 | ||
|
|
8a836b81c5 | ||
|
|
1fa70bbbdf | ||
|
|
c317d144c3 | ||
|
|
3ebdb0e678 | ||
|
|
7d9f968d70 | ||
|
|
70081d231f | ||
|
|
36364461d5 | ||
|
|
b66dffbf92 | ||
|
|
2fc01a1db4 | ||
|
|
8c1a159dd0 | ||
|
|
497f2f7b5f | ||
|
|
71ca7bdbfc | ||
|
|
c96b8cf443 | ||
|
|
9fff362775 | ||
|
|
f0e18ea3a5 | ||
|
|
947c8b8e20 | ||
|
|
a5de621fe2 |
@@ -1,10 +1,15 @@
|
|||||||
{
|
{
|
||||||
"plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"],
|
"plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"],
|
||||||
"extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "prettier"],
|
"extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "plugin:prettier/recommended"],
|
||||||
"parser": "@typescript-eslint/parser",
|
"parser": "@typescript-eslint/parser",
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 9,
|
"ecmaVersion": 2020,
|
||||||
"sourceType": "module"
|
"sourceType": "module",
|
||||||
|
"extraFileExtensions": [".mjs"],
|
||||||
|
"ecmaFeatures": {
|
||||||
|
"impliedStrict": true
|
||||||
|
},
|
||||||
|
"project": "./tsconfig.json"
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
"node": true,
|
"node": true,
|
||||||
@@ -12,8 +17,44 @@
|
|||||||
"jest/globals": true
|
"jest/globals": true
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
|
// Error out for code formatting errors
|
||||||
"prettier/prettier": "error",
|
"prettier/prettier": "error",
|
||||||
"import/no-extraneous-dependencies": 0,
|
// Namespaces or sometimes needed
|
||||||
"import/no-namespace": "off"
|
"import/no-namespace": "off",
|
||||||
|
// Properly format comments
|
||||||
|
"spaced-comment": ["error", "always"],
|
||||||
|
"lines-around-comment": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"beforeBlockComment": true,
|
||||||
|
"beforeLineComment": true,
|
||||||
|
"allowBlockStart": true,
|
||||||
|
"allowObjectStart": true,
|
||||||
|
"allowArrayStart": true,
|
||||||
|
"allowClassStart": true,
|
||||||
|
"ignorePattern": "pragma|ts-ignore"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// Mandatory spacing
|
||||||
|
"padding-line-between-statements": [
|
||||||
|
"error",
|
||||||
|
{ "blankLine": "always", "prev": "*", "next": "return" },
|
||||||
|
{ "blankLine": "always", "prev": "directive", "next": "*" },
|
||||||
|
{ "blankLine": "any", "prev": "directive", "next": "directive" }
|
||||||
|
],
|
||||||
|
// Enforce camelCase
|
||||||
|
"camelcase": "error",
|
||||||
|
// Allow forOfStatements
|
||||||
|
"no-restricted-syntax": ["error", "ForInStatement", "LabeledStatement", "WithStatement"],
|
||||||
|
// Continue is viable in forOf loops in generators
|
||||||
|
"no-continue": "off",
|
||||||
|
// From experience, named exports are almost always desired. I got tired of this rule
|
||||||
|
"import/prefer-default-export": "off",
|
||||||
|
// Unused vars are useful to keep method signatures consistent and documented
|
||||||
|
"@typescript-eslint/no-unused-vars": "off",
|
||||||
|
// For this project only use kebab-case
|
||||||
|
"unicorn/filename-case": ["error", { "cases": { "kebabCase": true } }],
|
||||||
|
// Allow Array.from(set) mitigate TS2569 which would require '--downlevelIteration'
|
||||||
|
"unicorn/prefer-spread": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
9
.gitattributes
vendored
9
.gitattributes
vendored
@@ -1,3 +1,6 @@
|
|||||||
dist/index* -diff linguist-generated=true
|
[attr]generated-code-file text eol=lf -diff linguist-generated=true
|
||||||
dist/licenses* -diff linguist-generated=true
|
[attr]generated-binary-file -text -diff linguist-generated=true
|
||||||
dist/sourcemap* -diff linguist-generated=true
|
|
||||||
|
dist/index* generated-code-file
|
||||||
|
dist/licenses* generated-code-file
|
||||||
|
dist/sourcemap* generated-code-file
|
||||||
|
|||||||
12
.github/FUNDING.yml
vendored
Normal file
12
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
github: game-ci
|
||||||
|
patreon: # Replace with a single Patreon username
|
||||||
|
open_collective: # replace with a single OpenCollective username
|
||||||
|
ko_fi: # Replace with a single Ko-fi username
|
||||||
|
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||||
|
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||||
|
liberapay: # Replace with a single Liberapay username
|
||||||
|
issuehunt: # Replace with a single IssueHunt username
|
||||||
|
otechie: # Replace with a single Otechie username
|
||||||
|
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
||||||
4
.github/ISSUE_TEMPLATE/feature_request.md
vendored
4
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
name: Feature request
|
name: Feature request
|
||||||
about: Suggest an improvement or now feature
|
about: Suggest an improvement, or a new feature
|
||||||
title: ''
|
title: ''
|
||||||
labels: ''
|
labels: enhancement
|
||||||
assignees: ''
|
assignees: ''
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
60
.github/workflows/aws-tests.yml
vendored
60
.github/workflows/aws-tests.yml
vendored
@@ -1,60 +0,0 @@
|
|||||||
name: AWS
|
|
||||||
|
|
||||||
on:
|
|
||||||
push: { branches: [aws, aws-ts-clean] }
|
|
||||||
|
|
||||||
env:
|
|
||||||
AWS_REGION: "eu-west-1"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildForAllPlatforms:
|
|
||||||
name: AWS Fargate Build
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
projectPath:
|
|
||||||
- test-project
|
|
||||||
unityVersion:
|
|
||||||
# - 2019.2.11f1
|
|
||||||
- 2019.3.15f1
|
|
||||||
targetPlatform:
|
|
||||||
#- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
|
|
||||||
#- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
|
||||||
- StandaloneLinux64 # Build a Linux 64-bit standalone.
|
|
||||||
#- iOS # Build an iOS player.
|
|
||||||
#- Android # Build an Android .apk.
|
|
||||||
#- WebGL # WebGL.
|
|
||||||
# - StandaloneWindows # Build a Windows standalone.
|
|
||||||
# - WSAPlayer # Build an Windows Store Apps player.
|
|
||||||
# - PS4 # Build a PS4 Standalone.
|
|
||||||
# - XboxOne # Build a Xbox One Standalone.
|
|
||||||
# - tvOS # Build to Apple's tvOS platform.
|
|
||||||
# - Switch # Build a Nintendo Switch player
|
|
||||||
# steps
|
|
||||||
steps:
|
|
||||||
- name: Checkout (default)
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
if: github.event.event_type != 'pull_request_target'
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
- name: Configure AWS Credentials
|
|
||||||
uses: aws-actions/configure-aws-credentials@v1
|
|
||||||
with:
|
|
||||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
aws-region: eu-west-2
|
|
||||||
- uses: ./
|
|
||||||
id: aws-fargate-unity-build
|
|
||||||
env:
|
|
||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
||||||
AWS_DEFAULT_REGION: eu-west-2
|
|
||||||
with:
|
|
||||||
remoteBuildCluster: aws
|
|
||||||
projectPath: ${{ matrix.projectPath }}
|
|
||||||
unityVersion: ${{ matrix.unityVersion }}
|
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
|
||||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
8
.github/workflows/build-tests.yml
vendored
8
.github/workflows/build-tests.yml
vendored
@@ -10,7 +10,7 @@ env:
|
|||||||
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
|
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildForAllPlatforms:
|
buildForAllPlatformsUbuntu:
|
||||||
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
|
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
@@ -48,9 +48,9 @@ jobs:
|
|||||||
- uses: actions/cache@v2
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ matrix.projectPath }}/Library
|
path: ${{ matrix.projectPath }}/Library
|
||||||
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
|
key: Library-${{ matrix.projectPath }}-ubuntu-${{ matrix.targetPlatform }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
Library-${{ matrix.projectPath }}-
|
Library-${{ matrix.projectPath }}-ubuntu-
|
||||||
Library-
|
Library-
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
@@ -68,6 +68,6 @@ jobs:
|
|||||||
###########################
|
###########################
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Build (${{ matrix.unityVersion }})
|
name: Build Ubuntu (${{ matrix.unityVersion }})
|
||||||
path: build
|
path: build
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|||||||
2
.github/workflows/cats.yml
vendored
2
.github/workflows/cats.yml
vendored
@@ -11,6 +11,6 @@ jobs:
|
|||||||
name: A cat for your effort!
|
name: A cat for your effort!
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: ruairidhwm/action-cats@1.0.1
|
- uses: ruairidhwm/action-cats@1.0.2
|
||||||
with:
|
with:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
23
.github/workflows/cleanup.yml
vendored
23
.github/workflows/cleanup.yml
vendored
@@ -12,3 +12,26 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
expire-in: 21 days
|
expire-in: 21 days
|
||||||
|
cleanupCloudRunner:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
if: github.event.event_type != 'pull_request_target'
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
- run: yarn
|
||||||
|
- run: yarn run cli --help
|
||||||
|
env:
|
||||||
|
AWS_REGION: eu-west-2
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
AWS_DEFAULT_REGION: eu-west-2
|
||||||
|
- run: yarn run cli -m aws-list-all
|
||||||
|
env:
|
||||||
|
AWS_REGION: eu-west-2
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
AWS_DEFAULT_REGION: eu-west-2
|
||||||
|
|||||||
218
.github/workflows/cloud-runner-pipeline.yml
vendored
Normal file
218
.github/workflows/cloud-runner-pipeline.yml
vendored
Normal file
@@ -0,0 +1,218 @@
|
|||||||
|
name: Cloud Runner
|
||||||
|
|
||||||
|
on:
|
||||||
|
push: { branches: [cloud-runner-develop, main] }
|
||||||
|
# push: { branches: [main] }
|
||||||
|
# pull_request:
|
||||||
|
# paths-ignore:
|
||||||
|
# - '.github/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GKE_ZONE: 'us-central1'
|
||||||
|
GKE_REGION: 'us-central1'
|
||||||
|
GKE_PROJECT: 'unitykubernetesbuilder'
|
||||||
|
GKE_CLUSTER: 'game-ci-github-pipelines'
|
||||||
|
GCP_LOGGING: true
|
||||||
|
GCP_PROJECT: unitykubernetesbuilder
|
||||||
|
GCP_LOG_FILE: ${{ github.workspace }}/cloud-runner-logs.txt
|
||||||
|
AWS_REGION: eu-west-2
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
AWS_DEFAULT_REGION: eu-west-2
|
||||||
|
AWS_BASE_STACK_NAME: game-ci-github-pipelines
|
||||||
|
CLOUD_RUNNER_BRANCH: ${{ github.ref }}
|
||||||
|
CLOUD_RUNNER_TESTS: true
|
||||||
|
DEBUG: true
|
||||||
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
awsBuild:
|
||||||
|
name: AWS Fargate Build
|
||||||
|
if: github.event.pull_request.draft == false
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
projectPath:
|
||||||
|
- test-project
|
||||||
|
unityVersion:
|
||||||
|
# - 2019.2.11f1
|
||||||
|
- 2019.3.15f1
|
||||||
|
targetPlatform:
|
||||||
|
#- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
|
||||||
|
- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
||||||
|
- StandaloneLinux64 # Build a Linux 64-bit standalone.
|
||||||
|
- WebGL # WebGL.
|
||||||
|
#- iOS # Build an iOS player.
|
||||||
|
#- Android # Build an Android .apk.
|
||||||
|
# - StandaloneWindows # Build a Windows standalone.
|
||||||
|
# - WSAPlayer # Build an Windows Store Apps player.
|
||||||
|
# - PS4 # Build a PS4 Standalone.
|
||||||
|
# - XboxOne # Build a Xbox One Standalone.
|
||||||
|
# - tvOS # Build to Apple's tvOS platform.
|
||||||
|
# - Switch # Build a Nintendo Switch player
|
||||||
|
# steps
|
||||||
|
steps:
|
||||||
|
- name: Checkout (default)
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
if: github.event.event_type != 'pull_request_target'
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
- name: Configure AWS Credentials
|
||||||
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: eu-west-2
|
||||||
|
- run: yarn
|
||||||
|
- run: yarn run cli --help
|
||||||
|
- run: yarn run test "caching"
|
||||||
|
- run: yarn run test-i-aws
|
||||||
|
env:
|
||||||
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
PROJECT_PATH: ${{ matrix.projectPath }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
|
||||||
|
cloudRunnerTests: true
|
||||||
|
versioning: None
|
||||||
|
- uses: ./
|
||||||
|
id: aws-fargate-unity-build
|
||||||
|
timeout-minutes: 25
|
||||||
|
with:
|
||||||
|
cloudRunnerCluster: aws
|
||||||
|
versioning: None
|
||||||
|
projectPath: ${{ matrix.projectPath }}
|
||||||
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
postBuildSteps: |
|
||||||
|
- name: upload
|
||||||
|
image: amazon/aws-cli
|
||||||
|
commands: |
|
||||||
|
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
|
||||||
|
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
|
||||||
|
aws configure set region $AWS_DEFAULT_REGION --profile default
|
||||||
|
aws s3 ls
|
||||||
|
aws s3 ls game-ci-test-storage
|
||||||
|
ls /data/cache/$CACHE_KEY
|
||||||
|
ls /data/cache/$CACHE_KEY/build
|
||||||
|
aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar s3://game-ci-test-storage/$CACHE_KEY/build-$BUILD_GUID.tar
|
||||||
|
secrets:
|
||||||
|
- name: awsAccessKeyId
|
||||||
|
value: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
- name: awsSecretAccessKey
|
||||||
|
value: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
- name: awsDefaultRegion
|
||||||
|
value: eu-west-2
|
||||||
|
- run: |
|
||||||
|
aws s3 cp s3://game-ci-test-storage/${{ steps.aws-fargate-unity-build.outputs.CACHE_KEY }}/build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar
|
||||||
|
ls
|
||||||
|
- run: yarn run cli -m aws-garbage-collect
|
||||||
|
###########################
|
||||||
|
# Upload #
|
||||||
|
###########################
|
||||||
|
# download from cloud storage
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: AWS Build (${{ matrix.targetPlatform }})
|
||||||
|
path: build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar
|
||||||
|
retention-days: 14
|
||||||
|
k8sBuilds:
|
||||||
|
name: K8s (GKE Autopilot) build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
unityVersion:
|
||||||
|
# - 2019.2.11f1
|
||||||
|
- 2019.3.15f1
|
||||||
|
targetPlatform:
|
||||||
|
# - StandaloneWindows64
|
||||||
|
- StandaloneLinux64
|
||||||
|
steps:
|
||||||
|
###########################
|
||||||
|
# Checkout #
|
||||||
|
###########################
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
if: github.event.event_type != 'pull_request_target'
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Setup #
|
||||||
|
###########################
|
||||||
|
- uses: google-github-actions/setup-gcloud@v0
|
||||||
|
with:
|
||||||
|
version: '288.0.0'
|
||||||
|
service_account_email: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
|
||||||
|
service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
|
||||||
|
- name: Get GKE cluster credentials
|
||||||
|
run: gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Cloud Runner Test Suite #
|
||||||
|
###########################
|
||||||
|
- uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
- run: yarn
|
||||||
|
- run: yarn run cli --help
|
||||||
|
- run: yarn run test "caching"
|
||||||
|
- name: Cloud Runner Test Suite
|
||||||
|
run: yarn run test-i-k8s --detectOpenHandles --forceExit
|
||||||
|
env:
|
||||||
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
PROJECT_PATH: ${{ matrix.projectPath }}
|
||||||
|
TARGET_PLATFORM: ${{ matrix.targetPlatform }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
KUBE_CONFIG: ${{ steps.read-base64.outputs.base64 }}
|
||||||
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
|
cloudRunnerTests: true
|
||||||
|
versioning: None
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Cloud Runner Build Test #
|
||||||
|
###########################
|
||||||
|
- name: Cloud Runner Build Test
|
||||||
|
uses: ./
|
||||||
|
id: k8s-unity-build
|
||||||
|
timeout-minutes: 30
|
||||||
|
with:
|
||||||
|
cloudRunnerCluster: k8s
|
||||||
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
|
kubeConfig: ${{ steps.read-base64.outputs.base64 }}
|
||||||
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
projectPath: test-project
|
||||||
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
|
versioning: None
|
||||||
|
postBuildSteps: |
|
||||||
|
- name: upload
|
||||||
|
image: amazon/aws-cli
|
||||||
|
commands: |
|
||||||
|
aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
|
||||||
|
aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
|
||||||
|
aws configure set region $AWS_DEFAULT_REGION --profile default
|
||||||
|
aws s3 ls
|
||||||
|
aws s3 ls game-ci-test-storage
|
||||||
|
ls /data/cache/$CACHE_KEY
|
||||||
|
aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar s3://game-ci-test-storage/$CACHE_KEY/build-$BUILD_GUID.tar
|
||||||
|
secrets:
|
||||||
|
- name: awsAccessKeyId
|
||||||
|
value: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
- name: awsSecretAccessKey
|
||||||
|
value: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
- name: awsDefaultRegion
|
||||||
|
value: eu-west-2
|
||||||
|
- run: |
|
||||||
|
aws s3 cp s3://game-ci-test-storage/${{ steps.k8s-unity-build.outputs.CACHE_KEY }}/build-${{ steps.k8s-unity-build.outputs.BUILD_GUID }}.tar build-${{ steps.k8s-unity-build.outputs.BUILD_GUID }}.tar
|
||||||
|
ls
|
||||||
|
###########################
|
||||||
|
# Upload #
|
||||||
|
###########################
|
||||||
|
# download from cloud storage
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: K8s Build (${{ matrix.targetPlatform }})
|
||||||
|
path: build-${{ steps.k8s-unity-build.outputs.BUILD_GUID }}.tar
|
||||||
|
retention-days: 14
|
||||||
6
.github/workflows/integrity-check.yml
vendored
6
.github/workflows/integrity-check.yml
vendored
@@ -12,10 +12,10 @@ jobs:
|
|||||||
name: Tests
|
name: Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v2
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 12.x
|
node-version: '16'
|
||||||
- run: yarn
|
- run: yarn
|
||||||
- run: yarn lint
|
- run: yarn lint
|
||||||
- run: yarn test --coverage
|
- run: yarn test --coverage
|
||||||
|
|||||||
@@ -1,30 +1,27 @@
|
|||||||
name: Kubernetes
|
name: Mac Builds
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: {}
|
push:
|
||||||
# push: { branches: [main] }
|
branches:
|
||||||
# pull_request:
|
- main
|
||||||
# paths-ignore:
|
|
||||||
# - '.github/**'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GKE_ZONE: 'us-central1-c'
|
|
||||||
GKE_REGION: 'us-central1'
|
|
||||||
GKE_PROJECT: 'unitykubernetesbuilder'
|
|
||||||
GKE_CLUSTER: 'unity-builder-cluster'
|
|
||||||
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
|
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
k8sBuilds:
|
buildForAllPlatformsWindows:
|
||||||
name: K8s build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
|
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: macos-latest
|
||||||
continue-on-error: true
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
projectPath:
|
||||||
|
- test-project
|
||||||
|
unityVersion:
|
||||||
|
- 2020.3.24f1
|
||||||
targetPlatform:
|
targetPlatform:
|
||||||
- StandaloneLinux64
|
- StandaloneOSX # Build a MacOS executable
|
||||||
- StandaloneWindows64
|
|
||||||
steps:
|
steps:
|
||||||
###########################
|
###########################
|
||||||
# Checkout #
|
# Checkout #
|
||||||
@@ -34,47 +31,44 @@ jobs:
|
|||||||
lfs: true
|
lfs: true
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# Spin up #
|
# Cache #
|
||||||
###########################
|
###########################
|
||||||
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
|
- uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
version: '288.0.0'
|
path: ${{ matrix.projectPath }}/Library
|
||||||
service_account_email: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
|
key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }}
|
||||||
service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
|
restore-keys: |
|
||||||
- run: ./dist/bootstrapper/ApplyClusterAndAcquireLock.sh ${{ env.GKE_PROJECT }} ${{ env.GKE_CLUSTER }} ${{ env.GKE_ZONE }}
|
Library-${{ matrix.projectPath }}-macos-
|
||||||
|
Library-
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Set Scripting Backend #
|
||||||
|
###########################
|
||||||
|
- name: Set Scripting Backend To il2cpp
|
||||||
|
run: |
|
||||||
|
mv -f "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" "./test-project/ProjectSettings/ProjectSettings.asset"
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# Build #
|
# Build #
|
||||||
###########################
|
###########################
|
||||||
- uses: frostebite/File-To-Base64@master
|
|
||||||
id: read-base64
|
|
||||||
with:
|
|
||||||
filePath: ~/.kube/config
|
|
||||||
- uses: ./
|
- uses: ./
|
||||||
id: k8s-unity-build
|
env:
|
||||||
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||||
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||||
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
||||||
with:
|
with:
|
||||||
|
projectPath: ${{ matrix.projectPath }}
|
||||||
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
targetPlatform: ${{ matrix.targetPlatform }}
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
kubeConfig: ${{ steps.read-base64.outputs.base64 }}
|
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
||||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
# We use dirty build because we are replacing the default project settings file above
|
||||||
projectPath: test-project
|
allowDirtyBuild: true
|
||||||
unityVersion: 2019.3.15f1
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# Upload #
|
# Upload #
|
||||||
###########################
|
###########################
|
||||||
- uses: frostebite/K8s-Download-Volume@master
|
|
||||||
with:
|
|
||||||
kubeConfig: ${{ steps.read-base64.outputs.base64 }}
|
|
||||||
volume: ${{ steps.k8s-unity-build.outputs.volume }}
|
|
||||||
sourcePath: repo/build/
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: Kubernetes Build (${{ matrix.targetPlatform }})
|
name: Build MacOS (${{ matrix.unityVersion }})
|
||||||
path: k8s-volume-download
|
path: build
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
###########################
|
|
||||||
# Spin down #
|
|
||||||
###########################
|
|
||||||
- run: ./dist/bootstrapper/ReleaseLockAndAttemptShutdown.sh ${{ env.GKE_PROJECT }} ${{ env.GKE_CLUSTER }} ${{ env.GKE_ZONE }}
|
|
||||||
if: ${{ always() }}
|
|
||||||
2
.github/workflows/versioning.yml
vendored
2
.github/workflows/versioning.yml
vendored
@@ -10,5 +10,3 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: Actions-R-Us/actions-tagger@v2
|
- uses: Actions-R-Us/actions-tagger@v2
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|||||||
77
.github/workflows/windows-build-tests.yml
vendored
Normal file
77
.github/workflows/windows-build-tests.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
name: Windows Builds
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
buildForAllPlatformsWindows:
|
||||||
|
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
|
||||||
|
runs-on: windows-2019
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
projectPath:
|
||||||
|
- test-project
|
||||||
|
unityVersion:
|
||||||
|
- 2020.3.24f1
|
||||||
|
targetPlatform:
|
||||||
|
- StandaloneWindows64 # Build a Windows 64-bit standalone.
|
||||||
|
- StandaloneWindows # Build a Windows 32-bit standalone.
|
||||||
|
- WSAPlayer # Build a UWP App
|
||||||
|
- tvOS # Build an Apple TV XCode project
|
||||||
|
|
||||||
|
steps:
|
||||||
|
###########################
|
||||||
|
# Checkout #
|
||||||
|
###########################
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Cache #
|
||||||
|
###########################
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ${{ matrix.projectPath }}/Library
|
||||||
|
key: Library-${{ matrix.projectPath }}-windows-${{ matrix.targetPlatform }}
|
||||||
|
restore-keys: |
|
||||||
|
Library-${{ matrix.projectPath }}-windows-
|
||||||
|
Library-
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Set Scripting Backend #
|
||||||
|
###########################
|
||||||
|
- name: Set Scripting Backend To il2cpp
|
||||||
|
run: |
|
||||||
|
Move-Item -Path "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" -Destination "./test-project/ProjectSettings/ProjectSettings.asset" -Force
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Build #
|
||||||
|
###########################
|
||||||
|
- uses: ./
|
||||||
|
env:
|
||||||
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
||||||
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
||||||
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
||||||
|
with:
|
||||||
|
projectPath: ${{ matrix.projectPath }}
|
||||||
|
unityVersion: ${{ matrix.unityVersion }}
|
||||||
|
targetPlatform: ${{ matrix.targetPlatform }}
|
||||||
|
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
|
||||||
|
allowDirtyBuild: true
|
||||||
|
# We use dirty build because we are replacing the default project settings file above
|
||||||
|
|
||||||
|
###########################
|
||||||
|
# Upload #
|
||||||
|
###########################
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: Build Windows (${{ matrix.unityVersion }})
|
||||||
|
path: build
|
||||||
|
retention-days: 14
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
coverage/
|
coverage/
|
||||||
lib/
|
lib/
|
||||||
|
.vsconfig
|
||||||
|
yarn-error.log
|
||||||
|
.orig
|
||||||
|
|||||||
@@ -2,5 +2,6 @@
|
|||||||
"semi": true,
|
"semi": true,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "all",
|
"trailingComma": "all",
|
||||||
"printWidth": 120
|
"printWidth": 120,
|
||||||
|
"proseWrap": "always"
|
||||||
}
|
}
|
||||||
|
|||||||
32
.vscode/settings.json
vendored
Normal file
32
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"god.tsconfig": "./tsconfig.json",
|
||||||
|
"yaml.customTags": [
|
||||||
|
"!And",
|
||||||
|
"!And sequence",
|
||||||
|
"!If",
|
||||||
|
"!If sequence",
|
||||||
|
"!Not",
|
||||||
|
"!Not sequence",
|
||||||
|
"!Equals",
|
||||||
|
"!Equals sequence",
|
||||||
|
"!Or",
|
||||||
|
"!Or sequence",
|
||||||
|
"!FindInMap",
|
||||||
|
"!FindInMap sequence",
|
||||||
|
"!Base64",
|
||||||
|
"!Join",
|
||||||
|
"!Join sequence",
|
||||||
|
"!Cidr",
|
||||||
|
"!Ref",
|
||||||
|
"!Sub",
|
||||||
|
"!Sub sequence",
|
||||||
|
"!GetAtt",
|
||||||
|
"!GetAZs",
|
||||||
|
"!ImportValue",
|
||||||
|
"!ImportValue sequence",
|
||||||
|
"!Select",
|
||||||
|
"!Select sequence",
|
||||||
|
"!Split",
|
||||||
|
"!Split sequence"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -4,13 +4,12 @@
|
|||||||
|
|
||||||
#### Code of Conduct
|
#### Code of Conduct
|
||||||
|
|
||||||
This repository has adopted the Contributor Covenant as it's
|
This repository has adopted the Contributor Covenant as it's Code of Conduct. It is expected that participants adhere to
|
||||||
Code of Conduct. It is expected that participants adhere to it.
|
it.
|
||||||
|
|
||||||
#### Proposing a Change
|
#### Proposing a Change
|
||||||
|
|
||||||
If you are unsure about whether or not a change is desired,
|
If you are unsure about whether or not a change is desired, you can create an issue. This is useful because it creates
|
||||||
you can create an issue. This is useful because it creates
|
|
||||||
the possibility for a discussion that's visible to everyone.
|
the possibility for a discussion that's visible to everyone.
|
||||||
|
|
||||||
When fixing a bug it is fine to submit a pull request right away.
|
When fixing a bug it is fine to submit a pull request right away.
|
||||||
@@ -34,6 +33,11 @@ Please note that commit hooks will run automatically to perform some tasks;
|
|||||||
- run tests
|
- run tests
|
||||||
- build distributable files
|
- build distributable files
|
||||||
|
|
||||||
|
#### Windows users
|
||||||
|
|
||||||
|
Make sure your editor and terminal that run the tests are set to `Powershell 7` or above with
|
||||||
|
`Git's Unix tools for Windows` installed. Some tests require you to be able to run `sh` and other unix commands.
|
||||||
|
|
||||||
#### License
|
#### License
|
||||||
|
|
||||||
By contributing to this repository, you agree that your contributions will be licensed under its MIT license.
|
By contributing to this repository, you agree that your contributions will be licensed under its MIT license.
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -41,6 +41,14 @@ To help improve the documentation, please find the docs [repository](https://git
|
|||||||
|
|
||||||
To contribute to Unity Builder, kindly read the [contribution guide](./CONTRIBUTING.md).
|
To contribute to Unity Builder, kindly read the [contribution guide](./CONTRIBUTING.md).
|
||||||
|
|
||||||
|
## Support us
|
||||||
|
|
||||||
|
GameCI is free for everyone forever.
|
||||||
|
|
||||||
|
You can support us at [OpenCollective](https://opencollective.com/game-ci).
|
||||||
|
|
||||||
## Licence
|
## Licence
|
||||||
|
|
||||||
[MIT](./LICENSE)
|
This repository is [MIT](./LICENSE) licensed.
|
||||||
|
|
||||||
|
This includes all contributions from the community.
|
||||||
|
|||||||
141
action.yml
141
action.yml
@@ -2,6 +2,10 @@ name: 'Unity - Builder'
|
|||||||
author: Webber Takken <webber@takken.io>
|
author: Webber Takken <webber@takken.io>
|
||||||
description: 'Build Unity projects for different platforms.'
|
description: 'Build Unity projects for different platforms.'
|
||||||
inputs:
|
inputs:
|
||||||
|
targetPlatform:
|
||||||
|
required: true
|
||||||
|
default: ''
|
||||||
|
description: 'Platform that the build should target.'
|
||||||
unityVersion:
|
unityVersion:
|
||||||
required: false
|
required: false
|
||||||
default: 'auto'
|
default: 'auto'
|
||||||
@@ -10,10 +14,6 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: 'Specific docker image that should be used for building the project'
|
description: 'Specific docker image that should be used for building the project'
|
||||||
targetPlatform:
|
|
||||||
required: false
|
|
||||||
default: ''
|
|
||||||
description: 'Platform that the build should target.'
|
|
||||||
projectPath:
|
projectPath:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
@@ -30,38 +30,10 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
|
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
|
||||||
remoteBuildCluster:
|
customParameters:
|
||||||
default: 'local'
|
|
||||||
required: false
|
required: false
|
||||||
description: 'Either local, k8s or aws can be used to run builds on a remote cluster. Additional parameters must be configured.'
|
|
||||||
awsStackName:
|
|
||||||
default: 'game-ci'
|
|
||||||
required: false
|
|
||||||
description: 'The Cloud Formation stack name that must be setup before using this option.'
|
|
||||||
kubeConfig:
|
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
description: 'Custom parameters to configure the build.'
|
||||||
description: 'Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until completion.'
|
|
||||||
kubeVolume:
|
|
||||||
default: ''
|
|
||||||
required: false
|
|
||||||
description: 'Supply a Persistent Volume Claim name to use for the Unity build.'
|
|
||||||
remoteBuildMemory:
|
|
||||||
default: '800M'
|
|
||||||
required: false
|
|
||||||
description: 'Amount of memory to assign the remote build container'
|
|
||||||
remoteBuildCpu:
|
|
||||||
default: '0.25'
|
|
||||||
required: false
|
|
||||||
description: 'Amount of CPU time to assign the remote build container'
|
|
||||||
kubeVolumeSize:
|
|
||||||
default: '5Gi'
|
|
||||||
required: false
|
|
||||||
description: 'Amount of disc space to assign the Kubernetes Persistent Volume'
|
|
||||||
githubToken:
|
|
||||||
default: ''
|
|
||||||
required: false
|
|
||||||
description: 'GitHub token for cloning, only needed when kubeconfig is used.'
|
|
||||||
versioning:
|
versioning:
|
||||||
required: false
|
required: false
|
||||||
default: 'Semantic'
|
default: 'Semantic'
|
||||||
@@ -98,14 +70,18 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: 'The android keyaliasPass'
|
description: 'The android keyaliasPass'
|
||||||
customParameters:
|
androidTargetSdkVersion:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: >
|
description: 'The android target API level.'
|
||||||
Custom parameters to configure the build.
|
sshAgent:
|
||||||
|
required: false
|
||||||
Parameters must start with a hyphen (-) and may be followed by a value (without hyphen).
|
default: ''
|
||||||
Parameters without a value will be considered booleans (with a value of true).
|
description: 'SSH Agent path to forward to the container'
|
||||||
|
gitPrivateToken:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: 'Github private token to pull from github'
|
||||||
chownFilesTo:
|
chownFilesTo:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
@@ -113,12 +89,83 @@ inputs:
|
|||||||
allowDirtyBuild:
|
allowDirtyBuild:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
description: >
|
description: 'Allows the branch of the build to be dirty, and still generate the build.'
|
||||||
Allows the branch of the build to be dirty, and still generate the build.
|
postBuildSteps:
|
||||||
|
required: false
|
||||||
Note that it is generally bad practice to modify your branch
|
default: ''
|
||||||
in a CI Pipeline. However there are exceptions where this might
|
description: 'run a post build job in yaml format with the keys image, secrets (name, value object array), command string'
|
||||||
be needed. (use with care).
|
preBuildSteps:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: 'Run a pre build job after the repository setup but before the build job (in yaml format with the keys image, secrets (name, value object array), command line string)'
|
||||||
|
customJobHooks:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: 'Specify custom commands and trigger hooks (injects commands into jobs)'
|
||||||
|
customJob:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: 'Run a custom job instead of the standard build automation for cloud runner (in yaml format with the keys image, secrets (name, value object array), command line string)'
|
||||||
|
awsBaseStackName:
|
||||||
|
default: 'game-ci'
|
||||||
|
required: false
|
||||||
|
description: 'The Cloud Formation stack name that must be setup before using this option.'
|
||||||
|
cloudRunnerCluster:
|
||||||
|
default: 'local'
|
||||||
|
required: false
|
||||||
|
description: 'Either local, k8s or aws can be used to run builds on a remote cluster. Additional parameters must be configured.'
|
||||||
|
cloudRunnerCpu:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Amount of CPU time to assign the remote build container'
|
||||||
|
cloudRunnerMemory:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Amount of memory to assign the remote build container'
|
||||||
|
cachePushOverrideCommand:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'A command run every time a file is pushed to cache, formatted with input file path and remote cache path'
|
||||||
|
cachePullOverrideCommand:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'A command run every time before a file is being pulled from cache, formatted with request cache file and destination path'
|
||||||
|
readInputFromOverrideList:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Comma separated list of input value names to read from "input override command"'
|
||||||
|
readInputOverrideCommand:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Extend game ci by specifying a command to execute to pull input from external source e.g cloud provider secret managers'
|
||||||
|
kubeConfig:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until completion.'
|
||||||
|
kubeVolume:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Supply a Persistent Volume Claim name to use for the Unity build.'
|
||||||
|
kubeStorageClass:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Kubernetes storage class to use for cloud runner jobs, leave empty to install rook cluster.'
|
||||||
|
kubeVolumeSize:
|
||||||
|
default: '5Gi'
|
||||||
|
required: false
|
||||||
|
description: 'Amount of disc space to assign the Kubernetes Persistent Volume'
|
||||||
|
cacheKey:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Cache key to indicate bucket for cache'
|
||||||
|
checkDependencyHealthOverride:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Use to specify a way to check depdency services health to enable resilient self-starting jobs'
|
||||||
|
startDependenciesOverride:
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
description: 'Use to specify a way to start depdency services health to enable resilient self-starting jobs'
|
||||||
outputs:
|
outputs:
|
||||||
volume:
|
volume:
|
||||||
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
|
||||||
@@ -128,5 +175,5 @@ branding:
|
|||||||
icon: 'box'
|
icon: 'box'
|
||||||
color: 'gray-dark'
|
color: 'gray-dark'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
49
dist/BlankProject/.gitignore
vendored
Normal file
49
dist/BlankProject/.gitignore
vendored
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
Library/
|
||||||
|
[Tt]emp/
|
||||||
|
[Oo]bj/
|
||||||
|
[Bb]uild/
|
||||||
|
[Bb]uilds/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Uncomment this line if you wish to ignore the asset store tools plugin
|
||||||
|
# [Aa]ssets/AssetStoreTools*
|
||||||
|
|
||||||
|
# IDEs
|
||||||
|
.vs/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Gradle cache directory
|
||||||
|
.gradle/
|
||||||
|
|
||||||
|
# Autogenerated VS/MD/Consulo solution and project files
|
||||||
|
ExportedObj/
|
||||||
|
.consulo/
|
||||||
|
*.csproj
|
||||||
|
*.unityproj
|
||||||
|
*.sln
|
||||||
|
*.suo
|
||||||
|
*.tmp
|
||||||
|
*.user
|
||||||
|
*.userprefs
|
||||||
|
*.pidb
|
||||||
|
*.booproj
|
||||||
|
*.svd
|
||||||
|
*.pdb
|
||||||
|
*.mdb
|
||||||
|
*.opendb
|
||||||
|
*.VC.db
|
||||||
|
|
||||||
|
# Unity3D generated meta files
|
||||||
|
*.pidb.meta
|
||||||
|
*.pdb.meta
|
||||||
|
*.mdb.meta
|
||||||
|
|
||||||
|
# Unity3D generated file on crash reports
|
||||||
|
sysinfo.txt
|
||||||
|
|
||||||
|
# Builds
|
||||||
|
*.apk
|
||||||
|
*.unitypackage
|
||||||
|
|
||||||
|
# Crashlytics generated file
|
||||||
|
crashlytics-build.properties
|
||||||
8
dist/BlankProject/Assets/Scenes.meta
vendored
Normal file
8
dist/BlankProject/Assets/Scenes.meta
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 131a6b21c8605f84396be9f6751fb6e3
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
208
dist/BlankProject/Assets/Scenes/SampleScene.unity
vendored
Normal file
208
dist/BlankProject/Assets/Scenes/SampleScene.unity
vendored
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!29 &1
|
||||||
|
OcclusionCullingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_OcclusionBakeSettings:
|
||||||
|
smallestOccluder: 5
|
||||||
|
smallestHole: 0.25
|
||||||
|
backfaceThreshold: 100
|
||||||
|
m_SceneGUID: 00000000000000000000000000000000
|
||||||
|
m_OcclusionCullingData: {fileID: 0}
|
||||||
|
--- !u!104 &2
|
||||||
|
RenderSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 9
|
||||||
|
m_Fog: 0
|
||||||
|
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
m_FogMode: 3
|
||||||
|
m_FogDensity: 0.01
|
||||||
|
m_LinearFogStart: 0
|
||||||
|
m_LinearFogEnd: 300
|
||||||
|
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||||
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
|
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||||
|
m_AmbientIntensity: 1
|
||||||
|
m_AmbientMode: 3
|
||||||
|
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||||
|
m_SkyboxMaterial: {fileID: 0}
|
||||||
|
m_HaloStrength: 0.5
|
||||||
|
m_FlareStrength: 1
|
||||||
|
m_FlareFadeSpeed: 3
|
||||||
|
m_HaloTexture: {fileID: 0}
|
||||||
|
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_DefaultReflectionMode: 0
|
||||||
|
m_DefaultReflectionResolution: 128
|
||||||
|
m_ReflectionBounces: 1
|
||||||
|
m_ReflectionIntensity: 1
|
||||||
|
m_CustomReflection: {fileID: 0}
|
||||||
|
m_Sun: {fileID: 0}
|
||||||
|
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_UseRadianceAmbientProbe: 0
|
||||||
|
--- !u!157 &3
|
||||||
|
LightmapSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 12
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_GISettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_EnvironmentLightingMode: 0
|
||||||
|
m_EnableBakedLightmaps: 0
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_LightmapEditorSettings:
|
||||||
|
serializedVersion: 12
|
||||||
|
m_Resolution: 2
|
||||||
|
m_BakeResolution: 40
|
||||||
|
m_AtlasSize: 1024
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_ExtractAmbientOcclusion: 0
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_TextureCompression: 1
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_ReflectionCompression: 2
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_BakeBackend: 0
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 500
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVREnvironmentSampleCount: 500
|
||||||
|
m_PVREnvironmentReferencePointCount: 2048
|
||||||
|
m_PVRFilteringMode: 2
|
||||||
|
m_PVRDenoiserTypeDirect: 0
|
||||||
|
m_PVRDenoiserTypeIndirect: 0
|
||||||
|
m_PVRDenoiserTypeAO: 0
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVREnvironmentMIS: 0
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_ExportTrainingData: 0
|
||||||
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
|
m_LightingDataAsset: {fileID: 0}
|
||||||
|
m_LightingSettings: {fileID: 0}
|
||||||
|
--- !u!196 &4
|
||||||
|
NavMeshSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_BuildSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.4
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
accuratePlacement: 0
|
||||||
|
maxJobWorkers: 0
|
||||||
|
preserveTilesOutsideBounds: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &519420028
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 519420032}
|
||||||
|
- component: {fileID: 519420031}
|
||||||
|
- component: {fileID: 519420029}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &519420029
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 519420028}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &519420031
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 519420028}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 2
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 1
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: -1
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 0
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 0
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 0
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &519420032
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 519420028}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
7
dist/BlankProject/Assets/Scenes/SampleScene.unity.meta
vendored
Normal file
7
dist/BlankProject/Assets/Scenes/SampleScene.unity.meta
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 2cda990e2423bbf4892e6590ba056729
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
BIN
dist/BlankProject/Packages/.DS_Store
vendored
Normal file
BIN
dist/BlankProject/Packages/.DS_Store
vendored
Normal file
Binary file not shown.
4
dist/BlankProject/Packages/manifest.json
vendored
Normal file
4
dist/BlankProject/Packages/manifest.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
}
|
||||||
|
}
|
||||||
4
dist/BlankProject/Packages/packages-lock.json
vendored
Normal file
4
dist/BlankProject/Packages/packages-lock.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
}
|
||||||
|
}
|
||||||
19
dist/BlankProject/ProjectSettings/AudioManager.asset
vendored
Normal file
19
dist/BlankProject/ProjectSettings/AudioManager.asset
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!11 &1
|
||||||
|
AudioManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Volume: 1
|
||||||
|
Rolloff Scale: 1
|
||||||
|
Doppler Factor: 1
|
||||||
|
Default Speaker Mode: 2
|
||||||
|
m_SampleRate: 0
|
||||||
|
m_DSPBufferSize: 1024
|
||||||
|
m_VirtualVoiceCount: 512
|
||||||
|
m_RealVoiceCount: 32
|
||||||
|
m_SpatializerPlugin:
|
||||||
|
m_AmbisonicDecoderPlugin:
|
||||||
|
m_DisableAudio: 0
|
||||||
|
m_VirtualizeEffects: 1
|
||||||
|
m_RequestedDSPBufferSize: 0
|
||||||
6
dist/BlankProject/ProjectSettings/ClusterInputManager.asset
vendored
Normal file
6
dist/BlankProject/ProjectSettings/ClusterInputManager.asset
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!236 &1
|
||||||
|
ClusterInputManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_Inputs: []
|
||||||
37
dist/BlankProject/ProjectSettings/DynamicsManager.asset
vendored
Normal file
37
dist/BlankProject/ProjectSettings/DynamicsManager.asset
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!55 &1
|
||||||
|
PhysicsManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 13
|
||||||
|
m_Gravity: {x: 0, y: -9.81, z: 0}
|
||||||
|
m_DefaultMaterial: {fileID: 0}
|
||||||
|
m_BounceThreshold: 2
|
||||||
|
m_DefaultMaxDepenetrationVelocity: 10
|
||||||
|
m_SleepThreshold: 0.005
|
||||||
|
m_DefaultContactOffset: 0.01
|
||||||
|
m_DefaultSolverIterations: 6
|
||||||
|
m_DefaultSolverVelocityIterations: 1
|
||||||
|
m_QueriesHitBackfaces: 0
|
||||||
|
m_QueriesHitTriggers: 1
|
||||||
|
m_EnableAdaptiveForce: 0
|
||||||
|
m_ClothInterCollisionDistance: 0.1
|
||||||
|
m_ClothInterCollisionStiffness: 0.2
|
||||||
|
m_ContactsGeneration: 1
|
||||||
|
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
|
m_AutoSimulation: 1
|
||||||
|
m_AutoSyncTransforms: 0
|
||||||
|
m_ReuseCollisionCallbacks: 1
|
||||||
|
m_ClothInterCollisionSettingsToggle: 0
|
||||||
|
m_ClothGravity: {x: 0, y: -9.81, z: 0}
|
||||||
|
m_ContactPairsMode: 0
|
||||||
|
m_BroadphaseType: 0
|
||||||
|
m_WorldBounds:
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
m_Extent: {x: 250, y: 250, z: 250}
|
||||||
|
m_WorldSubdivisions: 8
|
||||||
|
m_FrictionType: 0
|
||||||
|
m_EnableEnhancedDeterminism: 0
|
||||||
|
m_EnableUnifiedHeightmaps: 1
|
||||||
|
m_SolverType: 0
|
||||||
|
m_DefaultMaxAngularSpeed: 50
|
||||||
11
dist/BlankProject/ProjectSettings/EditorBuildSettings.asset
vendored
Normal file
11
dist/BlankProject/ProjectSettings/EditorBuildSettings.asset
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1045 &1
|
||||||
|
EditorBuildSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Scenes:
|
||||||
|
- enabled: 1
|
||||||
|
path: Assets/Scenes/SampleScene.unity
|
||||||
|
guid: 2cda990e2423bbf4892e6590ba056729
|
||||||
|
m_configObjects: {}
|
||||||
40
dist/BlankProject/ProjectSettings/EditorSettings.asset
vendored
Normal file
40
dist/BlankProject/ProjectSettings/EditorSettings.asset
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!159 &1
|
||||||
|
EditorSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 11
|
||||||
|
m_SerializationMode: 2
|
||||||
|
m_LineEndingsForNewScripts: 0
|
||||||
|
m_DefaultBehaviorMode: 1
|
||||||
|
m_PrefabRegularEnvironment: {fileID: 0}
|
||||||
|
m_PrefabUIEnvironment: {fileID: 0}
|
||||||
|
m_SpritePackerMode: 4
|
||||||
|
m_SpritePackerPaddingPower: 1
|
||||||
|
m_EtcTextureCompressorBehavior: 1
|
||||||
|
m_EtcTextureFastCompressor: 1
|
||||||
|
m_EtcTextureNormalCompressor: 2
|
||||||
|
m_EtcTextureBestCompressor: 4
|
||||||
|
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp
|
||||||
|
m_ProjectGenerationRootNamespace:
|
||||||
|
m_EnableTextureStreamingInEditMode: 1
|
||||||
|
m_EnableTextureStreamingInPlayMode: 1
|
||||||
|
m_AsyncShaderCompilation: 1
|
||||||
|
m_CachingShaderPreprocessor: 1
|
||||||
|
m_PrefabModeAllowAutoSave: 1
|
||||||
|
m_EnterPlayModeOptionsEnabled: 0
|
||||||
|
m_EnterPlayModeOptions: 3
|
||||||
|
m_GameObjectNamingDigits: 1
|
||||||
|
m_GameObjectNamingScheme: 0
|
||||||
|
m_AssetNamingUsesSpace: 1
|
||||||
|
m_UseLegacyProbeSampleCount: 0
|
||||||
|
m_SerializeInlineMappingsOnOneLine: 1
|
||||||
|
m_DisableCookiesInLightmapper: 1
|
||||||
|
m_AssetPipelineMode: 1
|
||||||
|
m_CacheServerMode: 0
|
||||||
|
m_CacheServerEndpoint:
|
||||||
|
m_CacheServerNamespacePrefix: default
|
||||||
|
m_CacheServerEnableDownload: 1
|
||||||
|
m_CacheServerEnableUpload: 1
|
||||||
|
m_CacheServerEnableAuth: 0
|
||||||
|
m_CacheServerEnableTls: 0
|
||||||
64
dist/BlankProject/ProjectSettings/GraphicsSettings.asset
vendored
Normal file
64
dist/BlankProject/ProjectSettings/GraphicsSettings.asset
vendored
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!30 &1
|
||||||
|
GraphicsSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 13
|
||||||
|
m_Deferred:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_DeferredReflections:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ScreenSpaceShadows:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_LegacyDeferred:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_DepthNormals:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_MotionVectors:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_LightHalo:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_LensFlare:
|
||||||
|
m_Mode: 1
|
||||||
|
m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_VideoShadersIncludeMode: 2
|
||||||
|
m_AlwaysIncludedShaders:
|
||||||
|
- {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
- {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
- {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
- {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
- {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_PreloadedShaders: []
|
||||||
|
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_CustomRenderPipeline: {fileID: 0}
|
||||||
|
m_TransparencySortMode: 0
|
||||||
|
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
|
||||||
|
m_DefaultRenderingPath: 1
|
||||||
|
m_DefaultMobileRenderingPath: 1
|
||||||
|
m_TierSettings: []
|
||||||
|
m_LightmapStripping: 0
|
||||||
|
m_FogStripping: 0
|
||||||
|
m_InstancingStripping: 0
|
||||||
|
m_LightmapKeepPlain: 1
|
||||||
|
m_LightmapKeepDirCombined: 1
|
||||||
|
m_LightmapKeepDynamicPlain: 1
|
||||||
|
m_LightmapKeepDynamicDirCombined: 1
|
||||||
|
m_LightmapKeepShadowMask: 1
|
||||||
|
m_LightmapKeepSubtractive: 1
|
||||||
|
m_FogKeepLinear: 1
|
||||||
|
m_FogKeepExp: 1
|
||||||
|
m_FogKeepExp2: 1
|
||||||
|
m_AlbedoSwatchInfos: []
|
||||||
|
m_LightsUseLinearIntensity: 0
|
||||||
|
m_LightsUseColorTemperature: 0
|
||||||
|
m_DefaultRenderingLayerMask: 1
|
||||||
|
m_LogWhenShaderIsCompiled: 0
|
||||||
487
dist/BlankProject/ProjectSettings/InputManager.asset
vendored
Normal file
487
dist/BlankProject/ProjectSettings/InputManager.asset
vendored
Normal file
@@ -0,0 +1,487 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!13 &1
|
||||||
|
InputManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Axes:
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Horizontal
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton: left
|
||||||
|
positiveButton: right
|
||||||
|
altNegativeButton: a
|
||||||
|
altPositiveButton: d
|
||||||
|
gravity: 3
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 3
|
||||||
|
snap: 1
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Vertical
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton: down
|
||||||
|
positiveButton: up
|
||||||
|
altNegativeButton: s
|
||||||
|
altPositiveButton: w
|
||||||
|
gravity: 3
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 3
|
||||||
|
snap: 1
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Fire1
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: left ctrl
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: mouse 0
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Fire2
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: left alt
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: mouse 1
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Fire3
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: left shift
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: mouse 2
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Jump
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: space
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Mouse X
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton:
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0.1
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 1
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Mouse Y
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton:
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0.1
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 1
|
||||||
|
axis: 1
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Mouse ScrollWheel
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton:
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0.1
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 1
|
||||||
|
axis: 2
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Horizontal
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton:
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 0
|
||||||
|
dead: 0.19
|
||||||
|
sensitivity: 1
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 2
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Vertical
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton:
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 0
|
||||||
|
dead: 0.19
|
||||||
|
sensitivity: 1
|
||||||
|
snap: 0
|
||||||
|
invert: 1
|
||||||
|
type: 2
|
||||||
|
axis: 1
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Fire1
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: joystick button 0
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Fire2
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: joystick button 1
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Fire3
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: joystick button 2
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Jump
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: joystick button 3
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Submit
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: return
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 0
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Submit
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: enter
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: space
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Cancel
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: escape
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 1
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Enable Debug Button 1
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: left ctrl
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 8
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Enable Debug Button 2
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: backspace
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 9
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Reset
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: left alt
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 1
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Next
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: page down
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 5
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Previous
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: page up
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 4
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Validate
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: return
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 0
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Persistent
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: right shift
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 2
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Multiplier
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton:
|
||||||
|
positiveButton: left shift
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton: joystick button 3
|
||||||
|
gravity: 0
|
||||||
|
dead: 0
|
||||||
|
sensitivity: 0
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Horizontal
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton: left
|
||||||
|
positiveButton: right
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Vertical
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton: down
|
||||||
|
positiveButton: up
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 0
|
||||||
|
axis: 0
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Vertical
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton: down
|
||||||
|
positiveButton: up
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 2
|
||||||
|
axis: 6
|
||||||
|
joyNum: 0
|
||||||
|
- serializedVersion: 3
|
||||||
|
m_Name: Debug Horizontal
|
||||||
|
descriptiveName:
|
||||||
|
descriptiveNegativeName:
|
||||||
|
negativeButton: left
|
||||||
|
positiveButton: right
|
||||||
|
altNegativeButton:
|
||||||
|
altPositiveButton:
|
||||||
|
gravity: 1000
|
||||||
|
dead: 0.001
|
||||||
|
sensitivity: 1000
|
||||||
|
snap: 0
|
||||||
|
invert: 0
|
||||||
|
type: 2
|
||||||
|
axis: 5
|
||||||
|
joyNum: 0
|
||||||
35
dist/BlankProject/ProjectSettings/MemorySettings.asset
vendored
Normal file
35
dist/BlankProject/ProjectSettings/MemorySettings.asset
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!387306366 &1
|
||||||
|
MemorySettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_EditorMemorySettings:
|
||||||
|
m_MainAllocatorBlockSize: -1
|
||||||
|
m_ThreadAllocatorBlockSize: -1
|
||||||
|
m_MainGfxBlockSize: -1
|
||||||
|
m_ThreadGfxBlockSize: -1
|
||||||
|
m_CacheBlockSize: -1
|
||||||
|
m_TypetreeBlockSize: -1
|
||||||
|
m_ProfilerBlockSize: -1
|
||||||
|
m_ProfilerEditorBlockSize: -1
|
||||||
|
m_BucketAllocatorGranularity: -1
|
||||||
|
m_BucketAllocatorBucketsCount: -1
|
||||||
|
m_BucketAllocatorBlockSize: -1
|
||||||
|
m_BucketAllocatorBlockCount: -1
|
||||||
|
m_ProfilerBucketAllocatorGranularity: -1
|
||||||
|
m_ProfilerBucketAllocatorBucketsCount: -1
|
||||||
|
m_ProfilerBucketAllocatorBlockSize: -1
|
||||||
|
m_ProfilerBucketAllocatorBlockCount: -1
|
||||||
|
m_TempAllocatorSizeMain: -1
|
||||||
|
m_JobTempAllocatorBlockSize: -1
|
||||||
|
m_BackgroundJobTempAllocatorBlockSize: -1
|
||||||
|
m_JobTempAllocatorReducedBlockSize: -1
|
||||||
|
m_TempAllocatorSizeGIBakingWorker: -1
|
||||||
|
m_TempAllocatorSizeNavMeshWorker: -1
|
||||||
|
m_TempAllocatorSizeAudioWorker: -1
|
||||||
|
m_TempAllocatorSizeCloudWorker: -1
|
||||||
|
m_TempAllocatorSizeGfx: -1
|
||||||
|
m_TempAllocatorSizeJobWorker: -1
|
||||||
|
m_TempAllocatorSizeBackgroundWorker: -1
|
||||||
|
m_TempAllocatorSizePreloadManager: -1
|
||||||
|
m_PlatformMemorySettings: {}
|
||||||
93
dist/BlankProject/ProjectSettings/NavMeshAreas.asset
vendored
Normal file
93
dist/BlankProject/ProjectSettings/NavMeshAreas.asset
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!126 &1
|
||||||
|
NavMeshProjectSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
areas:
|
||||||
|
- name: Walkable
|
||||||
|
cost: 1
|
||||||
|
- name: Not Walkable
|
||||||
|
cost: 1
|
||||||
|
- name: Jump
|
||||||
|
cost: 2
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
- name:
|
||||||
|
cost: 1
|
||||||
|
m_LastAgentTypeID: -887442657
|
||||||
|
m_Settings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.75
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
accuratePlacement: 0
|
||||||
|
maxJobWorkers: 0
|
||||||
|
preserveTilesOutsideBounds: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_SettingNames:
|
||||||
|
- Humanoid
|
||||||
8
dist/BlankProject/ProjectSettings/NetworkManager.asset
vendored
Normal file
8
dist/BlankProject/ProjectSettings/NetworkManager.asset
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!149 &1
|
||||||
|
NetworkManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_DebugLevel: 0
|
||||||
|
m_Sendrate: 15
|
||||||
|
m_AssetToPrefab: {}
|
||||||
44
dist/BlankProject/ProjectSettings/PackageManagerSettings.asset
vendored
Normal file
44
dist/BlankProject/ProjectSettings/PackageManagerSettings.asset
vendored
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &1
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 61
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_EnablePreReleasePackages: 0
|
||||||
|
m_EnablePackageDependencies: 0
|
||||||
|
m_AdvancedSettingsExpanded: 1
|
||||||
|
m_ScopedRegistriesSettingsExpanded: 1
|
||||||
|
m_SeeAllPackageVersions: 0
|
||||||
|
oneTimeWarningShown: 0
|
||||||
|
m_Registries:
|
||||||
|
- m_Id: main
|
||||||
|
m_Name:
|
||||||
|
m_Url: https://packages.unity.com
|
||||||
|
m_Scopes: []
|
||||||
|
m_IsDefault: 1
|
||||||
|
m_Capabilities: 7
|
||||||
|
m_UserSelectedRegistryName:
|
||||||
|
m_UserAddingNewScopedRegistry: 0
|
||||||
|
m_RegistryInfoDraft:
|
||||||
|
m_ErrorMessage:
|
||||||
|
m_Original:
|
||||||
|
m_Id:
|
||||||
|
m_Name:
|
||||||
|
m_Url:
|
||||||
|
m_Scopes: []
|
||||||
|
m_IsDefault: 0
|
||||||
|
m_Capabilities: 0
|
||||||
|
m_Modified: 0
|
||||||
|
m_Name:
|
||||||
|
m_Url:
|
||||||
|
m_Scopes:
|
||||||
|
-
|
||||||
|
m_SelectedScopeIndex: 0
|
||||||
56
dist/BlankProject/ProjectSettings/Physics2DSettings.asset
vendored
Normal file
56
dist/BlankProject/ProjectSettings/Physics2DSettings.asset
vendored
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!19 &1
|
||||||
|
Physics2DSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Gravity: {x: 0, y: -9.81}
|
||||||
|
m_DefaultMaterial: {fileID: 0}
|
||||||
|
m_VelocityIterations: 8
|
||||||
|
m_PositionIterations: 3
|
||||||
|
m_VelocityThreshold: 1
|
||||||
|
m_MaxLinearCorrection: 0.2
|
||||||
|
m_MaxAngularCorrection: 8
|
||||||
|
m_MaxTranslationSpeed: 100
|
||||||
|
m_MaxRotationSpeed: 360
|
||||||
|
m_BaumgarteScale: 0.2
|
||||||
|
m_BaumgarteTimeOfImpactScale: 0.75
|
||||||
|
m_TimeToSleep: 0.5
|
||||||
|
m_LinearSleepTolerance: 0.01
|
||||||
|
m_AngularSleepTolerance: 2
|
||||||
|
m_DefaultContactOffset: 0.01
|
||||||
|
m_JobOptions:
|
||||||
|
serializedVersion: 2
|
||||||
|
useMultithreading: 0
|
||||||
|
useConsistencySorting: 0
|
||||||
|
m_InterpolationPosesPerJob: 100
|
||||||
|
m_NewContactsPerJob: 30
|
||||||
|
m_CollideContactsPerJob: 100
|
||||||
|
m_ClearFlagsPerJob: 200
|
||||||
|
m_ClearBodyForcesPerJob: 200
|
||||||
|
m_SyncDiscreteFixturesPerJob: 50
|
||||||
|
m_SyncContinuousFixturesPerJob: 50
|
||||||
|
m_FindNearestContactsPerJob: 100
|
||||||
|
m_UpdateTriggerContactsPerJob: 100
|
||||||
|
m_IslandSolverCostThreshold: 100
|
||||||
|
m_IslandSolverBodyCostScale: 1
|
||||||
|
m_IslandSolverContactCostScale: 10
|
||||||
|
m_IslandSolverJointCostScale: 10
|
||||||
|
m_IslandSolverBodiesPerJob: 50
|
||||||
|
m_IslandSolverContactsPerJob: 50
|
||||||
|
m_SimulationMode: 0
|
||||||
|
m_QueriesHitTriggers: 1
|
||||||
|
m_QueriesStartInColliders: 1
|
||||||
|
m_CallbacksOnDisable: 1
|
||||||
|
m_ReuseCollisionCallbacks: 1
|
||||||
|
m_AutoSyncTransforms: 0
|
||||||
|
m_AlwaysShowColliders: 0
|
||||||
|
m_ShowColliderSleep: 1
|
||||||
|
m_ShowColliderContacts: 0
|
||||||
|
m_ShowColliderAABB: 0
|
||||||
|
m_ContactArrowScale: 0.2
|
||||||
|
m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412}
|
||||||
|
m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432}
|
||||||
|
m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745}
|
||||||
|
m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804}
|
||||||
|
m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
|
||||||
7
dist/BlankProject/ProjectSettings/PresetManager.asset
vendored
Normal file
7
dist/BlankProject/ProjectSettings/PresetManager.asset
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1386491679 &1
|
||||||
|
PresetManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_DefaultPresets: {}
|
||||||
665
dist/BlankProject/ProjectSettings/ProjectSettings.asset
vendored
Normal file
665
dist/BlankProject/ProjectSettings/ProjectSettings.asset
vendored
Normal file
@@ -0,0 +1,665 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!129 &1
|
||||||
|
PlayerSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 23
|
||||||
|
productGUID: 034a658b4a2c341fbb4fcd6299d7141d
|
||||||
|
AndroidProfiler: 0
|
||||||
|
AndroidFilterTouchesWhenObscured: 0
|
||||||
|
AndroidEnableSustainedPerformanceMode: 0
|
||||||
|
defaultScreenOrientation: 4
|
||||||
|
targetDevice: 2
|
||||||
|
useOnDemandResources: 0
|
||||||
|
accelerometerFrequency: 60
|
||||||
|
companyName: DefaultCompany
|
||||||
|
productName: BlankProject
|
||||||
|
defaultCursor: {fileID: 0}
|
||||||
|
cursorHotspot: {x: 0, y: 0}
|
||||||
|
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
|
||||||
|
m_ShowUnitySplashScreen: 1
|
||||||
|
m_ShowUnitySplashLogo: 1
|
||||||
|
m_SplashScreenOverlayOpacity: 1
|
||||||
|
m_SplashScreenAnimation: 1
|
||||||
|
m_SplashScreenLogoStyle: 1
|
||||||
|
m_SplashScreenDrawMode: 0
|
||||||
|
m_SplashScreenBackgroundAnimationZoom: 1
|
||||||
|
m_SplashScreenLogoAnimationZoom: 1
|
||||||
|
m_SplashScreenBackgroundLandscapeAspect: 1
|
||||||
|
m_SplashScreenBackgroundPortraitAspect: 1
|
||||||
|
m_SplashScreenBackgroundLandscapeUvs:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
m_SplashScreenBackgroundPortraitUvs:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
m_SplashScreenLogos: []
|
||||||
|
m_VirtualRealitySplashScreen: {fileID: 0}
|
||||||
|
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||||
|
defaultScreenWidth: 1920
|
||||||
|
defaultScreenHeight: 1080
|
||||||
|
defaultScreenWidthWeb: 960
|
||||||
|
defaultScreenHeightWeb: 600
|
||||||
|
m_StereoRenderingPath: 0
|
||||||
|
m_ActiveColorSpace: 0
|
||||||
|
m_MTRendering: 1
|
||||||
|
mipStripping: 0
|
||||||
|
numberOfMipsStripped: 0
|
||||||
|
m_StackTraceTypes: 010000000100000001000000010000000100000001000000
|
||||||
|
iosShowActivityIndicatorOnLoading: -1
|
||||||
|
androidShowActivityIndicatorOnLoading: -1
|
||||||
|
iosUseCustomAppBackgroundBehavior: 0
|
||||||
|
iosAllowHTTPDownload: 1
|
||||||
|
allowedAutorotateToPortrait: 1
|
||||||
|
allowedAutorotateToPortraitUpsideDown: 1
|
||||||
|
allowedAutorotateToLandscapeRight: 1
|
||||||
|
allowedAutorotateToLandscapeLeft: 1
|
||||||
|
useOSAutorotation: 1
|
||||||
|
use32BitDisplayBuffer: 1
|
||||||
|
preserveFramebufferAlpha: 0
|
||||||
|
disableDepthAndStencilBuffers: 0
|
||||||
|
androidStartInFullscreen: 1
|
||||||
|
androidRenderOutsideSafeArea: 1
|
||||||
|
androidUseSwappy: 1
|
||||||
|
androidBlitType: 0
|
||||||
|
androidResizableWindow: 0
|
||||||
|
androidDefaultWindowWidth: 1920
|
||||||
|
androidDefaultWindowHeight: 1080
|
||||||
|
androidMinimumWindowWidth: 400
|
||||||
|
androidMinimumWindowHeight: 300
|
||||||
|
androidFullscreenMode: 1
|
||||||
|
defaultIsNativeResolution: 1
|
||||||
|
macRetinaSupport: 1
|
||||||
|
runInBackground: 0
|
||||||
|
captureSingleScreen: 0
|
||||||
|
muteOtherAudioSources: 0
|
||||||
|
Prepare IOS For Recording: 0
|
||||||
|
Force IOS Speakers When Recording: 0
|
||||||
|
deferSystemGesturesMode: 0
|
||||||
|
hideHomeButton: 0
|
||||||
|
submitAnalytics: 1
|
||||||
|
usePlayerLog: 1
|
||||||
|
bakeCollisionMeshes: 0
|
||||||
|
forceSingleInstance: 0
|
||||||
|
useFlipModelSwapchain: 1
|
||||||
|
resizableWindow: 0
|
||||||
|
useMacAppStoreValidation: 0
|
||||||
|
macAppStoreCategory: public.app-category.games
|
||||||
|
gpuSkinning: 0
|
||||||
|
xboxPIXTextureCapture: 0
|
||||||
|
xboxEnableAvatar: 0
|
||||||
|
xboxEnableKinect: 0
|
||||||
|
xboxEnableKinectAutoTracking: 0
|
||||||
|
xboxEnableFitness: 0
|
||||||
|
visibleInBackground: 1
|
||||||
|
allowFullscreenSwitch: 1
|
||||||
|
fullscreenMode: 1
|
||||||
|
xboxSpeechDB: 0
|
||||||
|
xboxEnableHeadOrientation: 0
|
||||||
|
xboxEnableGuest: 0
|
||||||
|
xboxEnablePIXSampling: 0
|
||||||
|
metalFramebufferOnly: 0
|
||||||
|
xboxOneResolution: 0
|
||||||
|
xboxOneSResolution: 0
|
||||||
|
xboxOneXResolution: 3
|
||||||
|
xboxOneMonoLoggingLevel: 0
|
||||||
|
xboxOneLoggingLevel: 1
|
||||||
|
xboxOneDisableEsram: 0
|
||||||
|
xboxOneEnableTypeOptimization: 0
|
||||||
|
xboxOnePresentImmediateThreshold: 0
|
||||||
|
switchQueueCommandMemory: 1048576
|
||||||
|
switchQueueControlMemory: 16384
|
||||||
|
switchQueueComputeMemory: 262144
|
||||||
|
switchNVNShaderPoolsGranularity: 33554432
|
||||||
|
switchNVNDefaultPoolsGranularity: 16777216
|
||||||
|
switchNVNOtherPoolsGranularity: 16777216
|
||||||
|
switchNVNMaxPublicTextureIDCount: 0
|
||||||
|
switchNVNMaxPublicSamplerIDCount: 0
|
||||||
|
stadiaPresentMode: 0
|
||||||
|
stadiaTargetFramerate: 0
|
||||||
|
vulkanNumSwapchainBuffers: 3
|
||||||
|
vulkanEnableSetSRGBWrite: 0
|
||||||
|
vulkanEnablePreTransform: 0
|
||||||
|
vulkanEnableLateAcquireNextImage: 0
|
||||||
|
vulkanEnableCommandBufferRecycling: 1
|
||||||
|
m_SupportedAspectRatios:
|
||||||
|
4:3: 1
|
||||||
|
5:4: 1
|
||||||
|
16:10: 1
|
||||||
|
16:9: 1
|
||||||
|
Others: 1
|
||||||
|
bundleVersion: 1.0
|
||||||
|
preloadedAssets: []
|
||||||
|
metroInputSource: 0
|
||||||
|
wsaTransparentSwapchain: 0
|
||||||
|
m_HolographicPauseOnTrackingLoss: 1
|
||||||
|
xboxOneDisableKinectGpuReservation: 1
|
||||||
|
xboxOneEnable7thCore: 1
|
||||||
|
vrSettings:
|
||||||
|
enable360StereoCapture: 0
|
||||||
|
isWsaHolographicRemotingEnabled: 0
|
||||||
|
enableFrameTimingStats: 0
|
||||||
|
useHDRDisplay: 0
|
||||||
|
D3DHDRBitDepth: 0
|
||||||
|
m_ColorGamuts: 00000000
|
||||||
|
targetPixelDensity: 30
|
||||||
|
resolutionScalingMode: 0
|
||||||
|
androidSupportedAspectRatio: 1
|
||||||
|
androidMaxAspectRatio: 2.1
|
||||||
|
applicationIdentifier:
|
||||||
|
Standalone: com.DefaultCompany.2DProject
|
||||||
|
buildNumber:
|
||||||
|
Standalone: 0
|
||||||
|
iPhone: 0
|
||||||
|
tvOS: 0
|
||||||
|
overrideDefaultApplicationIdentifier: 1
|
||||||
|
AndroidBundleVersionCode: 1
|
||||||
|
AndroidMinSdkVersion: 22
|
||||||
|
AndroidTargetSdkVersion: 0
|
||||||
|
AndroidPreferredInstallLocation: 1
|
||||||
|
aotOptions:
|
||||||
|
stripEngineCode: 1
|
||||||
|
iPhoneStrippingLevel: 0
|
||||||
|
iPhoneScriptCallOptimization: 0
|
||||||
|
ForceInternetPermission: 0
|
||||||
|
ForceSDCardPermission: 0
|
||||||
|
CreateWallpaper: 0
|
||||||
|
APKExpansionFiles: 0
|
||||||
|
keepLoadedShadersAlive: 0
|
||||||
|
StripUnusedMeshComponents: 0
|
||||||
|
VertexChannelCompressionMask: 4054
|
||||||
|
iPhoneSdkVersion: 988
|
||||||
|
iOSTargetOSVersionString: 11.0
|
||||||
|
tvOSSdkVersion: 0
|
||||||
|
tvOSRequireExtendedGameController: 0
|
||||||
|
tvOSTargetOSVersionString: 11.0
|
||||||
|
uIPrerenderedIcon: 0
|
||||||
|
uIRequiresPersistentWiFi: 0
|
||||||
|
uIRequiresFullScreen: 1
|
||||||
|
uIStatusBarHidden: 1
|
||||||
|
uIExitOnSuspend: 0
|
||||||
|
uIStatusBarStyle: 0
|
||||||
|
appleTVSplashScreen: {fileID: 0}
|
||||||
|
appleTVSplashScreen2x: {fileID: 0}
|
||||||
|
tvOSSmallIconLayers: []
|
||||||
|
tvOSSmallIconLayers2x: []
|
||||||
|
tvOSLargeIconLayers: []
|
||||||
|
tvOSLargeIconLayers2x: []
|
||||||
|
tvOSTopShelfImageLayers: []
|
||||||
|
tvOSTopShelfImageLayers2x: []
|
||||||
|
tvOSTopShelfImageWideLayers: []
|
||||||
|
tvOSTopShelfImageWideLayers2x: []
|
||||||
|
iOSLaunchScreenType: 0
|
||||||
|
iOSLaunchScreenPortrait: {fileID: 0}
|
||||||
|
iOSLaunchScreenLandscape: {fileID: 0}
|
||||||
|
iOSLaunchScreenBackgroundColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 0
|
||||||
|
iOSLaunchScreenFillPct: 100
|
||||||
|
iOSLaunchScreenSize: 100
|
||||||
|
iOSLaunchScreenCustomXibPath:
|
||||||
|
iOSLaunchScreeniPadType: 0
|
||||||
|
iOSLaunchScreeniPadImage: {fileID: 0}
|
||||||
|
iOSLaunchScreeniPadBackgroundColor:
|
||||||
|
serializedVersion: 2
|
||||||
|
rgba: 0
|
||||||
|
iOSLaunchScreeniPadFillPct: 100
|
||||||
|
iOSLaunchScreeniPadSize: 100
|
||||||
|
iOSLaunchScreeniPadCustomXibPath:
|
||||||
|
iOSLaunchScreenCustomStoryboardPath:
|
||||||
|
iOSLaunchScreeniPadCustomStoryboardPath:
|
||||||
|
iOSDeviceRequirements: []
|
||||||
|
iOSURLSchemes: []
|
||||||
|
macOSURLSchemes: []
|
||||||
|
iOSBackgroundModes: 0
|
||||||
|
iOSMetalForceHardShadows: 0
|
||||||
|
metalEditorSupport: 1
|
||||||
|
metalAPIValidation: 1
|
||||||
|
iOSRenderExtraFrameOnPause: 0
|
||||||
|
iosCopyPluginsCodeInsteadOfSymlink: 0
|
||||||
|
appleDeveloperTeamID:
|
||||||
|
iOSManualSigningProvisioningProfileID:
|
||||||
|
tvOSManualSigningProvisioningProfileID:
|
||||||
|
iOSManualSigningProvisioningProfileType: 0
|
||||||
|
tvOSManualSigningProvisioningProfileType: 0
|
||||||
|
appleEnableAutomaticSigning: 0
|
||||||
|
iOSRequireARKit: 0
|
||||||
|
iOSAutomaticallyDetectAndAddCapabilities: 1
|
||||||
|
appleEnableProMotion: 0
|
||||||
|
shaderPrecisionModel: 0
|
||||||
|
clonedFromGUID: 10ad67313f4034357812315f3c407484
|
||||||
|
templatePackageId: com.unity.template.2d@6.1.0
|
||||||
|
templateDefaultScene: Assets/Scenes/SampleScene.unity
|
||||||
|
useCustomMainManifest: 0
|
||||||
|
useCustomLauncherManifest: 0
|
||||||
|
useCustomMainGradleTemplate: 0
|
||||||
|
useCustomLauncherGradleManifest: 0
|
||||||
|
useCustomBaseGradleTemplate: 0
|
||||||
|
useCustomGradlePropertiesTemplate: 0
|
||||||
|
useCustomProguardFile: 0
|
||||||
|
AndroidTargetArchitectures: 1
|
||||||
|
AndroidTargetDevices: 0
|
||||||
|
AndroidSplashScreenScale: 0
|
||||||
|
androidSplashScreen: {fileID: 0}
|
||||||
|
AndroidKeystoreName:
|
||||||
|
AndroidKeyaliasName:
|
||||||
|
AndroidBuildApkPerCpuArchitecture: 0
|
||||||
|
AndroidTVCompatibility: 0
|
||||||
|
AndroidIsGame: 1
|
||||||
|
AndroidEnableTango: 0
|
||||||
|
androidEnableBanner: 1
|
||||||
|
androidUseLowAccuracyLocation: 0
|
||||||
|
androidUseCustomKeystore: 0
|
||||||
|
m_AndroidBanners:
|
||||||
|
- width: 320
|
||||||
|
height: 180
|
||||||
|
banner: {fileID: 0}
|
||||||
|
androidGamepadSupportLevel: 0
|
||||||
|
chromeosInputEmulation: 1
|
||||||
|
AndroidMinifyWithR8: 0
|
||||||
|
AndroidMinifyRelease: 0
|
||||||
|
AndroidMinifyDebug: 0
|
||||||
|
AndroidValidateAppBundleSize: 1
|
||||||
|
AndroidAppBundleSizeToValidate: 150
|
||||||
|
m_BuildTargetIcons: []
|
||||||
|
m_BuildTargetPlatformIcons: []
|
||||||
|
m_BuildTargetBatching: []
|
||||||
|
m_BuildTargetGraphicsJobs:
|
||||||
|
- m_BuildTarget: MacStandaloneSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: Switch
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: MetroSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: AppleTVSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: BJMSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: LinuxStandaloneSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: PS4Player
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: iOSSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: WindowsStandaloneSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: XboxOnePlayer
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: LuminSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: AndroidPlayer
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
- m_BuildTarget: WebGLSupport
|
||||||
|
m_GraphicsJobs: 0
|
||||||
|
m_BuildTargetGraphicsJobMode: []
|
||||||
|
m_BuildTargetGraphicsAPIs:
|
||||||
|
- m_BuildTarget: AndroidPlayer
|
||||||
|
m_APIs: 150000000b000000
|
||||||
|
m_Automatic: 1
|
||||||
|
- m_BuildTarget: iOSSupport
|
||||||
|
m_APIs: 10000000
|
||||||
|
m_Automatic: 1
|
||||||
|
m_BuildTargetVRSettings: []
|
||||||
|
openGLRequireES31: 0
|
||||||
|
openGLRequireES31AEP: 0
|
||||||
|
openGLRequireES32: 0
|
||||||
|
m_TemplateCustomTags: {}
|
||||||
|
mobileMTRendering:
|
||||||
|
Android: 1
|
||||||
|
iPhone: 1
|
||||||
|
tvOS: 1
|
||||||
|
m_BuildTargetGroupLightmapEncodingQuality: []
|
||||||
|
m_BuildTargetGroupLightmapSettings: []
|
||||||
|
m_BuildTargetNormalMapEncoding: []
|
||||||
|
m_BuildTargetDefaultTextureCompressionFormat:
|
||||||
|
- m_BuildTarget: Android
|
||||||
|
m_Format: 3
|
||||||
|
playModeTestRunnerEnabled: 0
|
||||||
|
runPlayModeTestAsEditModeTest: 0
|
||||||
|
actionOnDotNetUnhandledException: 1
|
||||||
|
enableInternalProfiler: 0
|
||||||
|
logObjCUncaughtExceptions: 1
|
||||||
|
enableCrashReportAPI: 0
|
||||||
|
cameraUsageDescription:
|
||||||
|
locationUsageDescription:
|
||||||
|
microphoneUsageDescription:
|
||||||
|
bluetoothUsageDescription:
|
||||||
|
switchNMETAOverride:
|
||||||
|
switchNetLibKey:
|
||||||
|
switchSocketMemoryPoolSize: 6144
|
||||||
|
switchSocketAllocatorPoolSize: 128
|
||||||
|
switchSocketConcurrencyLimit: 14
|
||||||
|
switchScreenResolutionBehavior: 2
|
||||||
|
switchUseCPUProfiler: 0
|
||||||
|
switchUseGOLDLinker: 0
|
||||||
|
switchLTOSetting: 0
|
||||||
|
switchApplicationID: 0x01004b9000490000
|
||||||
|
switchNSODependencies:
|
||||||
|
switchTitleNames_0:
|
||||||
|
switchTitleNames_1:
|
||||||
|
switchTitleNames_2:
|
||||||
|
switchTitleNames_3:
|
||||||
|
switchTitleNames_4:
|
||||||
|
switchTitleNames_5:
|
||||||
|
switchTitleNames_6:
|
||||||
|
switchTitleNames_7:
|
||||||
|
switchTitleNames_8:
|
||||||
|
switchTitleNames_9:
|
||||||
|
switchTitleNames_10:
|
||||||
|
switchTitleNames_11:
|
||||||
|
switchTitleNames_12:
|
||||||
|
switchTitleNames_13:
|
||||||
|
switchTitleNames_14:
|
||||||
|
switchTitleNames_15:
|
||||||
|
switchPublisherNames_0:
|
||||||
|
switchPublisherNames_1:
|
||||||
|
switchPublisherNames_2:
|
||||||
|
switchPublisherNames_3:
|
||||||
|
switchPublisherNames_4:
|
||||||
|
switchPublisherNames_5:
|
||||||
|
switchPublisherNames_6:
|
||||||
|
switchPublisherNames_7:
|
||||||
|
switchPublisherNames_8:
|
||||||
|
switchPublisherNames_9:
|
||||||
|
switchPublisherNames_10:
|
||||||
|
switchPublisherNames_11:
|
||||||
|
switchPublisherNames_12:
|
||||||
|
switchPublisherNames_13:
|
||||||
|
switchPublisherNames_14:
|
||||||
|
switchPublisherNames_15:
|
||||||
|
switchIcons_0: {fileID: 0}
|
||||||
|
switchIcons_1: {fileID: 0}
|
||||||
|
switchIcons_2: {fileID: 0}
|
||||||
|
switchIcons_3: {fileID: 0}
|
||||||
|
switchIcons_4: {fileID: 0}
|
||||||
|
switchIcons_5: {fileID: 0}
|
||||||
|
switchIcons_6: {fileID: 0}
|
||||||
|
switchIcons_7: {fileID: 0}
|
||||||
|
switchIcons_8: {fileID: 0}
|
||||||
|
switchIcons_9: {fileID: 0}
|
||||||
|
switchIcons_10: {fileID: 0}
|
||||||
|
switchIcons_11: {fileID: 0}
|
||||||
|
switchIcons_12: {fileID: 0}
|
||||||
|
switchIcons_13: {fileID: 0}
|
||||||
|
switchIcons_14: {fileID: 0}
|
||||||
|
switchIcons_15: {fileID: 0}
|
||||||
|
switchSmallIcons_0: {fileID: 0}
|
||||||
|
switchSmallIcons_1: {fileID: 0}
|
||||||
|
switchSmallIcons_2: {fileID: 0}
|
||||||
|
switchSmallIcons_3: {fileID: 0}
|
||||||
|
switchSmallIcons_4: {fileID: 0}
|
||||||
|
switchSmallIcons_5: {fileID: 0}
|
||||||
|
switchSmallIcons_6: {fileID: 0}
|
||||||
|
switchSmallIcons_7: {fileID: 0}
|
||||||
|
switchSmallIcons_8: {fileID: 0}
|
||||||
|
switchSmallIcons_9: {fileID: 0}
|
||||||
|
switchSmallIcons_10: {fileID: 0}
|
||||||
|
switchSmallIcons_11: {fileID: 0}
|
||||||
|
switchSmallIcons_12: {fileID: 0}
|
||||||
|
switchSmallIcons_13: {fileID: 0}
|
||||||
|
switchSmallIcons_14: {fileID: 0}
|
||||||
|
switchSmallIcons_15: {fileID: 0}
|
||||||
|
switchManualHTML:
|
||||||
|
switchAccessibleURLs:
|
||||||
|
switchLegalInformation:
|
||||||
|
switchMainThreadStackSize: 1048576
|
||||||
|
switchPresenceGroupId:
|
||||||
|
switchLogoHandling: 0
|
||||||
|
switchReleaseVersion: 0
|
||||||
|
switchDisplayVersion: 1.0.0
|
||||||
|
switchStartupUserAccount: 0
|
||||||
|
switchTouchScreenUsage: 0
|
||||||
|
switchSupportedLanguagesMask: 0
|
||||||
|
switchLogoType: 0
|
||||||
|
switchApplicationErrorCodeCategory:
|
||||||
|
switchUserAccountSaveDataSize: 0
|
||||||
|
switchUserAccountSaveDataJournalSize: 0
|
||||||
|
switchApplicationAttribute: 0
|
||||||
|
switchCardSpecSize: -1
|
||||||
|
switchCardSpecClock: -1
|
||||||
|
switchRatingsMask: 0
|
||||||
|
switchRatingsInt_0: 0
|
||||||
|
switchRatingsInt_1: 0
|
||||||
|
switchRatingsInt_2: 0
|
||||||
|
switchRatingsInt_3: 0
|
||||||
|
switchRatingsInt_4: 0
|
||||||
|
switchRatingsInt_5: 0
|
||||||
|
switchRatingsInt_6: 0
|
||||||
|
switchRatingsInt_7: 0
|
||||||
|
switchRatingsInt_8: 0
|
||||||
|
switchRatingsInt_9: 0
|
||||||
|
switchRatingsInt_10: 0
|
||||||
|
switchRatingsInt_11: 0
|
||||||
|
switchRatingsInt_12: 0
|
||||||
|
switchLocalCommunicationIds_0:
|
||||||
|
switchLocalCommunicationIds_1:
|
||||||
|
switchLocalCommunicationIds_2:
|
||||||
|
switchLocalCommunicationIds_3:
|
||||||
|
switchLocalCommunicationIds_4:
|
||||||
|
switchLocalCommunicationIds_5:
|
||||||
|
switchLocalCommunicationIds_6:
|
||||||
|
switchLocalCommunicationIds_7:
|
||||||
|
switchParentalControl: 0
|
||||||
|
switchAllowsScreenshot: 1
|
||||||
|
switchAllowsVideoCapturing: 1
|
||||||
|
switchAllowsRuntimeAddOnContentInstall: 0
|
||||||
|
switchDataLossConfirmation: 0
|
||||||
|
switchUserAccountLockEnabled: 0
|
||||||
|
switchSystemResourceMemory: 16777216
|
||||||
|
switchSupportedNpadStyles: 22
|
||||||
|
switchNativeFsCacheSize: 32
|
||||||
|
switchIsHoldTypeHorizontal: 0
|
||||||
|
switchSupportedNpadCount: 8
|
||||||
|
switchSocketConfigEnabled: 0
|
||||||
|
switchTcpInitialSendBufferSize: 32
|
||||||
|
switchTcpInitialReceiveBufferSize: 64
|
||||||
|
switchTcpAutoSendBufferSizeMax: 256
|
||||||
|
switchTcpAutoReceiveBufferSizeMax: 256
|
||||||
|
switchUdpSendBufferSize: 9
|
||||||
|
switchUdpReceiveBufferSize: 42
|
||||||
|
switchSocketBufferEfficiency: 4
|
||||||
|
switchSocketInitializeEnabled: 1
|
||||||
|
switchNetworkInterfaceManagerInitializeEnabled: 1
|
||||||
|
switchPlayerConnectionEnabled: 1
|
||||||
|
switchUseNewStyleFilepaths: 0
|
||||||
|
switchUseMicroSleepForYield: 1
|
||||||
|
switchEnableRamDiskSupport: 0
|
||||||
|
switchMicroSleepForYieldTime: 25
|
||||||
|
switchRamDiskSpaceSize: 12
|
||||||
|
ps4NPAgeRating: 12
|
||||||
|
ps4NPTitleSecret:
|
||||||
|
ps4NPTrophyPackPath:
|
||||||
|
ps4ParentalLevel: 11
|
||||||
|
ps4ContentID: ED1633-NPXX51362_00-0000000000000000
|
||||||
|
ps4Category: 0
|
||||||
|
ps4MasterVersion: 01.00
|
||||||
|
ps4AppVersion: 01.00
|
||||||
|
ps4AppType: 0
|
||||||
|
ps4ParamSfxPath:
|
||||||
|
ps4VideoOutPixelFormat: 0
|
||||||
|
ps4VideoOutInitialWidth: 1920
|
||||||
|
ps4VideoOutBaseModeInitialWidth: 1920
|
||||||
|
ps4VideoOutReprojectionRate: 60
|
||||||
|
ps4PronunciationXMLPath:
|
||||||
|
ps4PronunciationSIGPath:
|
||||||
|
ps4BackgroundImagePath:
|
||||||
|
ps4StartupImagePath:
|
||||||
|
ps4StartupImagesFolder:
|
||||||
|
ps4IconImagesFolder:
|
||||||
|
ps4SaveDataImagePath:
|
||||||
|
ps4SdkOverride:
|
||||||
|
ps4BGMPath:
|
||||||
|
ps4ShareFilePath:
|
||||||
|
ps4ShareOverlayImagePath:
|
||||||
|
ps4PrivacyGuardImagePath:
|
||||||
|
ps4ExtraSceSysFile:
|
||||||
|
ps4NPtitleDatPath:
|
||||||
|
ps4RemotePlayKeyAssignment: -1
|
||||||
|
ps4RemotePlayKeyMappingDir:
|
||||||
|
ps4PlayTogetherPlayerCount: 0
|
||||||
|
ps4EnterButtonAssignment: 2
|
||||||
|
ps4ApplicationParam1: 0
|
||||||
|
ps4ApplicationParam2: 0
|
||||||
|
ps4ApplicationParam3: 0
|
||||||
|
ps4ApplicationParam4: 0
|
||||||
|
ps4DownloadDataSize: 0
|
||||||
|
ps4GarlicHeapSize: 2048
|
||||||
|
ps4ProGarlicHeapSize: 2560
|
||||||
|
playerPrefsMaxSize: 32768
|
||||||
|
ps4Passcode: bi9UOuSpM2Tlh01vOzwvSikHFswuzleh
|
||||||
|
ps4pnSessions: 1
|
||||||
|
ps4pnPresence: 1
|
||||||
|
ps4pnFriends: 1
|
||||||
|
ps4pnGameCustomData: 1
|
||||||
|
playerPrefsSupport: 0
|
||||||
|
enableApplicationExit: 0
|
||||||
|
resetTempFolder: 1
|
||||||
|
restrictedAudioUsageRights: 0
|
||||||
|
ps4UseResolutionFallback: 0
|
||||||
|
ps4ReprojectionSupport: 0
|
||||||
|
ps4UseAudio3dBackend: 0
|
||||||
|
ps4UseLowGarlicFragmentationMode: 1
|
||||||
|
ps4SocialScreenEnabled: 0
|
||||||
|
ps4ScriptOptimizationLevel: 2
|
||||||
|
ps4Audio3dVirtualSpeakerCount: 14
|
||||||
|
ps4attribCpuUsage: 0
|
||||||
|
ps4PatchPkgPath:
|
||||||
|
ps4PatchLatestPkgPath:
|
||||||
|
ps4PatchChangeinfoPath:
|
||||||
|
ps4PatchDayOne: 0
|
||||||
|
ps4attribUserManagement: 0
|
||||||
|
ps4attribMoveSupport: 0
|
||||||
|
ps4attrib3DSupport: 0
|
||||||
|
ps4attribShareSupport: 0
|
||||||
|
ps4attribExclusiveVR: 0
|
||||||
|
ps4disableAutoHideSplash: 0
|
||||||
|
ps4videoRecordingFeaturesUsed: 0
|
||||||
|
ps4contentSearchFeaturesUsed: 0
|
||||||
|
ps4CompatibilityPS5: 0
|
||||||
|
ps4GPU800MHz: 1
|
||||||
|
ps4attribEyeToEyeDistanceSettingVR: 0
|
||||||
|
ps4IncludedModules: []
|
||||||
|
ps4attribVROutputEnabled: 0
|
||||||
|
monoEnv:
|
||||||
|
splashScreenBackgroundSourceLandscape: {fileID: 0}
|
||||||
|
splashScreenBackgroundSourcePortrait: {fileID: 0}
|
||||||
|
blurSplashScreenBackground: 1
|
||||||
|
spritePackerPolicy:
|
||||||
|
webGLMemorySize: 32
|
||||||
|
webGLExceptionSupport: 1
|
||||||
|
webGLNameFilesAsHashes: 0
|
||||||
|
webGLDataCaching: 1
|
||||||
|
webGLDebugSymbols: 0
|
||||||
|
webGLEmscriptenArgs:
|
||||||
|
webGLModulesDirectory:
|
||||||
|
webGLTemplate: APPLICATION:Default
|
||||||
|
webGLAnalyzeBuildSize: 0
|
||||||
|
webGLUseEmbeddedResources: 0
|
||||||
|
webGLCompressionFormat: 0
|
||||||
|
webGLWasmArithmeticExceptions: 0
|
||||||
|
webGLLinkerTarget: 1
|
||||||
|
webGLThreadsSupport: 0
|
||||||
|
webGLDecompressionFallback: 0
|
||||||
|
scriptingDefineSymbols: {}
|
||||||
|
additionalCompilerArguments: {}
|
||||||
|
platformArchitecture: {}
|
||||||
|
scriptingBackend: {}
|
||||||
|
il2cppCompilerConfiguration: {}
|
||||||
|
managedStrippingLevel: {}
|
||||||
|
incrementalIl2cppBuild: {}
|
||||||
|
suppressCommonWarnings: 1
|
||||||
|
allowUnsafeCode: 0
|
||||||
|
useDeterministicCompilation: 1
|
||||||
|
enableRoslynAnalyzers: 1
|
||||||
|
additionalIl2CppArgs:
|
||||||
|
scriptingRuntimeVersion: 1
|
||||||
|
gcIncremental: 1
|
||||||
|
assemblyVersionValidation: 1
|
||||||
|
gcWBarrierValidation: 0
|
||||||
|
apiCompatibilityLevelPerPlatform: {}
|
||||||
|
m_RenderingPath: 1
|
||||||
|
m_MobileRenderingPath: 1
|
||||||
|
metroPackageName: 2D_BuiltInRenderer
|
||||||
|
metroPackageVersion:
|
||||||
|
metroCertificatePath:
|
||||||
|
metroCertificatePassword:
|
||||||
|
metroCertificateSubject:
|
||||||
|
metroCertificateIssuer:
|
||||||
|
metroCertificateNotAfter: 0000000000000000
|
||||||
|
metroApplicationDescription: 2D_BuiltInRenderer
|
||||||
|
wsaImages: {}
|
||||||
|
metroTileShortName:
|
||||||
|
metroTileShowName: 0
|
||||||
|
metroMediumTileShowName: 0
|
||||||
|
metroLargeTileShowName: 0
|
||||||
|
metroWideTileShowName: 0
|
||||||
|
metroSupportStreamingInstall: 0
|
||||||
|
metroLastRequiredScene: 0
|
||||||
|
metroDefaultTileSize: 1
|
||||||
|
metroTileForegroundText: 2
|
||||||
|
metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0}
|
||||||
|
metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, a: 1}
|
||||||
|
metroSplashScreenUseBackgroundColor: 0
|
||||||
|
platformCapabilities: {}
|
||||||
|
metroTargetDeviceFamilies: {}
|
||||||
|
metroFTAName:
|
||||||
|
metroFTAFileTypes: []
|
||||||
|
metroProtocolName:
|
||||||
|
XboxOneProductId:
|
||||||
|
XboxOneUpdateKey:
|
||||||
|
XboxOneSandboxId:
|
||||||
|
XboxOneContentId:
|
||||||
|
XboxOneTitleId:
|
||||||
|
XboxOneSCId:
|
||||||
|
XboxOneGameOsOverridePath:
|
||||||
|
XboxOnePackagingOverridePath:
|
||||||
|
XboxOneAppManifestOverridePath:
|
||||||
|
XboxOneVersion: 1.0.0.0
|
||||||
|
XboxOnePackageEncryption: 0
|
||||||
|
XboxOnePackageUpdateGranularity: 2
|
||||||
|
XboxOneDescription:
|
||||||
|
XboxOneLanguage:
|
||||||
|
- enus
|
||||||
|
XboxOneCapability: []
|
||||||
|
XboxOneGameRating: {}
|
||||||
|
XboxOneIsContentPackage: 0
|
||||||
|
XboxOneEnhancedXboxCompatibilityMode: 0
|
||||||
|
XboxOneEnableGPUVariability: 1
|
||||||
|
XboxOneSockets: {}
|
||||||
|
XboxOneSplashScreen: {fileID: 0}
|
||||||
|
XboxOneAllowedProductIds: []
|
||||||
|
XboxOnePersistentLocalStorageSize: 0
|
||||||
|
XboxOneXTitleMemory: 8
|
||||||
|
XboxOneOverrideIdentityName:
|
||||||
|
XboxOneOverrideIdentityPublisher:
|
||||||
|
vrEditorSettings: {}
|
||||||
|
cloudServicesEnabled: {}
|
||||||
|
luminIcon:
|
||||||
|
m_Name:
|
||||||
|
m_ModelFolderPath:
|
||||||
|
m_PortalFolderPath:
|
||||||
|
luminCert:
|
||||||
|
m_CertPath:
|
||||||
|
m_SignPackage: 1
|
||||||
|
luminIsChannelApp: 0
|
||||||
|
luminVersion:
|
||||||
|
m_VersionCode: 1
|
||||||
|
m_VersionName:
|
||||||
|
apiCompatibilityLevel: 6
|
||||||
|
activeInputHandler: 0
|
||||||
|
cloudProjectId:
|
||||||
|
framebufferDepthMemorylessMode: 0
|
||||||
|
qualitySettingsNames: []
|
||||||
|
projectName:
|
||||||
|
organizationId:
|
||||||
|
cloudEnabled: 0
|
||||||
|
legacyClampBlendShapeWeights: 0
|
||||||
|
playerDataPath:
|
||||||
|
forceSRGBBlit: 1
|
||||||
|
virtualTexturingSupportEnabled: 0
|
||||||
2
dist/BlankProject/ProjectSettings/ProjectVersion.txt
vendored
Normal file
2
dist/BlankProject/ProjectSettings/ProjectVersion.txt
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
m_EditorVersion: 2021.2.8f1
|
||||||
|
m_EditorVersionWithRevision: 2021.2.8f1 (d0e5f0a7b06a)
|
||||||
236
dist/BlankProject/ProjectSettings/QualitySettings.asset
vendored
Normal file
236
dist/BlankProject/ProjectSettings/QualitySettings.asset
vendored
Normal file
@@ -0,0 +1,236 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!47 &1
|
||||||
|
QualitySettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 5
|
||||||
|
m_CurrentQuality: 5
|
||||||
|
m_QualitySettings:
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Very Low
|
||||||
|
pixelLightCount: 0
|
||||||
|
shadows: 0
|
||||||
|
shadowResolution: 0
|
||||||
|
shadowProjection: 1
|
||||||
|
shadowCascades: 1
|
||||||
|
shadowDistance: 15
|
||||||
|
shadowNearPlaneOffset: 3
|
||||||
|
shadowCascade2Split: 0.33333334
|
||||||
|
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||||
|
shadowmaskMode: 0
|
||||||
|
skinWeights: 1
|
||||||
|
textureQuality: 1
|
||||||
|
anisotropicTextures: 0
|
||||||
|
antiAliasing: 0
|
||||||
|
softParticles: 0
|
||||||
|
softVegetation: 0
|
||||||
|
realtimeReflectionProbes: 0
|
||||||
|
billboardsFaceCameraPosition: 0
|
||||||
|
vSyncCount: 0
|
||||||
|
lodBias: 0.3
|
||||||
|
maximumLODLevel: 0
|
||||||
|
streamingMipmapsActive: 0
|
||||||
|
streamingMipmapsAddAllCameras: 1
|
||||||
|
streamingMipmapsMemoryBudget: 512
|
||||||
|
streamingMipmapsRenderersPerFrame: 512
|
||||||
|
streamingMipmapsMaxLevelReduction: 2
|
||||||
|
streamingMipmapsMaxFileIORequests: 1024
|
||||||
|
particleRaycastBudget: 4
|
||||||
|
asyncUploadTimeSlice: 2
|
||||||
|
asyncUploadBufferSize: 16
|
||||||
|
asyncUploadPersistentBuffer: 1
|
||||||
|
resolutionScalingFixedDPIFactor: 1
|
||||||
|
customRenderPipeline: {fileID: 0}
|
||||||
|
excludedTargetPlatforms: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Low
|
||||||
|
pixelLightCount: 0
|
||||||
|
shadows: 0
|
||||||
|
shadowResolution: 0
|
||||||
|
shadowProjection: 1
|
||||||
|
shadowCascades: 1
|
||||||
|
shadowDistance: 20
|
||||||
|
shadowNearPlaneOffset: 3
|
||||||
|
shadowCascade2Split: 0.33333334
|
||||||
|
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||||
|
shadowmaskMode: 0
|
||||||
|
skinWeights: 2
|
||||||
|
textureQuality: 0
|
||||||
|
anisotropicTextures: 0
|
||||||
|
antiAliasing: 0
|
||||||
|
softParticles: 0
|
||||||
|
softVegetation: 0
|
||||||
|
realtimeReflectionProbes: 0
|
||||||
|
billboardsFaceCameraPosition: 0
|
||||||
|
vSyncCount: 0
|
||||||
|
lodBias: 0.4
|
||||||
|
maximumLODLevel: 0
|
||||||
|
streamingMipmapsActive: 0
|
||||||
|
streamingMipmapsAddAllCameras: 1
|
||||||
|
streamingMipmapsMemoryBudget: 512
|
||||||
|
streamingMipmapsRenderersPerFrame: 512
|
||||||
|
streamingMipmapsMaxLevelReduction: 2
|
||||||
|
streamingMipmapsMaxFileIORequests: 1024
|
||||||
|
particleRaycastBudget: 16
|
||||||
|
asyncUploadTimeSlice: 2
|
||||||
|
asyncUploadBufferSize: 16
|
||||||
|
asyncUploadPersistentBuffer: 1
|
||||||
|
resolutionScalingFixedDPIFactor: 1
|
||||||
|
customRenderPipeline: {fileID: 0}
|
||||||
|
excludedTargetPlatforms: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Medium
|
||||||
|
pixelLightCount: 1
|
||||||
|
shadows: 1
|
||||||
|
shadowResolution: 0
|
||||||
|
shadowProjection: 1
|
||||||
|
shadowCascades: 1
|
||||||
|
shadowDistance: 20
|
||||||
|
shadowNearPlaneOffset: 3
|
||||||
|
shadowCascade2Split: 0.33333334
|
||||||
|
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||||
|
shadowmaskMode: 0
|
||||||
|
skinWeights: 2
|
||||||
|
textureQuality: 0
|
||||||
|
anisotropicTextures: 1
|
||||||
|
antiAliasing: 0
|
||||||
|
softParticles: 0
|
||||||
|
softVegetation: 0
|
||||||
|
realtimeReflectionProbes: 0
|
||||||
|
billboardsFaceCameraPosition: 0
|
||||||
|
vSyncCount: 1
|
||||||
|
lodBias: 0.7
|
||||||
|
maximumLODLevel: 0
|
||||||
|
streamingMipmapsActive: 0
|
||||||
|
streamingMipmapsAddAllCameras: 1
|
||||||
|
streamingMipmapsMemoryBudget: 512
|
||||||
|
streamingMipmapsRenderersPerFrame: 512
|
||||||
|
streamingMipmapsMaxLevelReduction: 2
|
||||||
|
streamingMipmapsMaxFileIORequests: 1024
|
||||||
|
particleRaycastBudget: 64
|
||||||
|
asyncUploadTimeSlice: 2
|
||||||
|
asyncUploadBufferSize: 16
|
||||||
|
asyncUploadPersistentBuffer: 1
|
||||||
|
resolutionScalingFixedDPIFactor: 1
|
||||||
|
customRenderPipeline: {fileID: 0}
|
||||||
|
excludedTargetPlatforms: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: High
|
||||||
|
pixelLightCount: 2
|
||||||
|
shadows: 2
|
||||||
|
shadowResolution: 1
|
||||||
|
shadowProjection: 1
|
||||||
|
shadowCascades: 2
|
||||||
|
shadowDistance: 40
|
||||||
|
shadowNearPlaneOffset: 3
|
||||||
|
shadowCascade2Split: 0.33333334
|
||||||
|
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||||
|
shadowmaskMode: 1
|
||||||
|
skinWeights: 2
|
||||||
|
textureQuality: 0
|
||||||
|
anisotropicTextures: 1
|
||||||
|
antiAliasing: 0
|
||||||
|
softParticles: 0
|
||||||
|
softVegetation: 1
|
||||||
|
realtimeReflectionProbes: 1
|
||||||
|
billboardsFaceCameraPosition: 1
|
||||||
|
vSyncCount: 1
|
||||||
|
lodBias: 1
|
||||||
|
maximumLODLevel: 0
|
||||||
|
streamingMipmapsActive: 0
|
||||||
|
streamingMipmapsAddAllCameras: 1
|
||||||
|
streamingMipmapsMemoryBudget: 512
|
||||||
|
streamingMipmapsRenderersPerFrame: 512
|
||||||
|
streamingMipmapsMaxLevelReduction: 2
|
||||||
|
streamingMipmapsMaxFileIORequests: 1024
|
||||||
|
particleRaycastBudget: 256
|
||||||
|
asyncUploadTimeSlice: 2
|
||||||
|
asyncUploadBufferSize: 16
|
||||||
|
asyncUploadPersistentBuffer: 1
|
||||||
|
resolutionScalingFixedDPIFactor: 1
|
||||||
|
customRenderPipeline: {fileID: 0}
|
||||||
|
excludedTargetPlatforms: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Very High
|
||||||
|
pixelLightCount: 3
|
||||||
|
shadows: 2
|
||||||
|
shadowResolution: 2
|
||||||
|
shadowProjection: 1
|
||||||
|
shadowCascades: 2
|
||||||
|
shadowDistance: 70
|
||||||
|
shadowNearPlaneOffset: 3
|
||||||
|
shadowCascade2Split: 0.33333334
|
||||||
|
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||||
|
shadowmaskMode: 1
|
||||||
|
skinWeights: 4
|
||||||
|
textureQuality: 0
|
||||||
|
anisotropicTextures: 2
|
||||||
|
antiAliasing: 2
|
||||||
|
softParticles: 1
|
||||||
|
softVegetation: 1
|
||||||
|
realtimeReflectionProbes: 1
|
||||||
|
billboardsFaceCameraPosition: 1
|
||||||
|
vSyncCount: 1
|
||||||
|
lodBias: 1.5
|
||||||
|
maximumLODLevel: 0
|
||||||
|
streamingMipmapsActive: 0
|
||||||
|
streamingMipmapsAddAllCameras: 1
|
||||||
|
streamingMipmapsMemoryBudget: 512
|
||||||
|
streamingMipmapsRenderersPerFrame: 512
|
||||||
|
streamingMipmapsMaxLevelReduction: 2
|
||||||
|
streamingMipmapsMaxFileIORequests: 1024
|
||||||
|
particleRaycastBudget: 1024
|
||||||
|
asyncUploadTimeSlice: 2
|
||||||
|
asyncUploadBufferSize: 16
|
||||||
|
asyncUploadPersistentBuffer: 1
|
||||||
|
resolutionScalingFixedDPIFactor: 1
|
||||||
|
customRenderPipeline: {fileID: 0}
|
||||||
|
excludedTargetPlatforms: []
|
||||||
|
- serializedVersion: 2
|
||||||
|
name: Ultra
|
||||||
|
pixelLightCount: 4
|
||||||
|
shadows: 2
|
||||||
|
shadowResolution: 2
|
||||||
|
shadowProjection: 1
|
||||||
|
shadowCascades: 4
|
||||||
|
shadowDistance: 150
|
||||||
|
shadowNearPlaneOffset: 3
|
||||||
|
shadowCascade2Split: 0.33333334
|
||||||
|
shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667}
|
||||||
|
shadowmaskMode: 1
|
||||||
|
skinWeights: 255
|
||||||
|
textureQuality: 0
|
||||||
|
anisotropicTextures: 2
|
||||||
|
antiAliasing: 2
|
||||||
|
softParticles: 1
|
||||||
|
softVegetation: 1
|
||||||
|
realtimeReflectionProbes: 1
|
||||||
|
billboardsFaceCameraPosition: 1
|
||||||
|
vSyncCount: 1
|
||||||
|
lodBias: 2
|
||||||
|
maximumLODLevel: 0
|
||||||
|
streamingMipmapsActive: 0
|
||||||
|
streamingMipmapsAddAllCameras: 1
|
||||||
|
streamingMipmapsMemoryBudget: 512
|
||||||
|
streamingMipmapsRenderersPerFrame: 512
|
||||||
|
streamingMipmapsMaxLevelReduction: 2
|
||||||
|
streamingMipmapsMaxFileIORequests: 1024
|
||||||
|
particleRaycastBudget: 4096
|
||||||
|
asyncUploadTimeSlice: 2
|
||||||
|
asyncUploadBufferSize: 16
|
||||||
|
asyncUploadPersistentBuffer: 1
|
||||||
|
resolutionScalingFixedDPIFactor: 1
|
||||||
|
customRenderPipeline: {fileID: 0}
|
||||||
|
excludedTargetPlatforms: []
|
||||||
|
m_PerPlatformDefaultQuality:
|
||||||
|
Android: 2
|
||||||
|
Lumin: 5
|
||||||
|
Nintendo Switch: 5
|
||||||
|
PS4: 5
|
||||||
|
Stadia: 5
|
||||||
|
Standalone: 5
|
||||||
|
WebGL: 3
|
||||||
|
Windows Store Apps: 5
|
||||||
|
XboxOne: 5
|
||||||
|
iPhone: 2
|
||||||
|
tvOS: 2
|
||||||
43
dist/BlankProject/ProjectSettings/TagManager.asset
vendored
Normal file
43
dist/BlankProject/ProjectSettings/TagManager.asset
vendored
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!78 &1
|
||||||
|
TagManager:
|
||||||
|
serializedVersion: 2
|
||||||
|
tags: []
|
||||||
|
layers:
|
||||||
|
- Default
|
||||||
|
- TransparentFX
|
||||||
|
- Ignore Raycast
|
||||||
|
-
|
||||||
|
- Water
|
||||||
|
- UI
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
m_SortingLayers:
|
||||||
|
- name: Default
|
||||||
|
uniqueID: 0
|
||||||
|
locked: 0
|
||||||
9
dist/BlankProject/ProjectSettings/TimeManager.asset
vendored
Normal file
9
dist/BlankProject/ProjectSettings/TimeManager.asset
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!5 &1
|
||||||
|
TimeManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
Fixed Timestep: 0.02
|
||||||
|
Maximum Allowed Timestep: 0.33333334
|
||||||
|
m_TimeScale: 1
|
||||||
|
Maximum Particle Timestep: 0.03
|
||||||
35
dist/BlankProject/ProjectSettings/UnityConnectSettings.asset
vendored
Normal file
35
dist/BlankProject/ProjectSettings/UnityConnectSettings.asset
vendored
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!310 &1
|
||||||
|
UnityConnectSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 1
|
||||||
|
m_Enabled: 0
|
||||||
|
m_TestMode: 0
|
||||||
|
m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events
|
||||||
|
m_EventUrl: https://cdp.cloud.unity3d.com/v1/events
|
||||||
|
m_ConfigUrl: https://config.uca.cloud.unity3d.com
|
||||||
|
m_DashboardUrl: https://dashboard.unity3d.com
|
||||||
|
m_TestInitMode: 0
|
||||||
|
CrashReportingSettings:
|
||||||
|
m_EventUrl: https://perf-events.cloud.unity3d.com
|
||||||
|
m_Enabled: 0
|
||||||
|
m_LogBufferSize: 10
|
||||||
|
m_CaptureEditorExceptions: 1
|
||||||
|
UnityPurchasingSettings:
|
||||||
|
m_Enabled: 0
|
||||||
|
m_TestMode: 0
|
||||||
|
UnityAnalyticsSettings:
|
||||||
|
m_Enabled: 0
|
||||||
|
m_TestMode: 0
|
||||||
|
m_InitializeOnStartup: 1
|
||||||
|
UnityAdsSettings:
|
||||||
|
m_Enabled: 0
|
||||||
|
m_InitializeOnStartup: 1
|
||||||
|
m_TestMode: 0
|
||||||
|
m_IosGameId:
|
||||||
|
m_AndroidGameId:
|
||||||
|
m_GameIds: {}
|
||||||
|
m_GameId:
|
||||||
|
PerformanceReportingSettings:
|
||||||
|
m_Enabled: 0
|
||||||
14
dist/BlankProject/ProjectSettings/VFXManager.asset
vendored
Normal file
14
dist/BlankProject/ProjectSettings/VFXManager.asset
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!937362698 &1
|
||||||
|
VFXManager:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_IndirectShader: {fileID: 0}
|
||||||
|
m_CopyBufferShader: {fileID: 0}
|
||||||
|
m_SortShader: {fileID: 0}
|
||||||
|
m_StripUpdateShader: {fileID: 0}
|
||||||
|
m_RenderPipeSettingsPath:
|
||||||
|
m_FixedTimeStep: 0.016666668
|
||||||
|
m_MaxDeltaTime: 0.05
|
||||||
|
m_CompiledVersion: 0
|
||||||
|
m_RuntimeVersion: 0
|
||||||
8
dist/BlankProject/ProjectSettings/VersionControlSettings.asset
vendored
Normal file
8
dist/BlankProject/ProjectSettings/VersionControlSettings.asset
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!890905787 &1
|
||||||
|
VersionControlSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_Mode: Visible Meta Files
|
||||||
|
m_CollabEditorSettings:
|
||||||
|
inProgressEnabled: 1
|
||||||
10
dist/BlankProject/ProjectSettings/XRSettings.asset
vendored
Normal file
10
dist/BlankProject/ProjectSettings/XRSettings.asset
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"m_SettingKeys": [
|
||||||
|
"VR Device Disabled",
|
||||||
|
"VR Device User Alert"
|
||||||
|
],
|
||||||
|
"m_SettingValues": [
|
||||||
|
"False",
|
||||||
|
"False"
|
||||||
|
]
|
||||||
|
}
|
||||||
0
dist/BlankProject/ProjectSettings/boot.config
vendored
Normal file
0
dist/BlankProject/ProjectSettings/boot.config
vendored
Normal file
20
dist/Dockerfile
vendored
20
dist/Dockerfile
vendored
@@ -1,20 +0,0 @@
|
|||||||
ARG IMAGE
|
|
||||||
FROM $IMAGE
|
|
||||||
|
|
||||||
LABEL "com.github.actions.name"="Unity - Builder"
|
|
||||||
LABEL "com.github.actions.description"="Build Unity projects for different platforms."
|
|
||||||
LABEL "com.github.actions.icon"="box"
|
|
||||||
LABEL "com.github.actions.color"="gray-dark"
|
|
||||||
|
|
||||||
LABEL "repository"="http://github.com/webbertakken/unity-actions"
|
|
||||||
LABEL "homepage"="http://github.com/webbertakken/unity-actions"
|
|
||||||
LABEL "maintainer"="Webber Takken <webber@takken.io>"
|
|
||||||
|
|
||||||
ADD default-build-script /UnityBuilderAction
|
|
||||||
ADD steps /steps
|
|
||||||
RUN chmod -R +x /steps
|
|
||||||
ADD entrypoint.sh /entrypoint.sh
|
|
||||||
RUN chmod +x /entrypoint.sh
|
|
||||||
RUN ls
|
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
||||||
69
dist/bootstrapper/ApplyClusterAndAcquireLock.sh
vendored
69
dist/bootstrapper/ApplyClusterAndAcquireLock.sh
vendored
@@ -1,69 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This creates a GKE Cluster
|
|
||||||
# - Will wait for any deletion to complete on a cluster with the same name before creating
|
|
||||||
# - Will wait for completion before continuing
|
|
||||||
# - If the script is run concurrently multiple times, only one cluster will be created, all instances will wait for availability
|
|
||||||
# Requires GCP Cloud SDK
|
|
||||||
# Installs retry https://github.com/kadwanev/retry
|
|
||||||
|
|
||||||
GKE_PROJECT=$1
|
|
||||||
GKE_CLUSTER=$2
|
|
||||||
GKE_ZONE=$3
|
|
||||||
|
|
||||||
# may update this to avoid repeated install, drop me a comment if needed
|
|
||||||
sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry"
|
|
||||||
|
|
||||||
attempts=0
|
|
||||||
while [ $attempts -le 1 ]
|
|
||||||
do
|
|
||||||
retry -s 15 -t 20 -v '
|
|
||||||
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
|
|
||||||
jq "
|
|
||||||
.[] |
|
|
||||||
{name: .name, status: .status} |
|
|
||||||
select(.name == \"$GKE_CLUSTER\")
|
|
||||||
" |
|
|
||||||
jq ".status")
|
|
||||||
if [ "$STATUS" == "\"STOPPING\"" ]; then echo "Cluster stopping waiting for completion" && exit 1; fi
|
|
||||||
exit 0
|
|
||||||
'
|
|
||||||
cluster=$(gcloud container clusters list --project $GKE_PROJECT --format="json" | jq '.[] | select(.name == "${GKE_CLUSTER}")')
|
|
||||||
|
|
||||||
if [ -z "$cluster" ];
|
|
||||||
then
|
|
||||||
echo "No clusters found for \"$GKE_CLUSTER\" in project \"$GKE_CLUSTER\" in zone \"$GKE_ZONE\""
|
|
||||||
# you may not need this, it installs GCP beta for additional command line options
|
|
||||||
gcloud components install beta -q
|
|
||||||
# replace this line with whatever type of cluster you want to create
|
|
||||||
gcloud beta container --project $GKE_PROJECT clusters create $GKE_CLUSTER --zone $GKE_ZONE --no-enable-basic-auth --cluster-version "1.15.12-gke.2" --machine-type "custom-1-3072" --image-type "COS" --disk-type "pd-standard" --disk-size "15" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "1" --enable-stackdriver-kubernetes --enable-ip-alias --default-max-pods-per-node "110" --enable-autoscaling --min-nodes "0" --max-nodes "3" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0
|
|
||||||
fi;
|
|
||||||
retry -s 15 -t 20 -v '
|
|
||||||
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
|
|
||||||
jq "
|
|
||||||
.[] |
|
|
||||||
{name: .name, status: .status} |
|
|
||||||
select(.name == \"$GKE_CLUSTER\")
|
|
||||||
" |
|
|
||||||
jq ".status")
|
|
||||||
if [ "$STATUS" == "\"PROVISIONING\"" ]; then echo "Cluster provisioning waiting for available" && exit 1; fi
|
|
||||||
exit 0
|
|
||||||
'
|
|
||||||
echo "Cluster is available"
|
|
||||||
gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
|
|
||||||
kubectl version
|
|
||||||
NSID=$(cat /proc/sys/kernel/random/uuid)
|
|
||||||
echo "::set-env name=NSID::"$NSID
|
|
||||||
{
|
|
||||||
cat <<EOF | kubectl apply -f -
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: ns-unity-builder-$NSID
|
|
||||||
labels:
|
|
||||||
app: unity-builder
|
|
||||||
EOF
|
|
||||||
} && exit 0
|
|
||||||
|
|
||||||
attempts=$(($attempts+1))
|
|
||||||
done
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
kubectl delete ns ns-unity-builder-$NSID
|
|
||||||
|
|
||||||
# do any unity-builder namespaces remain?
|
|
||||||
namespaceCount=$(kubectl get ns --output json | jq ".items | .[] | select(.metadata.labels.app == \"unity-builder\") | select(.status.phase != \"TERMINATING\")" | jq -s "length")
|
|
||||||
echo $namespaceCount
|
|
||||||
if [ "$namespaceCount" != "0" ]
|
|
||||||
then
|
|
||||||
echo "let next cluster delete"
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
echo "delete cluster"
|
|
||||||
retry -s 15 -t 5 -v 'gcloud container clusters delete $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT --quiet'
|
|
||||||
fi
|
|
||||||
@@ -18,7 +18,7 @@ Parameters:
|
|||||||
Type: String
|
Type: String
|
||||||
Default: development
|
Default: development
|
||||||
Description: 'Your deployment environment: DEV, QA , PROD'
|
Description: 'Your deployment environment: DEV, QA , PROD'
|
||||||
BUILDID:
|
BUILDGUID:
|
||||||
Type: String
|
Type: String
|
||||||
Default: ''
|
Default: ''
|
||||||
StackName:
|
StackName:
|
||||||
@@ -34,16 +34,16 @@ Resources:
|
|||||||
DeleteCFNLambda:
|
DeleteCFNLambda:
|
||||||
Type: "AWS::Lambda::Function"
|
Type: "AWS::Lambda::Function"
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
|
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
import boto3
|
import boto3
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
stack_name = os.environ['stackName']
|
stack_name = os.environ['stackName']
|
||||||
delete_stack_name = os.environ['deleteStackName']
|
delete_stack_name = os.environ['deleteStackName']
|
||||||
|
|
||||||
def delete_cfn(stack_name):
|
def delete_cfn(stack_name):
|
||||||
try:
|
try:
|
||||||
cfn = boto3.resource('cloudformation')
|
cfn = boto3.resource('cloudformation')
|
||||||
@@ -51,8 +51,8 @@ Resources:
|
|||||||
stack.delete()
|
stack.delete()
|
||||||
return "SUCCESS"
|
return "SUCCESS"
|
||||||
except:
|
except:
|
||||||
return "ERROR"
|
return "ERROR"
|
||||||
|
|
||||||
def handler(event, context):
|
def handler(event, context):
|
||||||
print("Received event:")
|
print("Received event:")
|
||||||
print(json.dumps(event))
|
print(json.dumps(event))
|
||||||
@@ -66,7 +66,7 @@ Resources:
|
|||||||
Handler: "index.handler"
|
Handler: "index.handler"
|
||||||
Runtime: "python3.6"
|
Runtime: "python3.6"
|
||||||
Timeout: "5"
|
Timeout: "5"
|
||||||
Role:
|
Role:
|
||||||
'Fn::ImportValue': !Sub '${EnvironmentName}:DeleteCFNLambdaExecutionRole'
|
'Fn::ImportValue': !Sub '${EnvironmentName}:DeleteCFNLambdaExecutionRole'
|
||||||
DeleteStackEventRule:
|
DeleteStackEventRule:
|
||||||
DependsOn:
|
DependsOn:
|
||||||
@@ -74,27 +74,27 @@ Resources:
|
|||||||
- GenerateCronExpression
|
- GenerateCronExpression
|
||||||
Type: "AWS::Events::Rule"
|
Type: "AWS::Events::Rule"
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILDID ] ]
|
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILDGUID ] ]
|
||||||
Description: Delete stack event
|
Description: Delete stack event
|
||||||
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
|
||||||
State: "ENABLED"
|
State: "ENABLED"
|
||||||
Targets:
|
Targets:
|
||||||
-
|
-
|
||||||
Arn: !GetAtt DeleteCFNLambda.Arn
|
Arn: !GetAtt DeleteCFNLambda.Arn
|
||||||
Id: 'DeleteCFNLambda'
|
Id: 'DeleteCFNLambda'
|
||||||
PermissionForDeleteCFNLambda:
|
PermissionForDeleteCFNLambda:
|
||||||
Type: "AWS::Lambda::Permission"
|
Type: "AWS::Lambda::Permission"
|
||||||
DependsOn:
|
DependsOn:
|
||||||
- DeleteStackEventRule
|
- DeleteStackEventRule
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
|
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDGUID ] ]
|
||||||
Action: "lambda:InvokeFunction"
|
Action: "lambda:InvokeFunction"
|
||||||
Principal: "events.amazonaws.com"
|
Principal: "events.amazonaws.com"
|
||||||
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
SourceArn: !GetAtt DeleteStackEventRule.Arn
|
||||||
GenerateCronExpLambda:
|
GenerateCronExpLambda:
|
||||||
Type: "AWS::Lambda::Function"
|
Type: "AWS::Lambda::Function"
|
||||||
Properties:
|
Properties:
|
||||||
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDID ] ]
|
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDGUID ] ]
|
||||||
Code:
|
Code:
|
||||||
ZipFile: |
|
ZipFile: |
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
@@ -102,7 +102,7 @@ Resources:
|
|||||||
import logging
|
import logging
|
||||||
import json
|
import json
|
||||||
import cfnresponse
|
import cfnresponse
|
||||||
|
|
||||||
def deletion_time(ttl):
|
def deletion_time(ttl):
|
||||||
delete_at_time = datetime.now() + timedelta(minutes=int(ttl))
|
delete_at_time = datetime.now() + timedelta(minutes=int(ttl))
|
||||||
hh = delete_at_time.hour
|
hh = delete_at_time.hour
|
||||||
@@ -113,7 +113,7 @@ Resources:
|
|||||||
# minutes hours day month day-of-week year
|
# minutes hours day month day-of-week year
|
||||||
cron_exp = "cron({} {} {} {} ? {})".format(mm, hh, dd, month, yyyy)
|
cron_exp = "cron({} {} {} {} ? {})".format(mm, hh, dd, month, yyyy)
|
||||||
return cron_exp
|
return cron_exp
|
||||||
|
|
||||||
def handler(event, context):
|
def handler(event, context):
|
||||||
print('Received event: %s' % json.dumps(event))
|
print('Received event: %s' % json.dumps(event))
|
||||||
status = cfnresponse.SUCCESS
|
status = cfnresponse.SUCCESS
|
||||||
@@ -132,12 +132,12 @@ Resources:
|
|||||||
Handler: "index.handler"
|
Handler: "index.handler"
|
||||||
Runtime: "python3.6"
|
Runtime: "python3.6"
|
||||||
Timeout: "5"
|
Timeout: "5"
|
||||||
Role:
|
Role:
|
||||||
'Fn::ImportValue': !Sub '${EnvironmentName}:DeleteCFNLambdaExecutionRole'
|
'Fn::ImportValue': !Sub '${EnvironmentName}:DeleteCFNLambdaExecutionRole'
|
||||||
GenerateCronExpression:
|
GenerateCronExpression:
|
||||||
Type: "Custom::GenerateCronExpression"
|
Type: "Custom::GenerateCronExpression"
|
||||||
Version: "1.0"
|
Version: "1.0"
|
||||||
Properties:
|
Properties:
|
||||||
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDID ] ]
|
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDGUID ] ]
|
||||||
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
|
||||||
ttl: !Ref 'TTL'
|
ttl: !Ref 'TTL'
|
||||||
|
|||||||
322
dist/cloud-formations/task-def-formation.yml
vendored
322
dist/cloud-formations/task-def-formation.yml
vendored
@@ -1,322 +0,0 @@
|
|||||||
AWSTemplateFormatVersion: 2010-09-09
|
|
||||||
Description: >-
|
|
||||||
AWS Fargate cluster that can span public and private subnets. Supports public
|
|
||||||
facing load balancers, private internal load balancers, and both internal and
|
|
||||||
external service discovery namespaces.
|
|
||||||
Parameters:
|
|
||||||
EnvironmentName:
|
|
||||||
Type: String
|
|
||||||
Default: development
|
|
||||||
Description: 'Your deployment environment: DEV, QA , PROD'
|
|
||||||
ServiceName:
|
|
||||||
Type: String
|
|
||||||
Default: example
|
|
||||||
Description: A name for the service
|
|
||||||
ImageUrl:
|
|
||||||
Type: String
|
|
||||||
Default: nginx
|
|
||||||
Description: >-
|
|
||||||
The url of a docker image that contains the application process that will
|
|
||||||
handle the traffic for this service
|
|
||||||
ContainerPort:
|
|
||||||
Type: Number
|
|
||||||
Default: 80
|
|
||||||
Description: What port number the application inside the docker container is binding to
|
|
||||||
ContainerCpu:
|
|
||||||
Type: Number
|
|
||||||
Default: 1024
|
|
||||||
Description: How much CPU to give the container. 1024 is 1 CPU
|
|
||||||
ContainerMemory:
|
|
||||||
Type: Number
|
|
||||||
Default: 2048
|
|
||||||
Description: How much memory in megabytes to give the container
|
|
||||||
BUILDID:
|
|
||||||
Type: String
|
|
||||||
Default: ''
|
|
||||||
Command:
|
|
||||||
Type: String
|
|
||||||
Default: 'ls'
|
|
||||||
EntryPoint:
|
|
||||||
Type: String
|
|
||||||
Default: '/bin/sh'
|
|
||||||
WorkingDirectory:
|
|
||||||
Type: String
|
|
||||||
Default: '/efsdata/'
|
|
||||||
Role:
|
|
||||||
Type: String
|
|
||||||
Default: ''
|
|
||||||
Description: >-
|
|
||||||
(Optional) An IAM role to give the service's containers if the code within
|
|
||||||
needs to access other AWS resources like S3 buckets, DynamoDB tables, etc
|
|
||||||
EFSMountDirectory:
|
|
||||||
Type: String
|
|
||||||
Default: '/efsdata'
|
|
||||||
GithubToken:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
UnityLicense:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
UnityEmail:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
UnityPassword:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
UnitySerial:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
AndroidKeystoreBase64:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
AndroidKeystorePass:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
AndroidKeyAliasPass:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
AWSAccessKeyID:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
AWSSecretAccessKey:
|
|
||||||
Type: String
|
|
||||||
Default: '0'
|
|
||||||
Mappings:
|
|
||||||
SubnetConfig:
|
|
||||||
VPC:
|
|
||||||
CIDR: 10.0.0.0/16
|
|
||||||
PublicOne:
|
|
||||||
CIDR: 10.0.0.0/24
|
|
||||||
PublicTwo:
|
|
||||||
CIDR: 10.0.1.0/24
|
|
||||||
Conditions:
|
|
||||||
HasCustomRole: !Not
|
|
||||||
- !Equals
|
|
||||||
- Ref: Role
|
|
||||||
- ''
|
|
||||||
Resources:
|
|
||||||
LogGroup:
|
|
||||||
Type: 'AWS::Logs::LogGroup'
|
|
||||||
Properties:
|
|
||||||
LogGroupName: !Ref ServiceName
|
|
||||||
Metadata:
|
|
||||||
'AWS::CloudFormation::Designer':
|
|
||||||
id: aece53ae-b82d-4267-bc16-ed964b05db27
|
|
||||||
SubscriptionFilter:
|
|
||||||
Type: 'AWS::Logs::SubscriptionFilter'
|
|
||||||
Properties:
|
|
||||||
FilterPattern: ''
|
|
||||||
RoleArn:
|
|
||||||
'Fn::ImportValue': !Sub '${EnvironmentName}:CloudWatchIAMRole'
|
|
||||||
LogGroupName: !Ref ServiceName
|
|
||||||
DestinationArn:
|
|
||||||
'Fn::GetAtt':
|
|
||||||
- KinesisStream
|
|
||||||
- Arn
|
|
||||||
Metadata:
|
|
||||||
'AWS::CloudFormation::Designer':
|
|
||||||
id: 7f809e91-9e5d-4678-98c1-c5085956c480
|
|
||||||
DependsOn:
|
|
||||||
- LogGroup
|
|
||||||
- KinesisStream
|
|
||||||
KinesisStream:
|
|
||||||
Type: 'AWS::Kinesis::Stream'
|
|
||||||
Properties:
|
|
||||||
Name: !Ref ServiceName
|
|
||||||
ShardCount: 1
|
|
||||||
Metadata:
|
|
||||||
'AWS::CloudFormation::Designer':
|
|
||||||
id: c6f18447-b879-4696-8873-f981b2cedd2b
|
|
||||||
|
|
||||||
GithubTokenSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'GithubToken', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref GithubToken
|
|
||||||
|
|
||||||
UnityLicenseSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'UnityLicense', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref UnityLicense
|
|
||||||
|
|
||||||
UnityEmailSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'UnityEmail', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref UnityEmail
|
|
||||||
|
|
||||||
UnityPasswordSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'UnityPassword', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref UnityPassword
|
|
||||||
|
|
||||||
UnitySerialSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'UnitySerial', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref UnitySerial
|
|
||||||
|
|
||||||
AndroidKeystoreBase64Secret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'AndroidKeystoreBase64', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref AndroidKeystoreBase64
|
|
||||||
|
|
||||||
AndroidKeystorePassSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'AndroidKeystorePass', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref AndroidKeystorePass
|
|
||||||
|
|
||||||
AndroidKeyAliasPassSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'AndroidKeyAliasPass', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref AndroidKeyAliasPass
|
|
||||||
AWSAccessKeyIDSecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'AWSAccessKeyID', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref AWSAccessKeyID
|
|
||||||
AWSSecretAccessKeySecret:
|
|
||||||
Type: AWS::SecretsManager::Secret
|
|
||||||
Properties:
|
|
||||||
Name: !Join [ "", [ 'AWSSecretAccessKey', !Ref BUILDID ] ]
|
|
||||||
SecretString: !Ref AWSSecretAccessKey
|
|
||||||
|
|
||||||
TaskDefinition:
|
|
||||||
Type: 'AWS::ECS::TaskDefinition'
|
|
||||||
Properties:
|
|
||||||
Family: !Ref ServiceName
|
|
||||||
Cpu: !Ref ContainerCpu
|
|
||||||
Memory: !Ref ContainerMemory
|
|
||||||
NetworkMode: awsvpc
|
|
||||||
Volumes:
|
|
||||||
- Name: efs-data
|
|
||||||
EFSVolumeConfiguration:
|
|
||||||
FilesystemId:
|
|
||||||
'Fn::ImportValue': !Sub '${EnvironmentName}:EfsFileStorageId'
|
|
||||||
TransitEncryption: ENABLED
|
|
||||||
RequiresCompatibilities:
|
|
||||||
- FARGATE
|
|
||||||
ExecutionRoleArn:
|
|
||||||
'Fn::ImportValue': !Sub '${EnvironmentName}:ECSTaskExecutionRole'
|
|
||||||
TaskRoleArn:
|
|
||||||
'Fn::If':
|
|
||||||
- HasCustomRole
|
|
||||||
- !Ref Role
|
|
||||||
- !Ref 'AWS::NoValue'
|
|
||||||
ContainerDefinitions:
|
|
||||||
- Name: !Ref ServiceName
|
|
||||||
Cpu: !Ref ContainerCpu
|
|
||||||
Memory: !Ref ContainerMemory
|
|
||||||
Image: !Ref ImageUrl
|
|
||||||
EntryPoint:
|
|
||||||
Fn::Split:
|
|
||||||
- ","
|
|
||||||
- !Ref EntryPoint
|
|
||||||
Command:
|
|
||||||
Fn::Split:
|
|
||||||
- ","
|
|
||||||
- !Ref Command
|
|
||||||
WorkingDirectory: !Ref WorkingDirectory
|
|
||||||
Environment:
|
|
||||||
- Name: ALLOW_EMPTY_PASSWORD
|
|
||||||
Value: 'yes'
|
|
||||||
MountPoints:
|
|
||||||
- SourceVolume: efs-data
|
|
||||||
ContainerPath: !Ref EFSMountDirectory
|
|
||||||
ReadOnly: false
|
|
||||||
Secrets:
|
|
||||||
- Name: 'GITHUB_TOKEN'
|
|
||||||
ValueFrom: !Ref GithubTokenSecret
|
|
||||||
- Name: 'UNITY_LICENSE'
|
|
||||||
ValueFrom: !Ref UnityLicenseSecret
|
|
||||||
- Name: 'UNITY_EMAIL'
|
|
||||||
ValueFrom: !Ref UnityEmailSecret
|
|
||||||
- Name: 'UNITY_PASSWORD'
|
|
||||||
ValueFrom: !Ref UnityPasswordSecret
|
|
||||||
- Name: 'UNITY_SERIAL'
|
|
||||||
ValueFrom: !Ref UnitySerialSecret
|
|
||||||
- Name: 'ANDROID_KEYSTORE_BASE64'
|
|
||||||
ValueFrom: !Ref AndroidKeystoreBase64Secret
|
|
||||||
- Name: 'ANDROID_KEYSTORE_PASS'
|
|
||||||
ValueFrom: !Ref AndroidKeystorePassSecret
|
|
||||||
- Name: 'AWS_ACCESS_KEY_ID'
|
|
||||||
ValueFrom: !Ref AWSAccessKeyIDSecret
|
|
||||||
- Name: 'AWS_SECRET_ACCESS_KEY'
|
|
||||||
ValueFrom: !Ref AWSSecretAccessKeySecret
|
|
||||||
LogConfiguration:
|
|
||||||
LogDriver: awslogs
|
|
||||||
Options:
|
|
||||||
awslogs-group: !Ref ServiceName
|
|
||||||
awslogs-region: !Ref 'AWS::Region'
|
|
||||||
awslogs-stream-prefix: !Ref ServiceName
|
|
||||||
Metadata:
|
|
||||||
'AWS::CloudFormation::Designer':
|
|
||||||
id: dabb0116-abe0-48a6-a8af-cf9111c879a5
|
|
||||||
DependsOn:
|
|
||||||
- LogGroup
|
|
||||||
Metadata:
|
|
||||||
'AWS::CloudFormation::Designer':
|
|
||||||
dabb0116-abe0-48a6-a8af-cf9111c879a5:
|
|
||||||
size:
|
|
||||||
width: 60
|
|
||||||
height: 60
|
|
||||||
position:
|
|
||||||
x: 270
|
|
||||||
'y': 90
|
|
||||||
z: 1
|
|
||||||
embeds: []
|
|
||||||
dependson:
|
|
||||||
- aece53ae-b82d-4267-bc16-ed964b05db27
|
|
||||||
c6f18447-b879-4696-8873-f981b2cedd2b:
|
|
||||||
size:
|
|
||||||
width: 60
|
|
||||||
height: 60
|
|
||||||
position:
|
|
||||||
x: 270
|
|
||||||
'y': 210
|
|
||||||
z: 1
|
|
||||||
embeds: []
|
|
||||||
7f809e91-9e5d-4678-98c1-c5085956c480:
|
|
||||||
size:
|
|
||||||
width: 60
|
|
||||||
height: 60
|
|
||||||
position:
|
|
||||||
x: 60
|
|
||||||
'y': 300
|
|
||||||
z: 1
|
|
||||||
embeds: []
|
|
||||||
dependson:
|
|
||||||
- aece53ae-b82d-4267-bc16-ed964b05db27
|
|
||||||
- c6f18447-b879-4696-8873-f981b2cedd2b
|
|
||||||
aece53ae-b82d-4267-bc16-ed964b05db27:
|
|
||||||
size:
|
|
||||||
width: 150
|
|
||||||
height: 150
|
|
||||||
position:
|
|
||||||
x: 60
|
|
||||||
'y': 90
|
|
||||||
z: 1
|
|
||||||
embeds: []
|
|
||||||
4d2da56c-3643-46b8-aaee-e46e19f95fcc:
|
|
||||||
source:
|
|
||||||
id: 7f809e91-9e5d-4678-98c1-c5085956c480
|
|
||||||
target:
|
|
||||||
id: aece53ae-b82d-4267-bc16-ed964b05db27
|
|
||||||
z: 11
|
|
||||||
14eb957b-f094-4653-93c4-77b2f851953c:
|
|
||||||
source:
|
|
||||||
id: 7f809e91-9e5d-4678-98c1-c5085956c480
|
|
||||||
target:
|
|
||||||
id: c6f18447-b879-4696-8873-f981b2cedd2b
|
|
||||||
z: 12
|
|
||||||
85c57444-e5bb-4230-bc85-e545cd4558f6:
|
|
||||||
source:
|
|
||||||
id: dabb0116-abe0-48a6-a8af-cf9111c879a5
|
|
||||||
target:
|
|
||||||
id: aece53ae-b82d-4267-bc16-ed964b05db27
|
|
||||||
z: 13
|
|
||||||
@@ -39,12 +39,14 @@ namespace UnityBuilderAction
|
|||||||
|
|
||||||
// Set version for this build
|
// Set version for this build
|
||||||
VersionApplicator.SetVersion(options["buildVersion"]);
|
VersionApplicator.SetVersion(options["buildVersion"]);
|
||||||
VersionApplicator.SetAndroidVersionCode(options["androidVersionCode"]);
|
|
||||||
|
|
||||||
// Apply Android settings
|
// Apply Android settings
|
||||||
if (buildPlayerOptions.target == BuildTarget.Android)
|
if (buildPlayerOptions.target == BuildTarget.Android)
|
||||||
|
{
|
||||||
|
VersionApplicator.SetAndroidVersionCode(options["androidVersionCode"]);
|
||||||
AndroidSettings.Apply(options);
|
AndroidSettings.Apply(options);
|
||||||
|
}
|
||||||
|
|
||||||
// Execute default AddressableAsset content build, if the package is installed.
|
// Execute default AddressableAsset content build, if the package is installed.
|
||||||
// Version defines would be the best solution here, but Unity 2018 doesn't support that,
|
// Version defines would be the best solution here, but Unity 2018 doesn't support that,
|
||||||
// so we fall back to using reflection instead.
|
// so we fall back to using reflection instead.
|
||||||
@@ -53,14 +55,11 @@ namespace UnityBuilderAction
|
|||||||
if (addressableAssetSettingsType != null)
|
if (addressableAssetSettingsType != null)
|
||||||
{
|
{
|
||||||
// ReSharper disable once PossibleNullReferenceException, used from try-catch
|
// ReSharper disable once PossibleNullReferenceException, used from try-catch
|
||||||
void CallAddressablesMethod(string methodName, object[] args) => addressableAssetSettingsType
|
|
||||||
.GetMethod(methodName, BindingFlags.Static | BindingFlags.Public)
|
|
||||||
.Invoke(null, args);
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CallAddressablesMethod("CleanPlayerContent", new object[] { null });
|
addressableAssetSettingsType.GetMethod("CleanPlayerContent", BindingFlags.Static | BindingFlags.Public)
|
||||||
CallAddressablesMethod("BuildPlayerContent", Array.Empty<object>());
|
.Invoke(null, new object[] {null});
|
||||||
|
addressableAssetSettingsType.GetMethod("BuildPlayerContent", new Type[0]).Invoke(null, new object[0]);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
||||||
namespace UnityBuilderAction.Input
|
namespace UnityBuilderAction.Input
|
||||||
@@ -8,14 +9,33 @@ namespace UnityBuilderAction.Input
|
|||||||
public static void Apply(Dictionary<string, string> options)
|
public static void Apply(Dictionary<string, string> options)
|
||||||
{
|
{
|
||||||
EditorUserBuildSettings.buildAppBundle = options["customBuildPath"].EndsWith(".aab");
|
EditorUserBuildSettings.buildAppBundle = options["customBuildPath"].EndsWith(".aab");
|
||||||
|
#if UNITY_2019_1_OR_NEWER
|
||||||
if (options.TryGetValue("androidKeystoreName", out string keystoreName) && !string.IsNullOrEmpty(keystoreName))
|
if (options.TryGetValue("androidKeystoreName", out string keystoreName) && !string.IsNullOrEmpty(keystoreName))
|
||||||
|
{
|
||||||
|
PlayerSettings.Android.useCustomKeystore = true;
|
||||||
PlayerSettings.Android.keystoreName = keystoreName;
|
PlayerSettings.Android.keystoreName = keystoreName;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (options.TryGetValue("androidKeystorePass", out string keystorePass) && !string.IsNullOrEmpty(keystorePass))
|
if (options.TryGetValue("androidKeystorePass", out string keystorePass) && !string.IsNullOrEmpty(keystorePass))
|
||||||
PlayerSettings.Android.keystorePass = keystorePass;
|
PlayerSettings.Android.keystorePass = keystorePass;
|
||||||
if (options.TryGetValue("androidKeyaliasName", out string keyaliasName) && !string.IsNullOrEmpty(keyaliasName))
|
if (options.TryGetValue("androidKeyaliasName", out string keyaliasName) && !string.IsNullOrEmpty(keyaliasName))
|
||||||
PlayerSettings.Android.keyaliasName = keyaliasName;
|
PlayerSettings.Android.keyaliasName = keyaliasName;
|
||||||
if (options.TryGetValue("androidKeyaliasPass", out string keyaliasPass) && !string.IsNullOrEmpty(keyaliasPass))
|
if (options.TryGetValue("androidKeyaliasPass", out string keyaliasPass) && !string.IsNullOrEmpty(keyaliasPass))
|
||||||
PlayerSettings.Android.keyaliasPass = keyaliasPass;
|
PlayerSettings.Android.keyaliasPass = keyaliasPass;
|
||||||
|
if (options.TryGetValue("androidTargetSdkVersion", out string androidTargetSdkVersion) && !string.IsNullOrEmpty(androidTargetSdkVersion))
|
||||||
|
{
|
||||||
|
var targetSdkVersion = AndroidSdkVersions.AndroidApiLevelAuto;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
targetSdkVersion =
|
||||||
|
(AndroidSdkVersions) Enum.Parse(typeof(AndroidSdkVersions), androidTargetSdkVersion);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("Failed to parse androidTargetSdkVersion! Fallback to AndroidApiLevelAuto");
|
||||||
|
}
|
||||||
|
PlayerSettings.Android.targetSdkVersion = targetSdkVersion;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ namespace UnityBuilderAction.Versioning
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void SetAndroidVersionCode(string androidVersionCode) {
|
public static void SetAndroidVersionCode(string androidVersionCode) {
|
||||||
PlayerSettings.Android.bundleVersionCode = Int32.Parse(androidVersionCode);
|
int bundleVersionCode = Int32.Parse(androidVersionCode);
|
||||||
|
if (bundleVersionCode <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerSettings.Android.bundleVersionCode = bundleVersionCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Apply(string version)
|
static void Apply(string version)
|
||||||
|
|||||||
396810
dist/index.js
generated
vendored
396810
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2275
dist/licenses.txt
generated
vendored
2275
dist/licenses.txt
generated
vendored
File diff suppressed because it is too large
Load Diff
48
dist/platforms/mac/entrypoint.sh
vendored
Executable file
48
dist/platforms/mac/entrypoint.sh
vendored
Executable file
@@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create directories for license activation
|
||||||
|
#
|
||||||
|
|
||||||
|
sudo mkdir /Library/Application\ Support/Unity
|
||||||
|
sudo chmod -R 777 /Library/Application\ Support/Unity
|
||||||
|
|
||||||
|
ACTIVATE_LICENSE_PATH="$ACTION_FOLDER/BlankProject"
|
||||||
|
mkdir -p "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run steps
|
||||||
|
#
|
||||||
|
source $ACTION_FOLDER/platforms/mac/steps/activate.sh
|
||||||
|
source $ACTION_FOLDER/platforms/mac/steps/build.sh
|
||||||
|
source $ACTION_FOLDER/platforms/mac/steps/return_license.sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Remove license activation directory
|
||||||
|
#
|
||||||
|
|
||||||
|
sudo rm -r /Library/Application\ Support/Unity
|
||||||
|
rm -r "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Instructions for debugging
|
||||||
|
#
|
||||||
|
|
||||||
|
if [[ $BUILD_EXIT_CODE -gt 0 ]]; then
|
||||||
|
echo ""
|
||||||
|
echo "###########################"
|
||||||
|
echo "# Failure #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
echo "Please note that the exit code is not very descriptive."
|
||||||
|
echo "Most likely it will not help you solve the issue."
|
||||||
|
echo ""
|
||||||
|
echo "To find the reason for failure: please search for errors in the log above."
|
||||||
|
echo ""
|
||||||
|
fi;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Exit with code from the build step.
|
||||||
|
#
|
||||||
|
|
||||||
|
exit $BUILD_EXIT_CODE
|
||||||
37
dist/platforms/mac/steps/activate.sh
vendored
Executable file
37
dist/platforms/mac/steps/activate.sh
vendored
Executable file
@@ -0,0 +1,37 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Run in ACTIVATE_LICENSE_PATH directory
|
||||||
|
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
|
||||||
|
pushd "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
|
echo "Requesting activation"
|
||||||
|
|
||||||
|
# Activate license
|
||||||
|
/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \
|
||||||
|
-logFile /dev/stdout \
|
||||||
|
-batchmode \
|
||||||
|
-nographics \
|
||||||
|
-quit \
|
||||||
|
-serial "$UNITY_SERIAL" \
|
||||||
|
-username "$UNITY_EMAIL" \
|
||||||
|
-password "$UNITY_PASSWORD" \
|
||||||
|
-projectPath "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
|
# Store the exit code from the verify command
|
||||||
|
UNITY_EXIT_CODE=$?
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display information about the result
|
||||||
|
#
|
||||||
|
if [ $UNITY_EXIT_CODE -eq 0 ]; then
|
||||||
|
# Activation was a success
|
||||||
|
echo "Activation complete."
|
||||||
|
else
|
||||||
|
# Activation failed so exit with the code from the license verification step
|
||||||
|
echo "Unclassified error occured while trying to activate license."
|
||||||
|
echo "Exit code was: $UNITY_EXIT_CODE"
|
||||||
|
exit $UNITY_EXIT_CODE
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Return to previous working directory
|
||||||
|
popd
|
||||||
193
dist/platforms/mac/steps/build.sh
vendored
Executable file
193
dist/platforms/mac/steps/build.sh
vendored
Executable file
@@ -0,0 +1,193 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set project path
|
||||||
|
#
|
||||||
|
|
||||||
|
UNITY_PROJECT_PATH="$GITHUB_WORKSPACE/$PROJECT_PATH"
|
||||||
|
echo "Using project path \"$UNITY_PROJECT_PATH\"."
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display the name for the build, doubles as the output name
|
||||||
|
#
|
||||||
|
|
||||||
|
echo "Using build name \"$BUILD_NAME\"."
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display the build's target platform;
|
||||||
|
#
|
||||||
|
|
||||||
|
echo "Using build target \"$BUILD_TARGET\"."
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display build path and file
|
||||||
|
#
|
||||||
|
|
||||||
|
echo "Using build path \"$BUILD_PATH\" to save file \"$BUILD_FILE\"."
|
||||||
|
BUILD_PATH_FULL="$GITHUB_WORKSPACE/$BUILD_PATH"
|
||||||
|
CUSTOM_BUILD_PATH="$BUILD_PATH_FULL/$BUILD_FILE"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set the build method, must reference one of:
|
||||||
|
#
|
||||||
|
# - <NamespaceName.ClassName.MethodName>
|
||||||
|
# - <ClassName.MethodName>
|
||||||
|
#
|
||||||
|
# For example: `BuildCommand.PerformBuild`
|
||||||
|
#
|
||||||
|
# The method must be declared static and placed in project/Assets/Editor
|
||||||
|
#
|
||||||
|
|
||||||
|
if [ -z "$BUILD_METHOD" ]; then
|
||||||
|
# User has not provided their own build command.
|
||||||
|
#
|
||||||
|
# Use the script from this action which builds the scenes that are enabled in
|
||||||
|
# the project.
|
||||||
|
#
|
||||||
|
echo "Using built-in build method."
|
||||||
|
# Create Editor directory if it does not exist
|
||||||
|
mkdir -p "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||||
|
# Copy the build script of Unity Builder action
|
||||||
|
cp -R "$ACTION_FOLDER/default-build-script/Assets/Editor/" "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||||
|
# Set the Build method to that of UnityBuilder Action
|
||||||
|
BUILD_METHOD="UnityBuilderAction.Builder.BuildProject"
|
||||||
|
# Verify recursive paths
|
||||||
|
ls -Ralph "$UNITY_PROJECT_PATH/Assets/Editor/"
|
||||||
|
#
|
||||||
|
else
|
||||||
|
# User has provided their own build method.
|
||||||
|
# Assume they also bring their own script.
|
||||||
|
#
|
||||||
|
echo "Using build method \"$BUILD_METHOD\"."
|
||||||
|
#
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prepare Android keystore and SDK, if needed
|
||||||
|
#
|
||||||
|
|
||||||
|
if [[ "$BUILD_TARGET" == "Android" && -n "$ANDROID_KEYSTORE_NAME" && -n "$ANDROID_KEYSTORE_BASE64" ]]; then
|
||||||
|
echo "Creating Android keystore."
|
||||||
|
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$UNITY_PROJECT_PATH/$ANDROID_KEYSTORE_NAME"
|
||||||
|
echo "Created Android keystore."
|
||||||
|
else
|
||||||
|
echo "Not creating Android keystore."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$BUILD_TARGET" == "Android" && -n "$ANDROID_SDK_MANAGER_PARAMETERS" ]]; then
|
||||||
|
echo "Updating Android SDK with parameters: $ANDROID_SDK_MANAGER_PARAMETERS"
|
||||||
|
export JAVA_HOME="$(awk -F'=' '/JAVA_HOME=/{print $2}' /usr/bin/unity-editor.d/*)"
|
||||||
|
"$(awk -F'=' '/ANDROID_HOME=/{print $2}' /usr/bin/unity-editor.d/*)/tools/bin/sdkmanager" "$ANDROID_SDK_MANAGER_PARAMETERS"
|
||||||
|
echo "Updated Android SDK."
|
||||||
|
else
|
||||||
|
echo "Not updating Android SDK."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Pre-build debug information
|
||||||
|
#
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "###########################"
|
||||||
|
echo "# Custom parameters #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "$CUSTOM_PARAMETERS"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "###########################"
|
||||||
|
echo "# Current build dir #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echo "Creating \"$BUILD_PATH_FULL\" if it does not exist."
|
||||||
|
mkdir -p "$BUILD_PATH_FULL"
|
||||||
|
ls -alh "$BUILD_PATH_FULL"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "###########################"
|
||||||
|
echo "# Project directory #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
ls -alh "$UNITY_PROJECT_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build
|
||||||
|
#
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "###########################"
|
||||||
|
echo "# Building project #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
||||||
|
|
||||||
|
/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \
|
||||||
|
-quit \
|
||||||
|
-batchmode \
|
||||||
|
-nographics \
|
||||||
|
-username "$UNITY_EMAIL" \
|
||||||
|
-password "$UNITY_PASSWORD" \
|
||||||
|
-customBuildName "$BUILD_NAME" \
|
||||||
|
-projectPath "$UNITY_PROJECT_PATH" \
|
||||||
|
-buildTarget "$BUILD_TARGET" \
|
||||||
|
-customBuildTarget "$BUILD_TARGET" \
|
||||||
|
-customBuildPath "$CUSTOM_BUILD_PATH" \
|
||||||
|
-executeMethod "$BUILD_METHOD" \
|
||||||
|
-buildVersion "$VERSION" \
|
||||||
|
-androidVersionCode "$ANDROID_VERSION_CODE" \
|
||||||
|
-androidKeystoreName "$ANDROID_KEYSTORE_NAME" \
|
||||||
|
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
|
||||||
|
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
|
||||||
|
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
|
||||||
|
-androidTargetSdkVersion "$ANDROID_TARGET_SDK_VERSION" \
|
||||||
|
$CUSTOM_PARAMETERS \
|
||||||
|
> "$UNITY_PROJECT_PATH/out.log" 2>&1
|
||||||
|
|
||||||
|
# Catch exit code
|
||||||
|
BUILD_EXIT_CODE=$?
|
||||||
|
|
||||||
|
# Display logs
|
||||||
|
cat "$UNITY_PROJECT_PATH/out.log"
|
||||||
|
|
||||||
|
# Display results
|
||||||
|
if [ $BUILD_EXIT_CODE -eq 0 ]; then
|
||||||
|
echo "Build succeeded";
|
||||||
|
else
|
||||||
|
echo "Build failed, with exit code $BUILD_EXIT_CODE";
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Permissions
|
||||||
|
#
|
||||||
|
|
||||||
|
# Make a given user owner of all artifacts
|
||||||
|
if [[ -n "$CHOWN_FILES_TO" ]]; then
|
||||||
|
chown -R "$CHOWN_FILES_TO" "$BUILD_PATH_FULL"
|
||||||
|
chown -R "$CHOWN_FILES_TO" "$UNITY_PROJECT_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add read permissions for everyone to all artifacts
|
||||||
|
chmod -R a+r "$BUILD_PATH_FULL"
|
||||||
|
chmod -R a+r "$UNITY_PROJECT_PATH"
|
||||||
|
|
||||||
|
# Add execute permissions to specific files
|
||||||
|
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
||||||
|
OSX_EXECUTABLE_PATH="$BUILD_PATH_FULL/$BUILD_NAME.app/Contents/MacOS"
|
||||||
|
find "$OSX_EXECUTABLE_PATH" -type f -exec chmod +x {} \;
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# Results
|
||||||
|
#
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "###########################"
|
||||||
|
echo "# Build output #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
ls -alh "$BUILD_PATH_FULL"
|
||||||
18
dist/platforms/mac/steps/return_license.sh
vendored
Executable file
18
dist/platforms/mac/steps/return_license.sh
vendored
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Run in ACTIVATE_LICENSE_PATH directory
|
||||||
|
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
|
||||||
|
pushd "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
|
/Applications/Unity/Hub/Editor/$UNITY_VERSION/Unity.app/Contents/MacOS/Unity \
|
||||||
|
-logFile /dev/stdout \
|
||||||
|
-batchmode \
|
||||||
|
-nographics \
|
||||||
|
-quit \
|
||||||
|
-username "$UNITY_EMAIL" \
|
||||||
|
-password "$UNITY_PASSWORD" \
|
||||||
|
-returnlicense \
|
||||||
|
-projectPath "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
|
# Return to previous working directory
|
||||||
|
popd
|
||||||
@@ -1,13 +1,26 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create directory for license activation
|
||||||
|
#
|
||||||
|
|
||||||
|
ACTIVATE_LICENSE_PATH="$GITHUB_WORKSPACE/_activate-license~"
|
||||||
|
mkdir -p "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run steps
|
# Run steps
|
||||||
#
|
#
|
||||||
|
source /steps/set_gitcredential.sh
|
||||||
source /steps/activate.sh
|
source /steps/activate.sh
|
||||||
source /steps/build.sh
|
source /steps/build.sh
|
||||||
source /steps/return_license.sh
|
source /steps/return_license.sh
|
||||||
|
|
||||||
|
#
|
||||||
|
# Remove license activation directory
|
||||||
|
#
|
||||||
|
|
||||||
|
rm -r "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Instructions for debugging
|
# Instructions for debugging
|
||||||
#
|
#
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Run in ACTIVATE_LICENSE_PATH directory
|
||||||
|
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
|
||||||
|
pushd "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
|
if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
|
||||||
#
|
#
|
||||||
# PERSONAL LICENSE MODE
|
# PERSONAL LICENSE MODE
|
||||||
@@ -25,7 +29,6 @@ if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
|
|||||||
|
|
||||||
# Activate license
|
# Activate license
|
||||||
ACTIVATION_OUTPUT=$(unity-editor \
|
ACTIVATION_OUTPUT=$(unity-editor \
|
||||||
-nographics \
|
|
||||||
-logFile /dev/stdout \
|
-logFile /dev/stdout \
|
||||||
-quit \
|
-quit \
|
||||||
-manualLicenseFile $FILE_PATH)
|
-manualLicenseFile $FILE_PATH)
|
||||||
@@ -62,8 +65,6 @@ elif [[ -n "$UNITY_SERIAL" && -n "$UNITY_EMAIL" && -n "$UNITY_PASSWORD" ]]; then
|
|||||||
|
|
||||||
# Activate license
|
# Activate license
|
||||||
unity-editor \
|
unity-editor \
|
||||||
-batchmode \
|
|
||||||
-nographics \
|
|
||||||
-logFile /dev/stdout \
|
-logFile /dev/stdout \
|
||||||
-quit \
|
-quit \
|
||||||
-serial "$UNITY_SERIAL" \
|
-serial "$UNITY_SERIAL" \
|
||||||
@@ -81,7 +82,7 @@ else
|
|||||||
#
|
#
|
||||||
echo "License activation strategy could not be determined."
|
echo "License activation strategy could not be determined."
|
||||||
echo ""
|
echo ""
|
||||||
echo "Visit https://github.com/webbertakken/unity-builder#usage for more"
|
echo "Visit https://game.ci/docs/github/getting-started for more"
|
||||||
echo "details on how to set up one of the possible activation strategies."
|
echo "details on how to set up one of the possible activation strategies."
|
||||||
|
|
||||||
# Immediately exit as no UNITY_EXIT_CODE can be derrived.
|
# Immediately exit as no UNITY_EXIT_CODE can be derrived.
|
||||||
@@ -101,3 +102,6 @@ else
|
|||||||
echo "Exit code was: $UNITY_EXIT_CODE"
|
echo "Exit code was: $UNITY_EXIT_CODE"
|
||||||
exit $UNITY_EXIT_CODE
|
exit $UNITY_EXIT_CODE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Return to previous working directory
|
||||||
|
popd
|
||||||
@@ -63,26 +63,37 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create Android keystore, if needed
|
# Prepare Android keystore and SDK, if needed
|
||||||
#
|
#
|
||||||
if [[ -z $ANDROID_KEYSTORE_NAME || -z $ANDROID_KEYSTORE_BASE64 ]]; then
|
|
||||||
echo "Not creating Android keystore."
|
if [[ "$BUILD_TARGET" == "Android" && -n "$ANDROID_KEYSTORE_NAME" && -n "$ANDROID_KEYSTORE_BASE64" ]]; then
|
||||||
else
|
echo "Creating Android keystore."
|
||||||
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$UNITY_PROJECT_PATH/$ANDROID_KEYSTORE_NAME"
|
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$UNITY_PROJECT_PATH/$ANDROID_KEYSTORE_NAME"
|
||||||
echo "Created Android keystore."
|
echo "Created Android keystore."
|
||||||
|
else
|
||||||
|
echo "Not creating Android keystore."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$BUILD_TARGET" == "Android" && -n "$ANDROID_SDK_MANAGER_PARAMETERS" ]]; then
|
||||||
|
echo "Updating Android SDK with parameters: $ANDROID_SDK_MANAGER_PARAMETERS"
|
||||||
|
export JAVA_HOME="$(awk -F'=' '/JAVA_HOME=/{print $2}' /usr/bin/unity-editor.d/*)"
|
||||||
|
"$(awk -F'=' '/ANDROID_HOME=/{print $2}' /usr/bin/unity-editor.d/*)/tools/bin/sdkmanager" "$ANDROID_SDK_MANAGER_PARAMETERS"
|
||||||
|
echo "Updated Android SDK."
|
||||||
|
else
|
||||||
|
echo "Not updating Android SDK."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Display custom parameters
|
# Pre-build debug information
|
||||||
#
|
#
|
||||||
echo "Using custom parameters $CUSTOM_PARAMETERS."
|
|
||||||
|
|
||||||
# The build specification below may require Unity 2019.2.11f1 or later (not tested below).
|
echo ""
|
||||||
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
echo "###########################"
|
||||||
|
echo "# Custom parameters #"
|
||||||
|
echo "###########################"
|
||||||
|
echo ""
|
||||||
|
|
||||||
#
|
echo "$CUSTOM_PARAMETERS"
|
||||||
# Build info
|
|
||||||
#
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
@@ -100,16 +111,21 @@ echo "# Project directory #"
|
|||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
ls -alh $UNITY_PROJECT_PATH
|
ls -alh "$UNITY_PROJECT_PATH"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build
|
||||||
|
#
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo "# Building platform #"
|
echo "# Building project #"
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
|
||||||
|
|
||||||
unity-editor \
|
unity-editor \
|
||||||
-nographics \
|
|
||||||
-logfile /dev/stdout \
|
-logfile /dev/stdout \
|
||||||
-quit \
|
-quit \
|
||||||
-customBuildName "$BUILD_NAME" \
|
-customBuildName "$BUILD_NAME" \
|
||||||
@@ -124,6 +140,7 @@ unity-editor \
|
|||||||
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
|
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
|
||||||
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
|
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
|
||||||
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
|
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
|
||||||
|
-androidTargetSdkVersion "$ANDROID_TARGET_SDK_VERSION" \
|
||||||
$CUSTOM_PARAMETERS
|
$CUSTOM_PARAMETERS
|
||||||
|
|
||||||
# Catch exit code
|
# Catch exit code
|
||||||
@@ -136,17 +153,24 @@ else
|
|||||||
echo "Build failed, with exit code $BUILD_EXIT_CODE";
|
echo "Build failed, with exit code $BUILD_EXIT_CODE";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Add permissions to make app runnable
|
#
|
||||||
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
# Permissions
|
||||||
ADD_PERMISSIONS_PATH=$BUILD_PATH_FULL/StandaloneOSX.app/Contents/MacOS/*
|
#
|
||||||
echo "Making the following path executable: $ADD_PERMISSIONS_PATH"
|
|
||||||
chmod +x $ADD_PERMISSIONS_PATH
|
# Make a given user owner of all artifacts
|
||||||
|
if [[ -n "$CHOWN_FILES_TO" ]]; then
|
||||||
|
chown -R "$CHOWN_FILES_TO" "$BUILD_PATH_FULL"
|
||||||
|
chown -R "$CHOWN_FILES_TO" "$UNITY_PROJECT_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Add read permissions for everyone to all artifacts
|
||||||
|
chmod -R a+r "$BUILD_PATH_FULL"
|
||||||
|
chmod -R a+r "$UNITY_PROJECT_PATH"
|
||||||
|
|
||||||
if [[ -n "$CHOWN_FILES_TO" ]]; then
|
# Add execute permissions to specific files
|
||||||
chown -R $CHOWN_FILES_TO $BUILD_PATH_FULL
|
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
|
||||||
chown -R $CHOWN_FILES_TO $UNITY_PROJECT_PATH
|
OSX_EXECUTABLE_PATH="$BUILD_PATH_FULL/$BUILD_NAME.app/Contents/MacOS"
|
||||||
|
find "$OSX_EXECUTABLE_PATH" -type f -exec chmod +x {} \;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -155,7 +179,7 @@ fi
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo "# Build directory #"
|
echo "# Build output #"
|
||||||
echo "###########################"
|
echo "###########################"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Run in ACTIVATE_LICENSE_PATH directory
|
||||||
|
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
|
||||||
|
pushd "$ACTIVATE_LICENSE_PATH"
|
||||||
|
|
||||||
if [[ -n "$UNITY_SERIAL" ]]; then
|
if [[ -n "$UNITY_SERIAL" ]]; then
|
||||||
#
|
#
|
||||||
# PROFESSIONAL (SERIAL) LICENSE MODE
|
# PROFESSIONAL (SERIAL) LICENSE MODE
|
||||||
@@ -7,8 +11,10 @@ if [[ -n "$UNITY_SERIAL" ]]; then
|
|||||||
# This will return the license that is currently in use.
|
# This will return the license that is currently in use.
|
||||||
#
|
#
|
||||||
unity-editor \
|
unity-editor \
|
||||||
-nographics \
|
|
||||||
-logFile /dev/stdout \
|
-logFile /dev/stdout \
|
||||||
-quit \
|
-quit \
|
||||||
-returnlicense
|
-returnlicense
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Return to previous working directory
|
||||||
|
popd
|
||||||
24
dist/platforms/ubuntu/steps/set_gitcredential.sh
vendored
Executable file
24
dist/platforms/ubuntu/steps/set_gitcredential.sh
vendored
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -z "${GIT_PRIVATE_TOKEN}" ]
|
||||||
|
then
|
||||||
|
echo "GIT_PRIVATE_TOKEN unset skipping"
|
||||||
|
else
|
||||||
|
echo "GIT_PRIVATE_TOKEN is set configuring git credentials"
|
||||||
|
|
||||||
|
git config --global credential.helper store
|
||||||
|
git config --global --replace-all url."https://token:$GIT_PRIVATE_TOKEN@github.com/".insteadOf ssh://git@github.com/
|
||||||
|
git config --global --add url."https://token:$GIT_PRIVATE_TOKEN@github.com/".insteadOf git@github.com
|
||||||
|
|
||||||
|
git config --global --add url."https://token:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "https://github.com/"
|
||||||
|
git config --global url."https://ssh:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "ssh://git@github.com/"
|
||||||
|
git config --global url."https://git:$GIT_PRIVATE_TOKEN@github.com/".insteadOf "git@github.com:"
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "---------- git config --list -------------"
|
||||||
|
git config --list
|
||||||
|
|
||||||
|
echo "---------- git config --list --show-origin -------------"
|
||||||
|
git config --list --show-origin
|
||||||
|
|
||||||
7
dist/platforms/windows/activate.ps1
vendored
Normal file
7
dist/platforms/windows/activate.ps1
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Activates Unity
|
||||||
|
& "C:\Program Files\Unity\Hub\Editor\$Env:UNITY_VERSION\Editor\Unity.exe" -batchmode -quit -nographics `
|
||||||
|
-username $Env:UNITY_EMAIL `
|
||||||
|
-password $Env:UNITY_PASSWORD `
|
||||||
|
-serial $Env:UNITY_SERIAL `
|
||||||
|
-projectPath "c:/BlankProject" `
|
||||||
|
-logfile | Out-Host
|
||||||
153
dist/platforms/windows/build.ps1
vendored
Normal file
153
dist/platforms/windows/build.ps1
vendored
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
#
|
||||||
|
# Set project path
|
||||||
|
#
|
||||||
|
$Env:UNITY_PROJECT_PATH="$Env:GITHUB_WORKSPACE\$Env:PROJECT_PATH"
|
||||||
|
Write-Output "$('Using project path "')$($Env:UNITY_PROJECT_PATH)$('".')"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display the name for the build, doubles as the output name
|
||||||
|
#
|
||||||
|
|
||||||
|
Write-Output "$('Using build name "')$($Env:BUILD_NAME)$('".')"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display the build's target platform;
|
||||||
|
#
|
||||||
|
|
||||||
|
Write-Output "$('Using build target "')$($Env:BUILD_TARGET)$('".')"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Display build path and file
|
||||||
|
#
|
||||||
|
|
||||||
|
Write-Output "$('Using build path "')$($Env:BUILD_PATH)$('" to save file "')$($Env:BUILD_FILE)$('".')"
|
||||||
|
$Env:BUILD_PATH_FULL="$Env:GITHUB_WORKSPACE\$Env:BUILD_PATH"
|
||||||
|
$Env:CUSTOM_BUILD_PATH="$Env:BUILD_PATH_FULL\$Env:BUILD_FILE"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set the build method, must reference one of:
|
||||||
|
#
|
||||||
|
# - <NamespaceName.ClassName.MethodName>
|
||||||
|
# - <ClassName.MethodName>
|
||||||
|
#
|
||||||
|
# For example: `BuildCommand.PerformBuild`
|
||||||
|
#
|
||||||
|
# The method must be declared static and placed in project/Assets/Editor
|
||||||
|
#
|
||||||
|
if ($Env:BUILD_METHOD)
|
||||||
|
{
|
||||||
|
# User has provided their own build method.
|
||||||
|
# Assume they also bring their own script.
|
||||||
|
Write-Output "$('Using build method "')$($Env:BUILD_METHOD)$('".')"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# User has not provided their own build command.
|
||||||
|
#
|
||||||
|
# Use the script from this action which builds the scenes that are enabled in
|
||||||
|
# the project.
|
||||||
|
#
|
||||||
|
Write-Output "Using built-in build method."
|
||||||
|
|
||||||
|
# Create Editor directory if it does not exist
|
||||||
|
if(-Not (Test-Path -Path $Env:UNITY_PROJECT_PATH\Assets\Editor))
|
||||||
|
{
|
||||||
|
# We use -Force to suppress output, doesn't overwrite anything
|
||||||
|
New-Item -ItemType Directory -Force -Path $Env:UNITY_PROJECT_PATH\Assets\Editor
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy the build script of Unity Builder action
|
||||||
|
Copy-Item -Path "c:\UnityBuilderAction" -Destination $Env:UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
||||||
|
|
||||||
|
# Set the Build method to that of UnityBuilder Action
|
||||||
|
$Env:BUILD_METHOD="UnityBuilderAction.Builder.BuildProject"
|
||||||
|
|
||||||
|
# Verify recursive paths
|
||||||
|
Get-ChildItem -Path $Env:UNITY_PROJECT_PATH\Assets\Editor -Recurse
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Pre-build debug information
|
||||||
|
#
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output "# Custom parameters #"
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
Write-Output "$('"')$($Env:CUSTOM_PARAMETERS)$('"')"
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output "# Current build dir #"
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
Write-Output "$('Creating "')$($Env:BUILD_PATH_FULL)$('" if it does not exist.')"
|
||||||
|
if (-Not (Test-Path -Path $Env:BUILD_PATH_FULL))
|
||||||
|
{
|
||||||
|
mkdir "$Env:BUILD_PATH_FULL"
|
||||||
|
}
|
||||||
|
Get-ChildItem $Env:BUILD_PATH_FULL
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output "# Project directory #"
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
Get-ChildItem $Env:UNITY_PROJECT_PATH
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build
|
||||||
|
#
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output "# Building project #"
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
& "C:\Program Files\Unity\Hub\Editor\$Env:UNITY_VERSION\Editor\Unity.exe" -quit -batchmode -nographics `
|
||||||
|
-projectPath $Env:UNITY_PROJECT_PATH `
|
||||||
|
-executeMethod $Env:BUILD_METHOD `
|
||||||
|
-buildTarget $Env:BUILD_TARGET `
|
||||||
|
-customBuildTarget $Env:BUILD_TARGET `
|
||||||
|
-customBuildPath $Env:CUSTOM_BUILD_PATH `
|
||||||
|
-buildVersion $Env:VERSION `
|
||||||
|
-androidVersionCode $Env:ANDROID_VERSION_CODE `
|
||||||
|
-androidKeystoreName $Env:ANDROID_KEYSTORE_NAME `
|
||||||
|
-androidKeystorePass $Env:ANDROID_KEYSTORE_PASS `
|
||||||
|
-androidKeyaliasName $Env:ANDROID_KEYALIAS_NAME `
|
||||||
|
-androidKeyaliasPass $Env:ANDROID_KEYALIAS_PASS `
|
||||||
|
-androidTargetSdkVersion $Env:ANDROID_TARGET_SDK_VERSION `
|
||||||
|
$Env:CUSTOM_PARAMETERS `
|
||||||
|
-logfile | Out-Host
|
||||||
|
|
||||||
|
# Catch exit code
|
||||||
|
$Env:BUILD_EXIT_CODE=$?
|
||||||
|
|
||||||
|
# Display results
|
||||||
|
if ($Env:BUILD_EXIT_CODE -eq 0)
|
||||||
|
{
|
||||||
|
Write-Output "Build Succeeded!"
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
Write-Output "$('Build failed, with exit code ')$($Env:BUILD_EXIT_CODE)$('"')"
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO: Determine if we need to set permissions on any files
|
||||||
|
|
||||||
|
#
|
||||||
|
# Results
|
||||||
|
#
|
||||||
|
|
||||||
|
Write-Output ""
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output "# Build output #"
|
||||||
|
Write-Output "###########################"
|
||||||
|
Write-Output ""
|
||||||
|
|
||||||
|
Get-ChildItem $Env:BUILD_PATH_FULL
|
||||||
|
Write-Output ""
|
||||||
15
dist/platforms/windows/entrypoint.ps1
vendored
Normal file
15
dist/platforms/windows/entrypoint.ps1
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# Activate Unity
|
||||||
|
& "c:\steps\activate.ps1"
|
||||||
|
|
||||||
|
# Import any necessary registry keys, ie: location of windows 10 sdk
|
||||||
|
# No guarantee that there will be any necessary registry keys, ie: tvOS
|
||||||
|
Get-ChildItem -Path c:\regkeys -File | Foreach {reg import $_.fullname}
|
||||||
|
|
||||||
|
# Register the Visual Studio installation so Unity can find it
|
||||||
|
regsvr32 C:\ProgramData\Microsoft\VisualStudio\Setup\x64\Microsoft.VisualStudio.Setup.Configuration.Native.dll
|
||||||
|
|
||||||
|
# Build the project
|
||||||
|
& "c:\steps\build.ps1"
|
||||||
|
|
||||||
|
# Free the seat for the activated license
|
||||||
|
& "c:\steps\return_license.ps1"
|
||||||
7
dist/platforms/windows/return_license.ps1
vendored
Normal file
7
dist/platforms/windows/return_license.ps1
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# Return the active Unity license
|
||||||
|
& "C:\Program Files\Unity\Hub\Editor\$Env:UNITY_VERSION\Editor\Unity.exe" -batchmode -quit -nographics `
|
||||||
|
-username $Env:UNITY_EMAIL `
|
||||||
|
-password $Env:UNITY_PASSWORD `
|
||||||
|
-returnlicense `
|
||||||
|
-projectPath "c:/BlankProject" `
|
||||||
|
-logfile | Out-Host
|
||||||
3911
dist/sourcemap-register.js
generated
vendored
3911
dist/sourcemap-register.js
generated
vendored
File diff suppressed because one or more lines are too long
60
dist/xhr-sync-worker.js
vendored
Normal file
60
dist/xhr-sync-worker.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
"use strict";
|
||||||
|
/* eslint-disable no-process-exit */
|
||||||
|
const util = require("util");
|
||||||
|
const { JSDOM } = require("../../../..");
|
||||||
|
const { READY_STATES } = require("./xhr-utils");
|
||||||
|
const idlUtils = require("../generated/utils");
|
||||||
|
const tough = require("tough-cookie");
|
||||||
|
|
||||||
|
const dom = new JSDOM();
|
||||||
|
const xhr = new dom.window.XMLHttpRequest();
|
||||||
|
const xhrImpl = idlUtils.implForWrapper(xhr);
|
||||||
|
|
||||||
|
const chunks = [];
|
||||||
|
|
||||||
|
process.stdin.on("data", chunk => {
|
||||||
|
chunks.push(chunk);
|
||||||
|
});
|
||||||
|
|
||||||
|
process.stdin.on("end", () => {
|
||||||
|
const buffer = Buffer.concat(chunks);
|
||||||
|
|
||||||
|
const flag = JSON.parse(buffer.toString());
|
||||||
|
if (flag.body && flag.body.type === "Buffer" && flag.body.data) {
|
||||||
|
flag.body = Buffer.from(flag.body.data);
|
||||||
|
}
|
||||||
|
if (flag.cookieJar) {
|
||||||
|
flag.cookieJar = tough.CookieJar.fromJSON(flag.cookieJar);
|
||||||
|
}
|
||||||
|
|
||||||
|
flag.synchronous = false;
|
||||||
|
Object.assign(xhrImpl.flag, flag);
|
||||||
|
const { properties } = xhrImpl;
|
||||||
|
xhrImpl.readyState = READY_STATES.OPENED;
|
||||||
|
try {
|
||||||
|
xhr.addEventListener("loadend", () => {
|
||||||
|
if (properties.error) {
|
||||||
|
properties.error = properties.error.stack || util.inspect(properties.error);
|
||||||
|
}
|
||||||
|
process.stdout.write(JSON.stringify({
|
||||||
|
responseURL: xhrImpl.responseURL,
|
||||||
|
status: xhrImpl.status,
|
||||||
|
statusText: xhrImpl.statusText,
|
||||||
|
properties
|
||||||
|
}), () => {
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
}, false);
|
||||||
|
xhr.send(flag.body);
|
||||||
|
} catch (error) {
|
||||||
|
properties.error += error.stack || util.inspect(error);
|
||||||
|
process.stdout.write(JSON.stringify({
|
||||||
|
responseURL: xhrImpl.responseURL,
|
||||||
|
status: xhrImpl.status,
|
||||||
|
statusText: xhrImpl.statusText,
|
||||||
|
properties
|
||||||
|
}), () => {
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -1,11 +1,30 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
// Automatically clear mock calls and instances between every test
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
|
|
||||||
|
// An array of file extensions your modules use
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
|
|
||||||
|
// The test environment that will be used for testing
|
||||||
testEnvironment: 'node',
|
testEnvironment: 'node',
|
||||||
|
|
||||||
|
// The glob patterns Jest uses to detect test files
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
|
|
||||||
|
// This option allows use of a custom test runner
|
||||||
testRunner: 'jest-circus/runner',
|
testRunner: 'jest-circus/runner',
|
||||||
|
|
||||||
|
// A map with regular expressions for transformers to paths
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest',
|
'^.+\\.ts$': 'ts-jest',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Indicates whether each individual test should be reported during the run
|
||||||
verbose: true,
|
verbose: true,
|
||||||
|
|
||||||
|
// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
|
||||||
|
modulePathIgnorePatterns: ['<rootDir>/lib/', '<rootDir>/dist/'],
|
||||||
|
|
||||||
|
// A list of paths to modules that run some code to configure or set up the testing framework before each test
|
||||||
|
setupFilesAfterEnv: ['<rootDir>/src/jest.setup.ts'],
|
||||||
};
|
};
|
||||||
|
|||||||
31
lefthook.yml
Normal file
31
lefthook.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# EXAMPLE USAGE
|
||||||
|
# Refer for explanation to following link:
|
||||||
|
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md
|
||||||
|
#
|
||||||
|
|
||||||
|
color: true
|
||||||
|
extends: {}
|
||||||
|
|
||||||
|
pre-commit:
|
||||||
|
parallel: true
|
||||||
|
commands:
|
||||||
|
format documents:
|
||||||
|
glob: '*.{md,mdx}'
|
||||||
|
run: yarn prettier --write {staged_files}
|
||||||
|
format configs:
|
||||||
|
glob: '*.{json,yml,yaml}'
|
||||||
|
run: yarn prettier --write {staged_files}
|
||||||
|
format code:
|
||||||
|
glob: '*.{js,jsx,ts,tsx}'
|
||||||
|
exclude: 'dist/'
|
||||||
|
run: yarn prettier --write {staged_files} && yarn eslint {staged_files} && git add {staged_files}
|
||||||
|
run tests:
|
||||||
|
glob: '*.{js,jsx,ts,tsx}'
|
||||||
|
exclude: 'dist/'
|
||||||
|
run: yarn jest --passWithNoTests --findRelatedTests {staged_files}
|
||||||
|
build distributables:
|
||||||
|
skip: ['merge', 'rebase']
|
||||||
|
run: yarn build && git add dist
|
||||||
|
make shell script executable:
|
||||||
|
glob: '*.sh'
|
||||||
|
run: git update-index --chmod=+x
|
||||||
94
package.json
94
package.json
@@ -7,61 +7,63 @@
|
|||||||
"author": "Webber <webber@takken.io>",
|
"author": "Webber <webber@takken.io>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prebuild": "yarn",
|
"prepare": "lefthook install && npx husky uninstall -y",
|
||||||
"build": "tsc && ncc build lib --source-map --license licenses.txt",
|
"build": "yarn && tsc && ncc build lib --source-map --license licenses.txt",
|
||||||
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
|
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
|
||||||
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
"format": "prettier --write \"src/**/*.{js,ts}\"",
|
||||||
"test": "jest"
|
"cli": "yarn ts-node src/index.ts -m cli",
|
||||||
|
"gcp-secrets-tests": "cross-env cloudRunnerCluster=aws cloudRunnerTests=true readInputOverrideCommand=\"gcloud secrets versions access 1 --secret=\"{0}\"\" populateOverride=true readInputFromOverrideList=UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD yarn test -i -t \"cloud runner\"",
|
||||||
|
"gcp-secrets-cli": "cross-env cloudRunnerTests=true readInputOverrideCommand=\"gcloud secrets versions access 1 --secret=\"{0}\"\" yarn ts-node src/index.ts -m cli --populateOverride true --readInputFromOverrideList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD",
|
||||||
|
"aws-secrets-cli": "cross-env cloudRunnerTests=true readInputOverrideCommand=\"aws secretsmanager get-secret-value --secret-id {0}\" yarn ts-node src/index.ts -m cli --populateOverride true --readInputFromOverrideList UNITY_EMAIL,UNITY_SERIAL,UNITY_PASSWORD",
|
||||||
|
"cli-aws": "cross-env cloudRunnerCluster=aws yarn run test-cli",
|
||||||
|
"cli-k8s": "cross-env cloudRunnerCluster=k8s yarn run test-cli",
|
||||||
|
"test-cli": "cross-env cloudRunnerTests=true yarn ts-node src/index.ts -m cli --projectPath test-project",
|
||||||
|
"test": "jest",
|
||||||
|
"test-i": "yarn run test-i-aws && yarn run test-i-k8s",
|
||||||
|
"test-i-f": "yarn run test-i-aws && yarn run test-i-k8s && yarn run cli-k8s && yarn run cli-aws",
|
||||||
|
"test-i-aws": "cross-env cloudRunnerTests=true cloudRunnerCluster=aws yarn test -i -t \"cloud runner\"",
|
||||||
|
"test-i-k8s": "cross-env cloudRunnerTests=true cloudRunnerCluster=k8s yarn test -i -t \"cloud runner\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.2.6",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.0.4",
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/github": "^2.2.0",
|
"@actions/github": "^5.0.0",
|
||||||
"aws-sdk": "^2.812.0",
|
"@kubernetes/client-node": "^0.16.3",
|
||||||
|
"@octokit/core": "^3.5.1",
|
||||||
|
"async-wait-until": "^2.0.12",
|
||||||
|
"aws-sdk": "^2.1081.0",
|
||||||
"base-64": "^1.0.0",
|
"base-64": "^1.0.0",
|
||||||
|
"commander": "^9.0.0",
|
||||||
|
"commander-ts": "^0.2.0",
|
||||||
"kubernetes-client": "^9.0.0",
|
"kubernetes-client": "^9.0.0",
|
||||||
"nanoid": "3.1.20",
|
"nanoid": "^3.3.1",
|
||||||
"semver": "^7.3.2"
|
"reflect-metadata": "^0.1.13",
|
||||||
|
"semver": "^7.3.5",
|
||||||
|
"unity-changeset": "^1.6.0",
|
||||||
|
"uuid": "^8.3.2",
|
||||||
|
"yaml": "^1.10.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.15",
|
"@arkweid/lefthook": "^0.7.7",
|
||||||
"@types/node": "^14.14.9",
|
"@types/jest": "^27.4.1",
|
||||||
"@types/semver": "^7.3.4",
|
"@types/node": "^17.0.23",
|
||||||
"@typescript-eslint/parser": "^4.8.1",
|
"@types/semver": "^7.3.9",
|
||||||
"@vercel/ncc": "^0.25.1",
|
"@typescript-eslint/parser": "4.8.1",
|
||||||
"eslint": "^7.17.0",
|
"@vercel/ncc": "^0.33.3",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"cross-env": "^7.0.3",
|
||||||
|
"eslint": "7.17.0",
|
||||||
|
"eslint-config-prettier": "8.1.0",
|
||||||
"eslint-plugin-github": "^4.1.1",
|
"eslint-plugin-github": "^4.1.1",
|
||||||
"eslint-plugin-jest": "^24.1.3",
|
"eslint-plugin-jest": "24.1.3",
|
||||||
"eslint-plugin-prettier": "^3.3.1",
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
"eslint-plugin-unicorn": "^28.0.2",
|
"eslint-plugin-unicorn": "28.0.2",
|
||||||
"husky": "4.2.5",
|
"jest": "^27.5.1",
|
||||||
"jest": "^26.6.3",
|
"jest-circus": "^27.5.1",
|
||||||
"jest-circus": "^26.6.3",
|
"jest-fail-on-console": "^2.3.0",
|
||||||
"js-yaml": "^3.14.0",
|
"js-yaml": "^4.1.0",
|
||||||
"lint-staged": "^10.5.4",
|
"prettier": "^2.5.1",
|
||||||
"prettier": "^2.2.1",
|
"ts-jest": "^27.1.3",
|
||||||
"ts-jest": "^26.4.4",
|
"ts-node": "10.4.0",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "4.1.3"
|
||||||
},
|
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "lint-staged && yarn build && git add dist/index.*"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
|
||||||
"*.{js,jsx,ts,tsx}": [
|
|
||||||
"prettier --write",
|
|
||||||
"eslint",
|
|
||||||
"git add",
|
|
||||||
"jest --findRelatedTests"
|
|
||||||
],
|
|
||||||
"*.{json,md,yaml,yml}": [
|
|
||||||
"prettier --write",
|
|
||||||
"git add"
|
|
||||||
],
|
|
||||||
"*.sh": [
|
|
||||||
"git update-index --chmod=+x"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
5
scripts/cleanupGCPResources.sh
Executable file
5
scripts/cleanupGCPResources.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
kubectl delete job $(kubectl get jobs -o custom-columns=:.metadata.name)
|
||||||
|
kubectl delete cronjob $(kubectl get cronjobs -o custom-columns=:.metadata.name)
|
||||||
|
kubectl delete pod $(kubectl get pods -o custom-columns=:.metadata.name)
|
||||||
|
kubectl delete pvc $(kubectl get pvc -o custom-columns=:.metadata.name)
|
||||||
|
kubectl delete secret $(kubectl get secrets -o custom-columns=:.metadata.name)
|
||||||
48
src/index.ts
48
src/index.ts
@@ -1,41 +1,39 @@
|
|||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import { Action, BuildParameters, Cache, Docker, ImageTag, Kubernetes, Output, AWS } from './model';
|
import { Action, BuildParameters, Cache, CloudRunner, Docker, ImageTag, Output } from './model';
|
||||||
|
import { Cli } from './model/cli/cli';
|
||||||
async function run() {
|
import MacBuilder from './model/mac-builder';
|
||||||
|
import PlatformSetup from './model/platform-setup';
|
||||||
|
async function runMain() {
|
||||||
try {
|
try {
|
||||||
|
if (Cli.InitCliMode()) {
|
||||||
|
await Cli.RunCli();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
Action.checkCompatibility();
|
Action.checkCompatibility();
|
||||||
Cache.verify();
|
Cache.verify();
|
||||||
|
|
||||||
const { dockerfile, workspace, actionFolder } = Action;
|
const { workspace, actionFolder } = Action;
|
||||||
|
|
||||||
const buildParameters = await BuildParameters.create();
|
const buildParameters = await BuildParameters.create();
|
||||||
const baseImage = new ImageTag(buildParameters);
|
const baseImage = new ImageTag(buildParameters);
|
||||||
let builtImage;
|
|
||||||
|
|
||||||
switch (buildParameters.remoteBuildCluster) {
|
if (buildParameters.cloudRunnerCluster !== 'local') {
|
||||||
case 'k8s':
|
await CloudRunner.run(buildParameters, baseImage.toString());
|
||||||
core.info('Building with Kubernetes');
|
} else {
|
||||||
await Kubernetes.runBuildJob(buildParameters, baseImage);
|
core.info('Building locally');
|
||||||
break;
|
await PlatformSetup.setup(buildParameters, actionFolder);
|
||||||
|
if (process.platform === 'darwin') {
|
||||||
case 'aws':
|
MacBuilder.run(actionFolder, workspace, buildParameters);
|
||||||
core.info('Building with AWS');
|
} else {
|
||||||
await AWS.runBuildJob(buildParameters, baseImage);
|
await Docker.run(baseImage, { workspace, actionFolder, ...buildParameters });
|
||||||
break;
|
}
|
||||||
|
|
||||||
// default and local case
|
|
||||||
default:
|
|
||||||
core.info('Building locally');
|
|
||||||
builtImage = await Docker.build({ path: actionFolder, dockerfile, baseImage });
|
|
||||||
await Docker.run(builtImage, { workspace, ...buildParameters });
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set output
|
// Set output
|
||||||
await Output.setBuildVersion(buildParameters.buildVersion);
|
await Output.setBuildVersion(buildParameters.buildVersion);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed((error as Error).message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
runMain();
|
||||||
run();
|
|
||||||
|
|||||||
9
src/integrity.test.ts
Normal file
9
src/integrity.test.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { stat } from 'fs/promises';
|
||||||
|
|
||||||
|
describe('Integrity tests', () => {
|
||||||
|
describe('package-lock.json', () => {
|
||||||
|
it('does not exist', async () => {
|
||||||
|
await expect(stat(`${process.cwd()}/package-lock.json`)).rejects.toThrowError();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
9
src/jest.setup.ts
Normal file
9
src/jest.setup.ts
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import failOnConsole from 'jest-fail-on-console';
|
||||||
|
|
||||||
|
// Fail when console logs something inside a test - use spyOn instead
|
||||||
|
failOnConsole({
|
||||||
|
shouldFailOnWarn: true,
|
||||||
|
shouldFailOnError: true,
|
||||||
|
shouldFailOnLog: true,
|
||||||
|
shouldFailOnAssert: true,
|
||||||
|
});
|
||||||
112
src/model/__data__/versions.ts
Normal file
112
src/model/__data__/versions.ts
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
export const completelyValidSemanticVersions = [
|
||||||
|
'0.0.4',
|
||||||
|
'1.2.3',
|
||||||
|
'10.20.30',
|
||||||
|
'1.1.2-prerelease+meta',
|
||||||
|
'1.1.2+meta',
|
||||||
|
'1.1.2+meta-valid',
|
||||||
|
'1.0.0-alpha',
|
||||||
|
'1.0.0-beta',
|
||||||
|
'1.0.0-alpha.beta',
|
||||||
|
'1.0.0-alpha.beta.1',
|
||||||
|
'1.0.0-alpha.1',
|
||||||
|
'1.0.0-alpha0.valid',
|
||||||
|
'1.0.0-alpha.0valid',
|
||||||
|
'1.0.0-alpha-a.b-c-somethinglong+build.1-aef.1-its-okay',
|
||||||
|
'1.0.0-rc.1+build.1',
|
||||||
|
'2.0.0-rc.1+build.123',
|
||||||
|
'1.2.3-beta',
|
||||||
|
'10.2.3-DEV-SNAPSHOT',
|
||||||
|
'1.2.3-SNAPSHOT-123',
|
||||||
|
'1.0.0',
|
||||||
|
'2.0.0',
|
||||||
|
'1.1.7',
|
||||||
|
'2.0.0+build.1848',
|
||||||
|
'2.0.1-alpha.1227',
|
||||||
|
'1.0.0-alpha+beta',
|
||||||
|
'1.2.3----RC-SNAPSHOT.12.9.1--.12+788',
|
||||||
|
'1.2.3----R-S.12.9.1--.12+meta',
|
||||||
|
'1.2.3----RC-SNAPSHOT.12.9.1--.12',
|
||||||
|
'1.0.0+0.build.1-rc.10000aaa-kk-0.1',
|
||||||
|
'99999999999999999999999.999999999999999999.99999999999999999',
|
||||||
|
'1.0.0-0A.is.legal',
|
||||||
|
];
|
||||||
|
|
||||||
|
export const notCompletelyValidSemanticVersions = [
|
||||||
|
'1',
|
||||||
|
'1.2',
|
||||||
|
'1.2.3-0123',
|
||||||
|
'1.2.3-0123.0123',
|
||||||
|
'1.1.2+.123',
|
||||||
|
'+invalid',
|
||||||
|
'-invalid',
|
||||||
|
'-invalid+invalid',
|
||||||
|
'-invalid.01',
|
||||||
|
'alpha',
|
||||||
|
'alpha.beta',
|
||||||
|
'alpha.beta.1',
|
||||||
|
'alpha.1',
|
||||||
|
'alpha+beta',
|
||||||
|
'alpha_beta',
|
||||||
|
'alpha.',
|
||||||
|
'alpha..',
|
||||||
|
'beta',
|
||||||
|
'1.0.0-alpha_beta',
|
||||||
|
'-alpha.',
|
||||||
|
'1.0.0-alpha..',
|
||||||
|
'1.0.0-alpha..1',
|
||||||
|
'1.0.0-alpha...1',
|
||||||
|
'1.0.0-alpha....1',
|
||||||
|
'1.0.0-alpha.....1',
|
||||||
|
'1.0.0-alpha......1',
|
||||||
|
'1.0.0-alpha.......1',
|
||||||
|
'01.1.1',
|
||||||
|
'1.01.1',
|
||||||
|
'1.1.01',
|
||||||
|
'1.2',
|
||||||
|
'1.2.3.DEV',
|
||||||
|
'1.2-SNAPSHOT',
|
||||||
|
'1.2.31.2.3----RC-SNAPSHOT.12.09.1--..12+788',
|
||||||
|
'1.2-RC-SNAPSHOT',
|
||||||
|
'-1.0.3-gamma+b7718',
|
||||||
|
'+justmeta',
|
||||||
|
'9.8.7+meta+meta',
|
||||||
|
'9.8.7-whatever+meta+meta',
|
||||||
|
'99999999999999999999999.999999999999999999.99999999999999999----RC-SNAPSHOT.12.09.1--------------------------------..12',
|
||||||
|
];
|
||||||
|
|
||||||
|
const addVariantsPrependingV = (array: string[]) => array.map((tag) => [tag, `v${tag}`]).flat();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Array of versions that will be detected as version tags. Not all of these are
|
||||||
|
* "semantic versions", but can be used to generate one. Especially using the
|
||||||
|
* `versioning: Semantic` option.
|
||||||
|
*/
|
||||||
|
export const validVersionTagInputs = addVariantsPrependingV([
|
||||||
|
'0',
|
||||||
|
'1',
|
||||||
|
'0.1',
|
||||||
|
'1.0',
|
||||||
|
'1.1.0',
|
||||||
|
'1.2.3',
|
||||||
|
...completelyValidSemanticVersions,
|
||||||
|
]);
|
||||||
|
|
||||||
|
export const invalidVersionTagInputs = addVariantsPrependingV([
|
||||||
|
'+invalid',
|
||||||
|
'-invalid',
|
||||||
|
'-invalid+invalid',
|
||||||
|
'-invalid.01',
|
||||||
|
'alpha',
|
||||||
|
'alpha.beta',
|
||||||
|
'alpha.beta.1',
|
||||||
|
'alpha.1',
|
||||||
|
'alpha+beta',
|
||||||
|
'alpha_beta',
|
||||||
|
'alpha.',
|
||||||
|
'alpha..',
|
||||||
|
'beta',
|
||||||
|
'-alpha.',
|
||||||
|
'-1.0.3-gamma+b7718',
|
||||||
|
'+justmeta',
|
||||||
|
]);
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
import Platform from '../platform';
|
import Platform from '../platform';
|
||||||
|
|
||||||
export const mockGetFromUser = jest.fn().mockResolvedValue({
|
export const mockGetFromUser = jest.fn().mockResolvedValue({
|
||||||
version: '',
|
editorVersion: '',
|
||||||
targetPlatform: Platform.types.Test,
|
targetPlatform: Platform.types.Test,
|
||||||
projectPath: '.',
|
projectPath: '.',
|
||||||
buildName: Platform.types.Test,
|
buildName: Platform.types.Test,
|
||||||
@@ -10,7 +10,9 @@ export const mockGetFromUser = jest.fn().mockResolvedValue({
|
|||||||
buildMethod: undefined,
|
buildMethod: undefined,
|
||||||
buildVersion: '1.3.37',
|
buildVersion: '1.3.37',
|
||||||
customParameters: '',
|
customParameters: '',
|
||||||
|
sshAgent: '',
|
||||||
chownFilesTo: '',
|
chownFilesTo: '',
|
||||||
|
gitPrivateToken: '',
|
||||||
});
|
});
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable unicorn/prevent-abbreviations */
|
/* eslint unicorn/prevent-abbreviations: "off" */
|
||||||
|
|
||||||
// Import these named export into your test file:
|
// Import these named export into your test file:
|
||||||
export const mockProjectPath = jest.fn().mockResolvedValue('mockProjectPath');
|
export const mockProjectPath = jest.fn().mockResolvedValue('mockProjectPath');
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`Versioning determineVersion throws for invalid strategy somethingRandom 1`] = `"Versioning strategy should be one of None, Semantic, Tag, Custom."`;
|
exports[`Versioning determineBuildVersion throws for invalid strategy somethingRandom 1`] = `"Versioning strategy should be one of None, Semantic, Tag, Custom."`;
|
||||||
|
|||||||
@@ -4,11 +4,15 @@ import Action from './action';
|
|||||||
|
|
||||||
describe('Action', () => {
|
describe('Action', () => {
|
||||||
describe('compatibility check', () => {
|
describe('compatibility check', () => {
|
||||||
it('throws for anything other than linux', () => {
|
it('throws for anything other than linux, windows, or mac', () => {
|
||||||
if (process.platform !== 'linux') {
|
switch (process.platform) {
|
||||||
expect(() => Action.checkCompatibility()).toThrow();
|
case 'linux':
|
||||||
} else {
|
case 'win32':
|
||||||
expect(() => Action.checkCompatibility()).not.toThrow();
|
case 'darwin':
|
||||||
|
expect(() => Action.checkCompatibility()).not.toThrow();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
expect(() => Action.checkCompatibility()).toThrow();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -26,11 +30,4 @@ describe('Action', () => {
|
|||||||
expect(path.basename(actionFolder)).toStrictEqual('dist');
|
expect(path.basename(actionFolder)).toStrictEqual('dist');
|
||||||
expect(fs.existsSync(actionFolder)).toStrictEqual(true);
|
expect(fs.existsSync(actionFolder)).toStrictEqual(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the docker file', () => {
|
|
||||||
const { dockerfile } = Action;
|
|
||||||
|
|
||||||
expect(path.basename(dockerfile)).toStrictEqual('Dockerfile');
|
|
||||||
expect(fs.existsSync(dockerfile)).toStrictEqual(true);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import path from 'path';
|
|||||||
|
|
||||||
class Action {
|
class Action {
|
||||||
static get supportedPlatforms() {
|
static get supportedPlatforms() {
|
||||||
return ['linux'];
|
return ['linux', 'win32', 'darwin'];
|
||||||
}
|
}
|
||||||
|
|
||||||
static get isRunningLocally() {
|
static get isRunningLocally() {
|
||||||
@@ -29,10 +29,6 @@ class Action {
|
|||||||
return `${Action.rootFolder}/dist`;
|
return `${Action.rootFolder}/dist`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get dockerfile() {
|
|
||||||
return `${Action.actionFolder}/Dockerfile`;
|
|
||||||
}
|
|
||||||
|
|
||||||
static get workspace() {
|
static get workspace() {
|
||||||
return process.env.GITHUB_WORKSPACE;
|
return process.env.GITHUB_WORKSPACE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ import AndroidVersioning from './android-versioning';
|
|||||||
|
|
||||||
describe('Android Versioning', () => {
|
describe('Android Versioning', () => {
|
||||||
describe('versionToVersionCode', () => {
|
describe('versionToVersionCode', () => {
|
||||||
|
it('defaults to 0 when versioning strategy is none', () => {
|
||||||
|
expect(AndroidVersioning.versionToVersionCode('none')).toBe(0);
|
||||||
|
});
|
||||||
|
|
||||||
it('defaults to 1 when version is not a valid semver', () => {
|
it('defaults to 1 when version is not a valid semver', () => {
|
||||||
expect(AndroidVersioning.versionToVersionCode('abcd')).toBe(1);
|
expect(AndroidVersioning.versionToVersionCode('abcd')).toBe(1);
|
||||||
});
|
});
|
||||||
@@ -11,7 +15,7 @@ describe('Android Versioning', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('throw when generated version code is too large', () => {
|
it('throw when generated version code is too large', () => {
|
||||||
expect(() => AndroidVersioning.versionToVersionCode('1234.0.0')).toThrow();
|
expect(() => AndroidVersioning.versionToVersionCode('2050.0.0')).toThrow();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -24,4 +28,14 @@ describe('Android Versioning', () => {
|
|||||||
expect(AndroidVersioning.determineVersionCode('1.2.3', 2)).toBe(2);
|
expect(AndroidVersioning.determineVersionCode('1.2.3', 2)).toBe(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('determineSdkManagerParameters', () => {
|
||||||
|
it('defaults to blank', () => {
|
||||||
|
expect(AndroidVersioning.determineSdkManagerParameters('AndroidApiLevelAuto')).toBe('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('uses the specified api level', () => {
|
||||||
|
expect(AndroidVersioning.determineSdkManagerParameters('AndroidApiLevel30')).toBe('platforms;android-30');
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,14 +6,22 @@ export default class AndroidVersioning {
|
|||||||
if (!inputVersionCode) {
|
if (!inputVersionCode) {
|
||||||
return AndroidVersioning.versionToVersionCode(version);
|
return AndroidVersioning.versionToVersionCode(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
return inputVersionCode;
|
return inputVersionCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static versionToVersionCode(version) {
|
static versionToVersionCode(version) {
|
||||||
|
if (version === 'none') {
|
||||||
|
core.info(`Versioning strategy is set to ${version}, so android version code should not be applied.`);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const parsedVersion = semver.parse(version);
|
const parsedVersion = semver.parse(version);
|
||||||
|
|
||||||
if (!parsedVersion) {
|
if (!parsedVersion) {
|
||||||
core.warning(`Could not parse "${version}" to semver, defaulting android version code to 1`);
|
core.warning(`Could not parse "${version}" to semver, defaulting android version code to 1`);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -21,12 +29,19 @@ export default class AndroidVersioning {
|
|||||||
// Allow for 3 patch digits, 3 minor digits and 3 major digits.
|
// Allow for 3 patch digits, 3 minor digits and 3 major digits.
|
||||||
const versionCode = parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch;
|
const versionCode = parsedVersion.major * 1000000 + parsedVersion.minor * 1000 + parsedVersion.patch;
|
||||||
|
|
||||||
if (versionCode >= 1000000000) {
|
if (versionCode >= 2050000000) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`,
|
`Generated versionCode ${versionCode} is dangerously close to the maximum allowed number 2100000000. Consider a different versioning scheme to be able to continue updating your application.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
core.info(`Using android versionCode ${versionCode}`);
|
core.info(`Using android versionCode ${versionCode}`);
|
||||||
|
|
||||||
return versionCode;
|
return versionCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static determineSdkManagerParameters(targetSdkVersion) {
|
||||||
|
const parsedVersion = Number.parseInt(targetSdkVersion.slice(-2), 10);
|
||||||
|
|
||||||
|
return Number.isNaN(parsedVersion) ? '' : `platforms;android-${parsedVersion}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
611
src/model/aws.ts
611
src/model/aws.ts
@@ -1,611 +0,0 @@
|
|||||||
import * as SDK from 'aws-sdk';
|
|
||||||
import { customAlphabet } from 'nanoid';
|
|
||||||
import * as fs from 'fs';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import * as zlib from 'zlib';
|
|
||||||
const alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
||||||
const repositoryDirectoryName = 'repo';
|
|
||||||
const efsDirectoryName = 'data';
|
|
||||||
const cacheDirectoryName = 'cache';
|
|
||||||
|
|
||||||
class AWS {
|
|
||||||
static async runBuildJob(buildParameters, baseImage) {
|
|
||||||
try {
|
|
||||||
const nanoid = customAlphabet(alphabet, 4);
|
|
||||||
const buildUid = `${process.env.GITHUB_RUN_NUMBER}-${buildParameters.platform
|
|
||||||
.replace('Standalone', '')
|
|
||||||
.replace('standalone', '')}-${nanoid()}`;
|
|
||||||
const branchName = process.env.GITHUB_REF?.split('/').reverse()[0];
|
|
||||||
|
|
||||||
core.info('Starting part 1/4 (clone from github and restore cache)');
|
|
||||||
await this.run(
|
|
||||||
buildUid,
|
|
||||||
buildParameters.awsStackName,
|
|
||||||
'alpine/git',
|
|
||||||
['/bin/sh'],
|
|
||||||
[
|
|
||||||
'-c',
|
|
||||||
`apk update;
|
|
||||||
apk add unzip;
|
|
||||||
apk add git-lfs;
|
|
||||||
apk add jq;
|
|
||||||
# Get source repo for project to be built and game-ci repo for utilties
|
|
||||||
git clone https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git ${buildUid}/${repositoryDirectoryName} -q
|
|
||||||
git clone https://${buildParameters.githubToken}@github.com/game-ci/unity-builder.git ${buildUid}/builder -q
|
|
||||||
cd /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/
|
|
||||||
git checkout $GITHUB_SHA
|
|
||||||
cd /${efsDirectoryName}/
|
|
||||||
# Look for usable cache
|
|
||||||
if [ ! -d ${cacheDirectoryName} ]; then
|
|
||||||
mkdir ${cacheDirectoryName}
|
|
||||||
fi
|
|
||||||
cd ${cacheDirectoryName}
|
|
||||||
if [ ! -d "${branchName}" ]; then
|
|
||||||
mkdir "${branchName}"
|
|
||||||
fi
|
|
||||||
cd "${branchName}"
|
|
||||||
echo " "
|
|
||||||
echo "Cached Libraries for ${branchName} from previous builds:"
|
|
||||||
ls
|
|
||||||
echo " "
|
|
||||||
libDir="/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}/Library"
|
|
||||||
if [ -d "$libDir" ]; then
|
|
||||||
rm -r "$libDir"
|
|
||||||
echo "Setup .gitignore to ignore Library folder and remove it from builds"
|
|
||||||
fi
|
|
||||||
echo 'Checking cache'
|
|
||||||
# Restore cache
|
|
||||||
latest=$(ls -t | head -1)
|
|
||||||
if [ ! -z "$latest" ]; then
|
|
||||||
echo "Library cache exists from build $latest from ${branchName}"
|
|
||||||
echo 'Creating empty Library folder for cache'
|
|
||||||
mkdir "$libDir"
|
|
||||||
unzip -q $latest -d '/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}/Library/.'
|
|
||||||
else
|
|
||||||
echo 'Cache does not exist'
|
|
||||||
fi
|
|
||||||
# Print out important directories
|
|
||||||
echo ' '
|
|
||||||
echo 'Repo:'
|
|
||||||
ls /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/
|
|
||||||
echo ' '
|
|
||||||
echo 'Project:'
|
|
||||||
ls /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}
|
|
||||||
echo ' '
|
|
||||||
echo 'Library:'
|
|
||||||
ls /${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}/Library/
|
|
||||||
echo ' '
|
|
||||||
`,
|
|
||||||
],
|
|
||||||
`/${efsDirectoryName}`,
|
|
||||||
`/${efsDirectoryName}/`,
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: 'GITHUB_SHA',
|
|
||||||
value: process.env.GITHUB_SHA,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
ParameterKey: 'GithubToken',
|
|
||||||
ParameterValue: buildParameters.githubToken,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
core.info('Starting part 2/4 (build unity project)');
|
|
||||||
await this.run(
|
|
||||||
buildUid,
|
|
||||||
buildParameters.awsStackName,
|
|
||||||
baseImage.toString(),
|
|
||||||
['/bin/sh'],
|
|
||||||
[
|
|
||||||
'-c',
|
|
||||||
`
|
|
||||||
cp -r /${efsDirectoryName}/${buildUid}/builder/dist/default-build-script/ /UnityBuilderAction;
|
|
||||||
cp -r /${efsDirectoryName}/${buildUid}/builder/dist/entrypoint.sh /entrypoint.sh;
|
|
||||||
cp -r /${efsDirectoryName}/${buildUid}/builder/dist/steps/ /steps;
|
|
||||||
chmod -R +x /entrypoint.sh;
|
|
||||||
chmod -R +x /steps;
|
|
||||||
/entrypoint.sh;
|
|
||||||
`,
|
|
||||||
],
|
|
||||||
`/${efsDirectoryName}`,
|
|
||||||
`/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/`,
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: 'ContainerMemory',
|
|
||||||
value: buildParameters.remoteBuildMemory,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ContainerCpu',
|
|
||||||
value: buildParameters.remoteBuildCpu,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'GITHUB_WORKSPACE',
|
|
||||||
value: `/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'PROJECT_PATH',
|
|
||||||
value: buildParameters.projectPath,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'BUILD_PATH',
|
|
||||||
value: buildParameters.buildPath,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'BUILD_FILE',
|
|
||||||
value: buildParameters.buildFile,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'BUILD_NAME',
|
|
||||||
value: buildParameters.buildName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'BUILD_METHOD',
|
|
||||||
value: buildParameters.buildMethod,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CUSTOM_PARAMETERS',
|
|
||||||
value: buildParameters.customParameters,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'CHOWN_FILES_TO',
|
|
||||||
value: buildParameters.chownFilesTo,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'BUILD_TARGET',
|
|
||||||
value: buildParameters.platform,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ANDROID_VERSION_CODE',
|
|
||||||
value: buildParameters.androidVersionCode.toString(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ANDROID_KEYSTORE_NAME',
|
|
||||||
value: buildParameters.androidKeystoreName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'ANDROID_KEYALIAS_NAME',
|
|
||||||
value: buildParameters.androidKeyaliasName,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
ParameterKey: 'GithubToken',
|
|
||||||
ParameterValue: buildParameters.githubToken,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'UnityLicense',
|
|
||||||
ParameterValue: process.env.UNITY_LICENSE ? process.env.UNITY_LICENSE : '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'UnityEmail',
|
|
||||||
ParameterValue: process.env.UNITY_EMAIL ? process.env.UNITY_EMAIL : '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'UnityPassword',
|
|
||||||
ParameterValue: process.env.UNITY_PASSWORD ? process.env.UNITY_PASSWORD : '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'UnitySerial',
|
|
||||||
ParameterValue: process.env.UNITY_SERIAL ? process.env.UNITY_SERIAL : '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'AndroidKeystoreBase64',
|
|
||||||
ParameterValue: buildParameters.androidKeystoreBase64 ? buildParameters.androidKeystoreBase64 : '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'AndroidKeystorePass',
|
|
||||||
ParameterValue: buildParameters.androidKeystorePass ? buildParameters.androidKeystorePass : '0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'AndroidKeyAliasPass',
|
|
||||||
ParameterValue: buildParameters.androidKeyaliasPass ? buildParameters.androidKeyaliasPass : '0',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
);
|
|
||||||
core.info('Starting part 3/4 (zip unity build and Library for caching)');
|
|
||||||
// Cleanup
|
|
||||||
await this.run(
|
|
||||||
buildUid,
|
|
||||||
buildParameters.awsStackName,
|
|
||||||
'alpine',
|
|
||||||
['/bin/sh'],
|
|
||||||
[
|
|
||||||
'-c',
|
|
||||||
`
|
|
||||||
apk update
|
|
||||||
apk add zip
|
|
||||||
cd Library
|
|
||||||
zip -q -r lib-${buildUid}.zip .*
|
|
||||||
mv lib-${buildUid}.zip /${efsDirectoryName}/${cacheDirectoryName}/${branchName}/lib-${buildUid}.zip
|
|
||||||
cd ../../
|
|
||||||
zip -q -r build-${buildUid}.zip ${buildParameters.buildPath}/*
|
|
||||||
mv build-${buildUid}.zip /${efsDirectoryName}/${buildUid}/build-${buildUid}.zip
|
|
||||||
`,
|
|
||||||
],
|
|
||||||
`/${efsDirectoryName}`,
|
|
||||||
`/${efsDirectoryName}/${buildUid}/${repositoryDirectoryName}/${buildParameters.projectPath}`,
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: 'GITHUB_SHA',
|
|
||||||
value: process.env.GITHUB_SHA,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
ParameterKey: 'GithubToken',
|
|
||||||
ParameterValue: buildParameters.githubToken,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
core.info('Starting part 4/4 (upload build to s3)');
|
|
||||||
await this.run(
|
|
||||||
buildUid,
|
|
||||||
buildParameters.awsStackName,
|
|
||||||
'amazon/aws-cli',
|
|
||||||
['/bin/sh'],
|
|
||||||
[
|
|
||||||
'-c',
|
|
||||||
`
|
|
||||||
aws s3 cp ${buildUid}/build-${buildUid}.zip s3://game-ci-storage/
|
|
||||||
# no need to upload Library cache for now
|
|
||||||
# aws s3 cp /${efsDirectoryName}/${cacheDirectoryName}/${branchName}/lib-${buildUid}.zip s3://game-ci-storage/
|
|
||||||
rm -r ${buildUid}
|
|
||||||
`,
|
|
||||||
],
|
|
||||||
`/${efsDirectoryName}`,
|
|
||||||
`/${efsDirectoryName}/`,
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name: 'GITHUB_SHA',
|
|
||||||
value: process.env.GITHUB_SHA,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'AWS_DEFAULT_REGION',
|
|
||||||
value: process.env.AWS_DEFAULT_REGION,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
ParameterKey: 'GithubToken',
|
|
||||||
ParameterValue: buildParameters.githubToken,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'AWSAccessKeyID',
|
|
||||||
ParameterValue: process.env.AWS_ACCESS_KEY_ID,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'AWSSecretAccessKey',
|
|
||||||
ParameterValue: process.env.AWS_SECRET_ACCESS_KEY,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
);
|
|
||||||
} catch (error) {
|
|
||||||
core.setFailed(error);
|
|
||||||
core.error(error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static async run(
|
|
||||||
buildUid: string,
|
|
||||||
stackName: string,
|
|
||||||
image: string,
|
|
||||||
entrypoint: string[],
|
|
||||||
commands,
|
|
||||||
mountdir,
|
|
||||||
workingdir,
|
|
||||||
environment,
|
|
||||||
secrets,
|
|
||||||
) {
|
|
||||||
const ECS = new SDK.ECS();
|
|
||||||
const CF = new SDK.CloudFormation();
|
|
||||||
|
|
||||||
const taskDef = await this.setupCloudFormations(
|
|
||||||
CF,
|
|
||||||
buildUid,
|
|
||||||
stackName,
|
|
||||||
image,
|
|
||||||
entrypoint,
|
|
||||||
commands,
|
|
||||||
mountdir,
|
|
||||||
workingdir,
|
|
||||||
secrets,
|
|
||||||
);
|
|
||||||
|
|
||||||
await this.runTask(taskDef, ECS, CF, environment, buildUid);
|
|
||||||
|
|
||||||
await this.cleanupResources(CF, taskDef);
|
|
||||||
}
|
|
||||||
|
|
||||||
static async setupCloudFormations(
|
|
||||||
CF,
|
|
||||||
buildUid: string,
|
|
||||||
stackName: string,
|
|
||||||
image: string,
|
|
||||||
entrypoint: string[],
|
|
||||||
commands,
|
|
||||||
mountdir,
|
|
||||||
workingdir,
|
|
||||||
secrets,
|
|
||||||
) {
|
|
||||||
const logid = customAlphabet(alphabet, 9)();
|
|
||||||
commands[1] += `
|
|
||||||
echo "${logid}"
|
|
||||||
`;
|
|
||||||
const taskDefStackName = `${stackName}-${buildUid}`;
|
|
||||||
const taskDefCloudFormation = fs.readFileSync(`${__dirname}/cloud-formations/task-def-formation.yml`, 'utf8');
|
|
||||||
await CF.createStack({
|
|
||||||
StackName: taskDefStackName,
|
|
||||||
TemplateBody: taskDefCloudFormation,
|
|
||||||
Parameters: [
|
|
||||||
{
|
|
||||||
ParameterKey: 'ImageUrl',
|
|
||||||
ParameterValue: image,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'ServiceName',
|
|
||||||
ParameterValue: taskDefStackName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'Command',
|
|
||||||
ParameterValue: commands.join(','),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'EntryPoint',
|
|
||||||
ParameterValue: entrypoint.join(','),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'WorkingDirectory',
|
|
||||||
ParameterValue: workingdir,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'EFSMountDirectory',
|
|
||||||
ParameterValue: mountdir,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'BUILDID',
|
|
||||||
ParameterValue: buildUid,
|
|
||||||
},
|
|
||||||
...secrets,
|
|
||||||
],
|
|
||||||
}).promise();
|
|
||||||
core.info('Creating worker cluster...');
|
|
||||||
|
|
||||||
const cleanupTaskDefStackName = `${taskDefStackName}-cleanup`;
|
|
||||||
const cleanupCloudFormation = fs.readFileSync(`${__dirname}/cloud-formations/cloudformation-stack-ttl.yml`, 'utf8');
|
|
||||||
await CF.createStack({
|
|
||||||
StackName: cleanupTaskDefStackName,
|
|
||||||
TemplateBody: cleanupCloudFormation,
|
|
||||||
Capabilities: ['CAPABILITY_IAM'],
|
|
||||||
Parameters: [
|
|
||||||
{
|
|
||||||
ParameterKey: 'StackName',
|
|
||||||
ParameterValue: taskDefStackName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'DeleteStackName',
|
|
||||||
ParameterValue: cleanupTaskDefStackName,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'TTL',
|
|
||||||
ParameterValue: '100',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
ParameterKey: 'BUILDID',
|
|
||||||
ParameterValue: buildUid,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}).promise();
|
|
||||||
core.info('Creating cleanup cluster...');
|
|
||||||
|
|
||||||
try {
|
|
||||||
await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();
|
|
||||||
} catch (error) {
|
|
||||||
core.error(error);
|
|
||||||
}
|
|
||||||
const taskDefResources = await CF.describeStackResources({
|
|
||||||
StackName: taskDefStackName,
|
|
||||||
}).promise();
|
|
||||||
|
|
||||||
const baseResources = await CF.describeStackResources({ StackName: stackName }).promise();
|
|
||||||
|
|
||||||
// in the future we should offer a parameter to choose if you want the guarnteed shutdown.
|
|
||||||
core.info('Worker cluster created successfully (skipping wait for cleanup cluster to be ready)');
|
|
||||||
|
|
||||||
return {
|
|
||||||
taskDefStackName,
|
|
||||||
taskDefCloudFormation,
|
|
||||||
taskDefStackNameTTL: cleanupTaskDefStackName,
|
|
||||||
ttlCloudFormation: cleanupCloudFormation,
|
|
||||||
taskDefResources,
|
|
||||||
baseResources,
|
|
||||||
logid,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static async runTask(taskDef, ECS, CF, environment, buildUid) {
|
|
||||||
const cluster =
|
|
||||||
taskDef.baseResources.StackResources?.find((x) => x.LogicalResourceId === 'ECSCluster')?.PhysicalResourceId || '';
|
|
||||||
const taskDefinition =
|
|
||||||
taskDef.taskDefResources.StackResources?.find((x) => x.LogicalResourceId === 'TaskDefinition')
|
|
||||||
?.PhysicalResourceId || '';
|
|
||||||
const SubnetOne =
|
|
||||||
taskDef.baseResources.StackResources?.find((x) => x.LogicalResourceId === 'PublicSubnetOne')
|
|
||||||
?.PhysicalResourceId || '';
|
|
||||||
const SubnetTwo =
|
|
||||||
taskDef.baseResources.StackResources?.find((x) => x.LogicalResourceId === 'PublicSubnetTwo')
|
|
||||||
?.PhysicalResourceId || '';
|
|
||||||
const ContainerSecurityGroup =
|
|
||||||
taskDef.baseResources.StackResources?.find((x) => x.LogicalResourceId === 'ContainerSecurityGroup')
|
|
||||||
?.PhysicalResourceId || '';
|
|
||||||
const streamName =
|
|
||||||
taskDef.taskDefResources.StackResources?.find((x) => x.LogicalResourceId === 'KinesisStream')
|
|
||||||
?.PhysicalResourceId || '';
|
|
||||||
|
|
||||||
const task = await ECS.runTask({
|
|
||||||
cluster,
|
|
||||||
taskDefinition,
|
|
||||||
platformVersion: '1.4.0',
|
|
||||||
overrides: {
|
|
||||||
containerOverrides: [
|
|
||||||
{
|
|
||||||
name: taskDef.taskDefStackName,
|
|
||||||
environment: [...environment, { name: 'BUILDID', value: buildUid }],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
launchType: 'FARGATE',
|
|
||||||
networkConfiguration: {
|
|
||||||
awsvpcConfiguration: {
|
|
||||||
subnets: [SubnetOne, SubnetTwo],
|
|
||||||
assignPublicIp: 'ENABLED',
|
|
||||||
securityGroups: [ContainerSecurityGroup],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}).promise();
|
|
||||||
|
|
||||||
core.info('Task is starting on worker cluster');
|
|
||||||
const taskArn = task.tasks?.[0].taskArn || '';
|
|
||||||
|
|
||||||
try {
|
|
||||||
await ECS.waitFor('tasksRunning', { tasks: [taskArn], cluster }).promise();
|
|
||||||
} catch (error) {
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
|
||||||
const describeTasks = await ECS.describeTasks({
|
|
||||||
tasks: [taskArn],
|
|
||||||
cluster,
|
|
||||||
}).promise();
|
|
||||||
core.info(`Task has ended ${describeTasks.tasks?.[0].containers?.[0].lastStatus}`);
|
|
||||||
core.setFailed(error);
|
|
||||||
core.error(error);
|
|
||||||
}
|
|
||||||
core.info(`Task is running on worker cluster`);
|
|
||||||
await this.streamLogsUntilTaskStops(ECS, CF, taskDef, cluster, taskArn, streamName);
|
|
||||||
await ECS.waitFor('tasksStopped', { cluster, tasks: [taskArn] }).promise();
|
|
||||||
const exitCode = (
|
|
||||||
await ECS.describeTasks({
|
|
||||||
tasks: [taskArn],
|
|
||||||
cluster,
|
|
||||||
}).promise()
|
|
||||||
).tasks?.[0].containers?.[0].exitCode;
|
|
||||||
if (exitCode !== 0) {
|
|
||||||
try {
|
|
||||||
await this.cleanupResources(CF, taskDef);
|
|
||||||
} catch (error) {
|
|
||||||
core.warning(`failed to cleanup ${error}`);
|
|
||||||
}
|
|
||||||
core.error(`job failed with exit code ${exitCode}`);
|
|
||||||
throw new Error(`job failed with exit code ${exitCode}`);
|
|
||||||
} else {
|
|
||||||
core.info(`Task has finished successfully`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static async streamLogsUntilTaskStops(ECS: AWS.ECS, CF, taskDef, clusterName, taskArn, kinesisStreamName) {
|
|
||||||
// watching logs
|
|
||||||
const kinesis = new SDK.Kinesis();
|
|
||||||
|
|
||||||
const getTaskData = async () => {
|
|
||||||
const tasks = await ECS.describeTasks({
|
|
||||||
cluster: clusterName,
|
|
||||||
tasks: [taskArn],
|
|
||||||
}).promise();
|
|
||||||
return tasks.tasks?.[0];
|
|
||||||
};
|
|
||||||
|
|
||||||
const stream = await kinesis
|
|
||||||
.describeStream({
|
|
||||||
StreamName: kinesisStreamName,
|
|
||||||
})
|
|
||||||
.promise();
|
|
||||||
|
|
||||||
let iterator =
|
|
||||||
(
|
|
||||||
await kinesis
|
|
||||||
.getShardIterator({
|
|
||||||
ShardIteratorType: 'TRIM_HORIZON',
|
|
||||||
StreamName: stream.StreamDescription.StreamName,
|
|
||||||
ShardId: stream.StreamDescription.Shards[0].ShardId,
|
|
||||||
})
|
|
||||||
.promise()
|
|
||||||
).ShardIterator || '';
|
|
||||||
|
|
||||||
await CF.waitFor('stackCreateComplete', { StackName: taskDef.taskDefStackNameTTL }).promise();
|
|
||||||
|
|
||||||
core.info(`Task status is ${(await getTaskData())?.lastStatus}`);
|
|
||||||
|
|
||||||
const logBaseUrl = `https://${SDK.config.region}.console.aws.amazon.com/cloudwatch/home?region=${SDK.config.region}#logsV2:log-groups/log-group/${taskDef.taskDefStackName}`;
|
|
||||||
core.info(`You can also see the logs at AWS Cloud Watch: ${logBaseUrl}`);
|
|
||||||
|
|
||||||
let readingLogs = true;
|
|
||||||
let timestamp: number = 0;
|
|
||||||
while (readingLogs) {
|
|
||||||
await new Promise((resolve) => setTimeout(resolve, 1500));
|
|
||||||
const taskData = await getTaskData();
|
|
||||||
if (taskData?.lastStatus !== 'RUNNING') {
|
|
||||||
if (timestamp === 0) {
|
|
||||||
core.info('Task stopped, streaming end of logs');
|
|
||||||
timestamp = Date.now();
|
|
||||||
}
|
|
||||||
if (timestamp !== 0 && Date.now() - timestamp < 30000) {
|
|
||||||
core.info('Task status is not RUNNING for 30 seconds, last query for logs');
|
|
||||||
readingLogs = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const records = await kinesis
|
|
||||||
.getRecords({
|
|
||||||
ShardIterator: iterator,
|
|
||||||
})
|
|
||||||
.promise();
|
|
||||||
iterator = records.NextShardIterator || '';
|
|
||||||
if (records.Records.length > 0 && iterator) {
|
|
||||||
for (let index = 0; index < records.Records.length; index++) {
|
|
||||||
const json = JSON.parse(
|
|
||||||
zlib.gunzipSync(Buffer.from(records.Records[index].Data as string, 'base64')).toString('utf8'),
|
|
||||||
);
|
|
||||||
if (json.messageType === 'DATA_MESSAGE') {
|
|
||||||
for (let logEventsIndex = 0; logEventsIndex < json.logEvents.length; logEventsIndex++) {
|
|
||||||
if (json.logEvents[logEventsIndex].message.includes(taskDef.logid)) {
|
|
||||||
core.info('End of task logs');
|
|
||||||
readingLogs = false;
|
|
||||||
} else {
|
|
||||||
core.info(json.logEvents[logEventsIndex].message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static async cleanupResources(CF, taskDef) {
|
|
||||||
await CF.deleteStack({
|
|
||||||
StackName: taskDef.taskDefStackName,
|
|
||||||
}).promise();
|
|
||||||
|
|
||||||
await CF.deleteStack({
|
|
||||||
StackName: taskDef.taskDefStackNameTTL,
|
|
||||||
}).promise();
|
|
||||||
|
|
||||||
await CF.waitFor('stackDeleteComplete', {
|
|
||||||
StackName: taskDef.taskDefStackName,
|
|
||||||
}).promise();
|
|
||||||
|
|
||||||
// Currently too slow and causes too much waiting
|
|
||||||
await CF.waitFor('stackDeleteComplete', {
|
|
||||||
StackName: taskDef.taskDefStackNameTTL,
|
|
||||||
}).promise();
|
|
||||||
|
|
||||||
core.info('Cleanup complete');
|
|
||||||
}
|
|
||||||
|
|
||||||
static onlog(batch) {
|
|
||||||
for (const log of batch) {
|
|
||||||
core.info(`log: ${log}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export default AWS;
|
|
||||||
@@ -1,14 +1,22 @@
|
|||||||
import Versioning from './versioning';
|
import Versioning from './versioning';
|
||||||
import UnityVersioning from './unity-versioning';
|
import UnityVersioning from './unity-versioning';
|
||||||
|
import AndroidVersioning from './android-versioning';
|
||||||
import BuildParameters from './build-parameters';
|
import BuildParameters from './build-parameters';
|
||||||
import Input from './input';
|
import Input from './input';
|
||||||
import Platform from './platform';
|
import Platform from './platform';
|
||||||
|
|
||||||
const determineVersion = jest.spyOn(Versioning, 'determineVersion').mockImplementation(async () => '1.3.37');
|
// Todo - Don't use process.env directly, that's what the input model class is for.
|
||||||
|
const testLicense =
|
||||||
|
'<?xml version="1.0" encoding="UTF-8"?><root>\n <License id="Terms">\n <MachineBindings>\n <Binding Key="1" Value="576562626572264761624c65526f7578"/>\n <Binding Key="2" Value="576562626572264761624c65526f7578"/>\n </MachineBindings>\n <MachineID Value="D7nTUnjNAmtsUMcnoyrqkgIbYdM="/>\n <SerialHash Value="2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80"/>\n <Features>\n <Feature Value="33"/>\n <Feature Value="1"/>\n <Feature Value="12"/>\n <Feature Value="2"/>\n <Feature Value="24"/>\n <Feature Value="3"/>\n <Feature Value="36"/>\n <Feature Value="17"/>\n <Feature Value="19"/>\n <Feature Value="62"/>\n </Features>\n <DeveloperData Value="AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg=="/>\n <SerialMasked Value="F4-BGRX-XD4E-ZCWV-C5JW-XXXX"/>\n <StartDate Value="2021-02-08T00:00:00"/>\n <UpdateDate Value="2021-02-09T00:34:57"/>\n <InitialActivationDate Value="2021-02-08T00:34:56"/>\n <LicenseVersion Value="6.x"/>\n <ClientProvidedVersion Value="2018.4.30f1"/>\n <AlwaysOnline Value="false"/>\n <Entitlements>\n <Entitlement Ns="unity_editor" Tag="UnityPersonal" Type="EDITOR" ValidTo="9999-12-31T00:00:00"/>\n <Entitlement Ns="unity_editor" Tag="DarkSkin" Type="EDITOR_FEATURE" ValidTo="9999-12-31T00:00:00"/>\n </Entitlements>\n </License>\n<Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI="#Terms"><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>';
|
||||||
|
process.env.UNITY_LICENSE = testLicense;
|
||||||
|
|
||||||
|
const determineVersion = jest.spyOn(Versioning, 'determineBuildVersion').mockImplementation(async () => '1.3.37');
|
||||||
const determineUnityVersion = jest
|
const determineUnityVersion = jest
|
||||||
.spyOn(UnityVersioning, 'determineUnityVersion')
|
.spyOn(UnityVersioning, 'determineUnityVersion')
|
||||||
.mockImplementation(() => '2019.2.11f1');
|
.mockImplementation(() => '2019.2.11f1');
|
||||||
|
const determineSdkManagerParameters = jest
|
||||||
|
.spyOn(AndroidVersioning, 'determineSdkManagerParameters')
|
||||||
|
.mockImplementation(() => 'platforms;android-30');
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
jest.clearAllMocks();
|
jest.clearAllMocks();
|
||||||
@@ -33,33 +41,36 @@ describe('BuildParameters', () => {
|
|||||||
it('returns the android version code with provided input', async () => {
|
it('returns the android version code with provided input', async () => {
|
||||||
const mockValue = '42';
|
const mockValue = '42';
|
||||||
jest.spyOn(Input, 'androidVersionCode', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'androidVersionCode', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidVersionCode: mockValue }));
|
||||||
expect.objectContaining({ androidVersionCode: mockValue }),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the android version code from version by default', async () => {
|
it('returns the android version code from version by default', async () => {
|
||||||
const mockValue = '';
|
const mockValue = '';
|
||||||
jest.spyOn(Input, 'androidVersionCode', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'androidVersionCode', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidVersionCode: 1003037 }));
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidVersionCode: 1003037 }));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the platform', async () => {
|
it('determines the android sdk manager parameters only once', async () => {
|
||||||
|
await BuildParameters.create();
|
||||||
|
expect(determineSdkManagerParameters).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('returns the targetPlatform', async () => {
|
||||||
const mockValue = 'somePlatform';
|
const mockValue = 'somePlatform';
|
||||||
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ platform: mockValue }));
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ targetPlatform: mockValue }));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the project path', async () => {
|
it('returns the project path', async () => {
|
||||||
const mockValue = 'path/to/project';
|
const mockValue = 'path/to/project';
|
||||||
jest.spyOn(Input, 'projectPath', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'projectPath', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ projectPath: mockValue }));
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ projectPath: mockValue }));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the build name', async () => {
|
it('returns the build name', async () => {
|
||||||
const mockValue = 'someBuildName';
|
const mockValue = 'someBuildName';
|
||||||
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ buildName: mockValue }));
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ buildName: mockValue }));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the build path', async () => {
|
it('returns the build path', async () => {
|
||||||
@@ -68,15 +79,13 @@ describe('BuildParameters', () => {
|
|||||||
const expectedBuildPath = `${mockPath}/${mockPlatform}`;
|
const expectedBuildPath = `${mockPath}/${mockPlatform}`;
|
||||||
jest.spyOn(Input, 'buildsPath', 'get').mockReturnValue(mockPath);
|
jest.spyOn(Input, 'buildsPath', 'get').mockReturnValue(mockPath);
|
||||||
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(mockPlatform);
|
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(mockPlatform);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ buildPath: expectedBuildPath }));
|
||||||
expect.objectContaining({ buildPath: expectedBuildPath }),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the build file', async () => {
|
it('returns the build file', async () => {
|
||||||
const mockValue = 'someBuildName';
|
const mockValue = 'someBuildName';
|
||||||
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ buildFile: mockValue }));
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ buildFile: mockValue }));
|
||||||
});
|
});
|
||||||
|
|
||||||
test.each([Platform.types.StandaloneWindows, Platform.types.StandaloneWindows64])(
|
test.each([Platform.types.StandaloneWindows, Platform.types.StandaloneWindows64])(
|
||||||
@@ -84,7 +93,7 @@ describe('BuildParameters', () => {
|
|||||||
async (targetPlatform) => {
|
async (targetPlatform) => {
|
||||||
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(targetPlatform);
|
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(targetPlatform);
|
||||||
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(targetPlatform);
|
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(targetPlatform);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(
|
||||||
expect.objectContaining({ buildFile: `${targetPlatform}.exe` }),
|
expect.objectContaining({ buildFile: `${targetPlatform}.exe` }),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@@ -94,7 +103,7 @@ describe('BuildParameters', () => {
|
|||||||
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(targetPlatform);
|
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(targetPlatform);
|
||||||
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(targetPlatform);
|
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(targetPlatform);
|
||||||
jest.spyOn(Input, 'androidAppBundle', 'get').mockReturnValue(false);
|
jest.spyOn(Input, 'androidAppBundle', 'get').mockReturnValue(false);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(
|
||||||
expect.objectContaining({ buildFile: `${targetPlatform}.apk` }),
|
expect.objectContaining({ buildFile: `${targetPlatform}.apk` }),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -103,7 +112,7 @@ describe('BuildParameters', () => {
|
|||||||
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(targetPlatform);
|
jest.spyOn(Input, 'targetPlatform', 'get').mockReturnValue(targetPlatform);
|
||||||
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(targetPlatform);
|
jest.spyOn(Input, 'buildName', 'get').mockReturnValue(targetPlatform);
|
||||||
jest.spyOn(Input, 'androidAppBundle', 'get').mockReturnValue(true);
|
jest.spyOn(Input, 'androidAppBundle', 'get').mockReturnValue(true);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(
|
||||||
expect.objectContaining({ buildFile: `${targetPlatform}.aab` }),
|
expect.objectContaining({ buildFile: `${targetPlatform}.aab` }),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -111,53 +120,51 @@ describe('BuildParameters', () => {
|
|||||||
it('returns the build method', async () => {
|
it('returns the build method', async () => {
|
||||||
const mockValue = 'Namespace.ClassName.BuildMethod';
|
const mockValue = 'Namespace.ClassName.BuildMethod';
|
||||||
jest.spyOn(Input, 'buildMethod', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'buildMethod', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ buildMethod: mockValue }));
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ buildMethod: mockValue }));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the android keystore name', async () => {
|
it('returns the android keystore name', async () => {
|
||||||
const mockValue = 'keystore.keystore';
|
const mockValue = 'keystore.keystore';
|
||||||
jest.spyOn(Input, 'androidKeystoreName', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'androidKeystoreName', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidKeystoreName: mockValue }));
|
||||||
expect.objectContaining({ androidKeystoreName: mockValue }),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the android keystore base64-encoded content', async () => {
|
it('returns the android keystore base64-encoded content', async () => {
|
||||||
const mockValue = 'secret';
|
const mockValue = 'secret';
|
||||||
jest.spyOn(Input, 'androidKeystoreBase64', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'androidKeystoreBase64', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidKeystoreBase64: mockValue }));
|
||||||
expect.objectContaining({ androidKeystoreBase64: mockValue }),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the android keystore pass', async () => {
|
it('returns the android keystore pass', async () => {
|
||||||
const mockValue = 'secret';
|
const mockValue = 'secret';
|
||||||
jest.spyOn(Input, 'androidKeystorePass', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'androidKeystorePass', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidKeystorePass: mockValue }));
|
||||||
expect.objectContaining({ androidKeystorePass: mockValue }),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the android keyalias name', async () => {
|
it('returns the android keyalias name', async () => {
|
||||||
const mockValue = 'secret';
|
const mockValue = 'secret';
|
||||||
jest.spyOn(Input, 'androidKeyaliasName', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'androidKeyaliasName', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidKeyaliasName: mockValue }));
|
||||||
expect.objectContaining({ androidKeyaliasName: mockValue }),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the android keyalias pass', async () => {
|
it('returns the android keyalias pass', async () => {
|
||||||
const mockValue = 'secret';
|
const mockValue = 'secret';
|
||||||
jest.spyOn(Input, 'androidKeyaliasPass', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'androidKeyaliasPass', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ androidKeyaliasPass: mockValue }));
|
||||||
expect.objectContaining({ androidKeyaliasPass: mockValue }),
|
});
|
||||||
|
|
||||||
|
it('returns the android target sdk version', async () => {
|
||||||
|
const mockValue = 'AndroidApiLevelAuto';
|
||||||
|
jest.spyOn(Input, 'androidTargetSdkVersion', 'get').mockReturnValue(mockValue);
|
||||||
|
expect(BuildParameters.create()).resolves.toEqual(
|
||||||
|
expect.objectContaining({ androidTargetSdkVersion: mockValue }),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns the custom parameters', async () => {
|
it('returns the custom parameters', async () => {
|
||||||
const mockValue = '-profile SomeProfile -someBoolean -someValue exampleValue';
|
const mockValue = '-profile SomeProfile -someBoolean -someValue exampleValue';
|
||||||
jest.spyOn(Input, 'customParameters', 'get').mockReturnValue(mockValue);
|
jest.spyOn(Input, 'customParameters', 'get').mockReturnValue(mockValue);
|
||||||
await expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ customParameters: mockValue }));
|
expect(BuildParameters.create()).resolves.toEqual(expect.objectContaining({ customParameters: mockValue }));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,25 +1,101 @@
|
|||||||
|
import { customAlphabet } from 'nanoid';
|
||||||
import AndroidVersioning from './android-versioning';
|
import AndroidVersioning from './android-versioning';
|
||||||
|
import CloudRunnerConstants from './cloud-runner/services/cloud-runner-constants';
|
||||||
|
import CloudRunnerBuildGuid from './cloud-runner/services/cloud-runner-guid';
|
||||||
import Input from './input';
|
import Input from './input';
|
||||||
import Platform from './platform';
|
import Platform from './platform';
|
||||||
import UnityVersioning from './unity-versioning';
|
import UnityVersioning from './unity-versioning';
|
||||||
import Versioning from './versioning';
|
import Versioning from './versioning';
|
||||||
|
import { GitRepoReader } from './input-readers/git-repo';
|
||||||
|
import { GithubCliReader } from './input-readers/github-cli';
|
||||||
|
import { Cli } from './cli/cli';
|
||||||
|
|
||||||
class BuildParameters {
|
class BuildParameters {
|
||||||
static async create() {
|
public editorVersion!: string;
|
||||||
|
public customImage!: string;
|
||||||
|
public unitySerial!: string;
|
||||||
|
public runnerTempPath: string | undefined;
|
||||||
|
public targetPlatform!: string;
|
||||||
|
public projectPath!: string;
|
||||||
|
public buildName!: string;
|
||||||
|
public buildPath!: string;
|
||||||
|
public buildFile!: string;
|
||||||
|
public buildMethod!: string;
|
||||||
|
public buildVersion!: string;
|
||||||
|
public androidVersionCode!: string;
|
||||||
|
public androidKeystoreName!: string;
|
||||||
|
public androidKeystoreBase64!: string;
|
||||||
|
public androidKeystorePass!: string;
|
||||||
|
public androidKeyaliasName!: string;
|
||||||
|
public androidKeyaliasPass!: string;
|
||||||
|
public androidTargetSdkVersion!: string;
|
||||||
|
public androidSdkManagerParameters!: string;
|
||||||
|
public customParameters!: string;
|
||||||
|
public sshAgent!: string;
|
||||||
|
public cloudRunnerCluster!: string;
|
||||||
|
public awsBaseStackName!: string;
|
||||||
|
public gitPrivateToken!: string;
|
||||||
|
public awsStackName!: string;
|
||||||
|
public kubeConfig!: string;
|
||||||
|
public cloudRunnerMemory!: string;
|
||||||
|
public cloudRunnerCpu!: string;
|
||||||
|
public kubeVolumeSize!: string;
|
||||||
|
public kubeVolume!: string;
|
||||||
|
public kubeStorageClass!: string;
|
||||||
|
public chownFilesTo!: string;
|
||||||
|
public customJobHooks!: string;
|
||||||
|
public cachePushOverrideCommand!: string;
|
||||||
|
public cachePullOverrideCommand!: string;
|
||||||
|
public readInputFromOverrideList!: string;
|
||||||
|
public readInputOverrideCommand!: string;
|
||||||
|
public checkDependencyHealthOverride!: string;
|
||||||
|
public startDependenciesOverride!: string;
|
||||||
|
public cacheKey!: string;
|
||||||
|
|
||||||
|
public postBuildSteps!: string;
|
||||||
|
public preBuildSteps!: string;
|
||||||
|
public customJob!: string;
|
||||||
|
public runNumber!: string;
|
||||||
|
public branch!: string;
|
||||||
|
public githubRepo!: string;
|
||||||
|
public gitSha!: string;
|
||||||
|
public logId!: string;
|
||||||
|
public buildGuid!: string;
|
||||||
|
public cloudRunnerBranch!: string;
|
||||||
|
public cloudRunnerIntegrationTests!: boolean;
|
||||||
|
public cloudRunnerBuilderPlatform!: string | undefined;
|
||||||
|
public isCliMode!: boolean;
|
||||||
|
|
||||||
|
static async create(): Promise<BuildParameters> {
|
||||||
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
|
||||||
|
const editorVersion = UnityVersioning.determineUnityVersion(Input.projectPath, Input.unityVersion);
|
||||||
const unityVersion = UnityVersioning.determineUnityVersion(Input.projectPath, Input.unityVersion);
|
const buildVersion = await Versioning.determineBuildVersion(Input.versioningStrategy, Input.specifiedVersion);
|
||||||
|
|
||||||
const buildVersion = await Versioning.determineVersion(Input.versioningStrategy, Input.specifiedVersion);
|
|
||||||
|
|
||||||
const androidVersionCode = AndroidVersioning.determineVersionCode(buildVersion, Input.androidVersionCode);
|
const androidVersionCode = AndroidVersioning.determineVersionCode(buildVersion, Input.androidVersionCode);
|
||||||
|
const androidSdkManagerParameters = AndroidVersioning.determineSdkManagerParameters(Input.androidTargetSdkVersion);
|
||||||
|
|
||||||
|
// Todo - Don't use process.env directly, that's what the input model class is for.
|
||||||
|
// ---
|
||||||
|
let unitySerial = '';
|
||||||
|
if (!process.env.UNITY_SERIAL && Input.githubInputEnabled) {
|
||||||
|
// No serial was present, so it is a personal license that we need to convert
|
||||||
|
if (!process.env.UNITY_LICENSE) {
|
||||||
|
throw new Error(`Missing Unity License File and no Serial was found. If this
|
||||||
|
is a personal license, make sure to follow the activation
|
||||||
|
steps and set the UNITY_LICENSE GitHub secret or enter a Unity
|
||||||
|
serial number inside the UNITY_SERIAL GitHub secret.`);
|
||||||
|
}
|
||||||
|
unitySerial = this.getSerialFromLicenseFile(process.env.UNITY_LICENSE);
|
||||||
|
} else {
|
||||||
|
unitySerial = process.env.UNITY_SERIAL!;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
version: unityVersion,
|
editorVersion,
|
||||||
customImage: Input.customImage,
|
customImage: Input.customImage,
|
||||||
|
unitySerial,
|
||||||
|
|
||||||
runnerTempPath: process.env.RUNNER_TEMP,
|
runnerTempPath: process.env.RUNNER_TEMP,
|
||||||
platform: Input.targetPlatform,
|
targetPlatform: Input.targetPlatform,
|
||||||
projectPath: Input.projectPath,
|
projectPath: Input.projectPath,
|
||||||
buildName: Input.buildName,
|
buildName: Input.buildName,
|
||||||
buildPath: `${Input.buildsPath}/${Input.targetPlatform}`,
|
buildPath: `${Input.buildsPath}/${Input.targetPlatform}`,
|
||||||
@@ -32,16 +108,42 @@ class BuildParameters {
|
|||||||
androidKeystorePass: Input.androidKeystorePass,
|
androidKeystorePass: Input.androidKeystorePass,
|
||||||
androidKeyaliasName: Input.androidKeyaliasName,
|
androidKeyaliasName: Input.androidKeyaliasName,
|
||||||
androidKeyaliasPass: Input.androidKeyaliasPass,
|
androidKeyaliasPass: Input.androidKeyaliasPass,
|
||||||
|
androidTargetSdkVersion: Input.androidTargetSdkVersion,
|
||||||
|
androidSdkManagerParameters,
|
||||||
customParameters: Input.customParameters,
|
customParameters: Input.customParameters,
|
||||||
|
sshAgent: Input.sshAgent,
|
||||||
|
gitPrivateToken: Input.gitPrivateToken || (await GithubCliReader.GetGitHubAuthToken()),
|
||||||
chownFilesTo: Input.chownFilesTo,
|
chownFilesTo: Input.chownFilesTo,
|
||||||
remoteBuildCluster: Input.remoteBuildCluster,
|
cloudRunnerCluster: Input.cloudRunnerCluster,
|
||||||
awsStackName: Input.awsStackName,
|
cloudRunnerBuilderPlatform: Input.cloudRunnerBuilderPlatform,
|
||||||
|
awsBaseStackName: Input.awsBaseStackName,
|
||||||
kubeConfig: Input.kubeConfig,
|
kubeConfig: Input.kubeConfig,
|
||||||
githubToken: Input.githubToken,
|
cloudRunnerMemory: Input.cloudRunnerMemory,
|
||||||
remoteBuildMemory: Input.remoteBuildMemory,
|
cloudRunnerCpu: Input.cloudRunnerCpu,
|
||||||
remoteBuildCpu: Input.remoteBuildCpu,
|
|
||||||
kubeVolumeSize: Input.kubeVolumeSize,
|
kubeVolumeSize: Input.kubeVolumeSize,
|
||||||
kubeVolume: Input.kubeVolume,
|
kubeVolume: Input.kubeVolume,
|
||||||
|
postBuildSteps: Input.postBuildSteps,
|
||||||
|
preBuildSteps: Input.preBuildSteps,
|
||||||
|
customJob: Input.customJob,
|
||||||
|
runNumber: Input.runNumber,
|
||||||
|
branch: Input.branch.replace('/head', '') || (await GitRepoReader.GetBranch()),
|
||||||
|
cloudRunnerBranch: Input.cloudRunnerBranch.split('/').reverse()[0],
|
||||||
|
cloudRunnerIntegrationTests: Input.cloudRunnerTests,
|
||||||
|
githubRepo: Input.githubRepo || (await GitRepoReader.GetRemote()) || 'game-ci/unity-builder',
|
||||||
|
isCliMode: Cli.isCliMode,
|
||||||
|
awsStackName: Input.awsBaseStackName,
|
||||||
|
gitSha: Input.gitSha,
|
||||||
|
logId: customAlphabet(CloudRunnerConstants.alphabet, 9)(),
|
||||||
|
buildGuid: CloudRunnerBuildGuid.generateGuid(Input.runNumber, Input.targetPlatform),
|
||||||
|
customJobHooks: Input.customJobHooks(),
|
||||||
|
cachePullOverrideCommand: Input.cachePullOverrideCommand(),
|
||||||
|
cachePushOverrideCommand: Input.cachePushOverrideCommand(),
|
||||||
|
readInputOverrideCommand: Input.readInputOverrideCommand(),
|
||||||
|
readInputFromOverrideList: Input.readInputFromOverrideList(),
|
||||||
|
kubeStorageClass: Input.kubeStorageClass,
|
||||||
|
checkDependencyHealthOverride: Input.checkDependencyHealthOverride,
|
||||||
|
startDependenciesOverride: Input.startDependenciesOverride,
|
||||||
|
cacheKey: Input.cacheKey,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,6 +158,19 @@ class BuildParameters {
|
|||||||
|
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static getSerialFromLicenseFile(license) {
|
||||||
|
const startKey = `<DeveloperData Value="`;
|
||||||
|
const endKey = `"/>`;
|
||||||
|
const startIndex = license.indexOf(startKey) + startKey.length;
|
||||||
|
if (startIndex < 0) {
|
||||||
|
throw new Error(`License File was corrupted, unable to locate serial`);
|
||||||
|
}
|
||||||
|
const endIndex = license.indexOf(endKey, startIndex);
|
||||||
|
|
||||||
|
// Slice off the first 4 characters as they are garbage values
|
||||||
|
return Buffer.from(license.slice(startIndex, endIndex), 'base64').toString('binary').slice(4);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BuildParameters;
|
export default BuildParameters;
|
||||||
|
|||||||
45
src/model/cli/cli-functions-repository.ts
Normal file
45
src/model/cli/cli-functions-repository.ts
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
export class CliFunctionsRepository {
|
||||||
|
private static targets: any[] = [];
|
||||||
|
public static PushCliFunction(
|
||||||
|
target: any,
|
||||||
|
propertyKey: string,
|
||||||
|
descriptor: PropertyDescriptor,
|
||||||
|
key: string,
|
||||||
|
description: string,
|
||||||
|
) {
|
||||||
|
CliFunctionsRepository.targets.push({
|
||||||
|
target,
|
||||||
|
propertyKey,
|
||||||
|
descriptor,
|
||||||
|
key,
|
||||||
|
description,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetCliFunctions(key) {
|
||||||
|
const results = CliFunctionsRepository.targets.find((x) => x.key === key);
|
||||||
|
if (results === undefined || results.length === 0) {
|
||||||
|
throw new Error(`no CLI mode found for ${key}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static GetAllCliModes() {
|
||||||
|
return CliFunctionsRepository.targets.map((x) => {
|
||||||
|
return {
|
||||||
|
key: x.key,
|
||||||
|
description: x.description,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
public static PushCliFunctionSource(cliFunction: any) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function CliFunction(key: string, description: string) {
|
||||||
|
return (target: any, propertyKey: string, descriptor: PropertyDescriptor) => {
|
||||||
|
CliFunctionsRepository.PushCliFunction(target, propertyKey, descriptor, key, description);
|
||||||
|
};
|
||||||
|
}
|
||||||
97
src/model/cli/cli.ts
Normal file
97
src/model/cli/cli.ts
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
import { Command } from 'commander-ts';
|
||||||
|
import { BuildParameters, CloudRunner, ImageTag, Input } from '..';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
import { ActionYamlReader } from '../input-readers/action-yaml';
|
||||||
|
import CloudRunnerLogger from '../cloud-runner/services/cloud-runner-logger';
|
||||||
|
import CloudRunnerQueryOverride from '../cloud-runner/services/cloud-runner-query-override';
|
||||||
|
import { CliFunction, CliFunctionsRepository } from './cli-functions-repository';
|
||||||
|
import { AwsCliCommands } from '../cloud-runner/providers/aws/commands/aws-cli-commands';
|
||||||
|
import { Caching } from '../cloud-runner/remote-client/caching';
|
||||||
|
import { LfsHashing } from '../cloud-runner/services/lfs-hashing';
|
||||||
|
import { RemoteClient } from '../cloud-runner/remote-client';
|
||||||
|
|
||||||
|
export class Cli {
|
||||||
|
public static options;
|
||||||
|
static get isCliMode() {
|
||||||
|
return Cli.options !== undefined && Cli.options.mode !== undefined && Cli.options.mode !== '';
|
||||||
|
}
|
||||||
|
public static query(key, alternativeKey) {
|
||||||
|
if (Cli.options && Cli.options[key] !== undefined) {
|
||||||
|
return Cli.options[key];
|
||||||
|
}
|
||||||
|
if (Cli.options && alternativeKey && Cli.options[alternativeKey] !== undefined) {
|
||||||
|
return Cli.options[alternativeKey];
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static InitCliMode() {
|
||||||
|
CliFunctionsRepository.PushCliFunctionSource(AwsCliCommands);
|
||||||
|
CliFunctionsRepository.PushCliFunctionSource(Caching);
|
||||||
|
CliFunctionsRepository.PushCliFunctionSource(LfsHashing);
|
||||||
|
CliFunctionsRepository.PushCliFunctionSource(RemoteClient);
|
||||||
|
const program = new Command();
|
||||||
|
program.version('0.0.1');
|
||||||
|
const properties = Object.getOwnPropertyNames(Input);
|
||||||
|
const actionYamlReader: ActionYamlReader = new ActionYamlReader();
|
||||||
|
for (const element of properties) {
|
||||||
|
program.option(`--${element} <${element}>`, actionYamlReader.GetActionYamlValue(element));
|
||||||
|
}
|
||||||
|
program.option(
|
||||||
|
'-m, --mode <mode>',
|
||||||
|
CliFunctionsRepository.GetAllCliModes()
|
||||||
|
.map((x) => `${x.key} (${x.description})`)
|
||||||
|
.join(` | `),
|
||||||
|
);
|
||||||
|
program.option('--populateOverride <populateOverride>', 'should use override query to pull input false by default');
|
||||||
|
program.option('--cachePushFrom <cachePushFrom>', 'cache push from source folder');
|
||||||
|
program.option('--cachePushTo <cachePushTo>', 'cache push to caching folder');
|
||||||
|
program.option('--artifactName <artifactName>', 'caching artifact name');
|
||||||
|
program.parse(process.argv);
|
||||||
|
Cli.options = program.opts();
|
||||||
|
|
||||||
|
return Cli.isCliMode;
|
||||||
|
}
|
||||||
|
|
||||||
|
static async RunCli(): Promise<void> {
|
||||||
|
Input.githubInputEnabled = false;
|
||||||
|
if (Cli.options['populateOverride'] === `true`) {
|
||||||
|
await CloudRunnerQueryOverride.PopulateQueryOverrideInput();
|
||||||
|
}
|
||||||
|
Cli.logInput();
|
||||||
|
const results = CliFunctionsRepository.GetCliFunctions(Cli.options.mode);
|
||||||
|
CloudRunnerLogger.log(`Entrypoint: ${results.key}`);
|
||||||
|
Cli.options.versioning = 'None';
|
||||||
|
|
||||||
|
return await results.target[results.propertyKey]();
|
||||||
|
}
|
||||||
|
|
||||||
|
@CliFunction(`print-input`, `prints all input`)
|
||||||
|
private static logInput() {
|
||||||
|
core.info(`\n`);
|
||||||
|
core.info(`INPUT:`);
|
||||||
|
const properties = Object.getOwnPropertyNames(Input);
|
||||||
|
for (const element of properties) {
|
||||||
|
if (
|
||||||
|
Input[element] !== undefined &&
|
||||||
|
Input[element] !== '' &&
|
||||||
|
typeof Input[element] !== `function` &&
|
||||||
|
element !== 'length' &&
|
||||||
|
element !== 'cliOptions' &&
|
||||||
|
element !== 'prototype'
|
||||||
|
) {
|
||||||
|
core.info(`${element} ${Input[element]}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
core.info(`\n`);
|
||||||
|
}
|
||||||
|
|
||||||
|
@CliFunction(`cli`, `runs a cloud runner build`)
|
||||||
|
public static async CLIBuild(): Promise<string> {
|
||||||
|
const buildParameter = await BuildParameters.create();
|
||||||
|
const baseImage = new ImageTag(buildParameter);
|
||||||
|
|
||||||
|
return await CloudRunner.run(buildParameter, baseImage.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
3
src/model/cloud-runner/cloud-runner-statics.ts
Normal file
3
src/model/cloud-runner/cloud-runner-statics.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export class CloudRunnerStatics {
|
||||||
|
public static readonly logPrefix = `Cloud-Runner`;
|
||||||
|
}
|
||||||
13
src/model/cloud-runner/cloud-runner-step-state.ts
Normal file
13
src/model/cloud-runner/cloud-runner-step-state.ts
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import CloudRunnerEnvironmentVariable from './services/cloud-runner-environment-variable';
|
||||||
|
import CloudRunnerSecret from './services/cloud-runner-secret';
|
||||||
|
|
||||||
|
export class CloudRunnerStepState {
|
||||||
|
public image: string;
|
||||||
|
public environment: CloudRunnerEnvironmentVariable[];
|
||||||
|
public secrets: CloudRunnerSecret[];
|
||||||
|
constructor(image: string, environmentVariables: CloudRunnerEnvironmentVariable[], secrets: CloudRunnerSecret[]) {
|
||||||
|
this.image = image;
|
||||||
|
this.environment = environmentVariables;
|
||||||
|
this.secrets = secrets;
|
||||||
|
}
|
||||||
|
}
|
||||||
142
src/model/cloud-runner/cloud-runner.test.ts
Normal file
142
src/model/cloud-runner/cloud-runner.test.ts
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
import { BuildParameters, ImageTag } from '..';
|
||||||
|
import CloudRunner from './cloud-runner';
|
||||||
|
import Input from '../input';
|
||||||
|
import { CloudRunnerStatics } from './cloud-runner-statics';
|
||||||
|
import { TaskParameterSerializer } from './services/task-parameter-serializer';
|
||||||
|
import UnityVersioning from '../unity-versioning';
|
||||||
|
import { Cli } from '../cli/cli';
|
||||||
|
import CloudRunnerLogger from './services/cloud-runner-logger';
|
||||||
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
|
||||||
|
describe('Cloud Runner', () => {
|
||||||
|
it('responds', () => {});
|
||||||
|
});
|
||||||
|
describe('Cloud Runner', () => {
|
||||||
|
const testSecretName = 'testSecretName';
|
||||||
|
const testSecretValue = 'testSecretValue';
|
||||||
|
if (Input.cloudRunnerTests) {
|
||||||
|
it('All build parameters sent to cloud runner as env vars', async () => {
|
||||||
|
// Build parameters
|
||||||
|
Cli.options = {
|
||||||
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.read('test-project'),
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
customJob: `
|
||||||
|
- name: 'step 1'
|
||||||
|
image: 'alpine'
|
||||||
|
commands: 'printenv'
|
||||||
|
secrets:
|
||||||
|
- name: '${testSecretName}'
|
||||||
|
value: '${testSecretValue}'
|
||||||
|
`,
|
||||||
|
};
|
||||||
|
Input.githubInputEnabled = false;
|
||||||
|
|
||||||
|
// Setup parameters
|
||||||
|
const buildParameter = await BuildParameters.create();
|
||||||
|
Input.githubInputEnabled = true;
|
||||||
|
const baseImage = new ImageTag(buildParameter);
|
||||||
|
|
||||||
|
// Run the job
|
||||||
|
const file = await CloudRunner.run(buildParameter, baseImage.toString());
|
||||||
|
|
||||||
|
// Assert results
|
||||||
|
expect(file).toContain(JSON.stringify(buildParameter));
|
||||||
|
expect(file).toContain(`${Input.ToEnvVarFormat(testSecretName)}=${testSecretValue}`);
|
||||||
|
const environmentVariables = TaskParameterSerializer.readBuildEnvironmentVariables();
|
||||||
|
const newLinePurgedFile = file
|
||||||
|
.replace(/\s+/g, '')
|
||||||
|
.replace(new RegExp(`\\[${CloudRunnerStatics.logPrefix}\\]`, 'g'), '');
|
||||||
|
for (const element of environmentVariables) {
|
||||||
|
if (element.value !== undefined && typeof element.value !== 'function') {
|
||||||
|
if (typeof element.value === `string`) {
|
||||||
|
element.value = element.value.replace(/\s+/g, '');
|
||||||
|
}
|
||||||
|
CloudRunnerLogger.log(`checking input/build param ${element.name} ${element.value}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const element of environmentVariables) {
|
||||||
|
if (element.value !== undefined && typeof element.value !== 'function') {
|
||||||
|
expect(newLinePurgedFile).toContain(`${element.name}`);
|
||||||
|
expect(newLinePurgedFile).toContain(`${element.name}=${element.value}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete Cli.options;
|
||||||
|
}, 1000000);
|
||||||
|
it('Run one build it should not use cache, run subsequent build which should use cache', async () => {
|
||||||
|
Cli.options = {
|
||||||
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.determineUnityVersion('test-project', UnityVersioning.read('test-project')),
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
cacheKey: `test-case-${uuidv4()}`,
|
||||||
|
};
|
||||||
|
Input.githubInputEnabled = false;
|
||||||
|
const buildParameter = await BuildParameters.create();
|
||||||
|
const baseImage = new ImageTag(buildParameter);
|
||||||
|
const results = await CloudRunner.run(buildParameter, baseImage.toString());
|
||||||
|
const libraryString = 'Rebuilding Library because the asset database could not be found!';
|
||||||
|
const buildSucceededString = 'Build succeeded';
|
||||||
|
expect(results).toContain(libraryString);
|
||||||
|
expect(results).toContain(buildSucceededString);
|
||||||
|
CloudRunnerLogger.log(`run 1 succeeded`);
|
||||||
|
const buildParameter2 = await BuildParameters.create();
|
||||||
|
const baseImage2 = new ImageTag(buildParameter2);
|
||||||
|
const results2 = await CloudRunner.run(buildParameter2, baseImage2.toString());
|
||||||
|
CloudRunnerLogger.log(`run 2 succeeded`);
|
||||||
|
expect(results2).toContain(buildSucceededString);
|
||||||
|
expect(results2).toEqual(expect.not.stringContaining(libraryString));
|
||||||
|
Input.githubInputEnabled = true;
|
||||||
|
delete Cli.options;
|
||||||
|
}, 1000000);
|
||||||
|
}
|
||||||
|
it('Local cloud runner returns commands', async () => {
|
||||||
|
// Build parameters
|
||||||
|
Cli.options = {
|
||||||
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.read('test-project'),
|
||||||
|
cloudRunnerCluster: 'local-system',
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
customJob: `
|
||||||
|
- name: 'step 1'
|
||||||
|
image: 'alpine'
|
||||||
|
commands: 'dir'
|
||||||
|
secrets:
|
||||||
|
- name: '${testSecretName}'
|
||||||
|
value: '${testSecretValue}'
|
||||||
|
`,
|
||||||
|
};
|
||||||
|
Input.githubInputEnabled = false;
|
||||||
|
|
||||||
|
// Setup parameters
|
||||||
|
const buildParameter = await BuildParameters.create();
|
||||||
|
const baseImage = new ImageTag(buildParameter);
|
||||||
|
|
||||||
|
// Run the job
|
||||||
|
await expect(CloudRunner.run(buildParameter, baseImage.toString())).resolves.not.toThrow();
|
||||||
|
Input.githubInputEnabled = true;
|
||||||
|
delete Cli.options;
|
||||||
|
}, 1000000);
|
||||||
|
it('Test cloud runner returns commands', async () => {
|
||||||
|
// Build parameters
|
||||||
|
Cli.options = {
|
||||||
|
versioning: 'None',
|
||||||
|
projectPath: 'test-project',
|
||||||
|
unityVersion: UnityVersioning.read('test-project'),
|
||||||
|
cloudRunnerCluster: 'test',
|
||||||
|
targetPlatform: 'StandaloneLinux64',
|
||||||
|
};
|
||||||
|
Input.githubInputEnabled = false;
|
||||||
|
|
||||||
|
// Setup parameters
|
||||||
|
const buildParameter = await BuildParameters.create();
|
||||||
|
const baseImage = new ImageTag(buildParameter);
|
||||||
|
|
||||||
|
// Run the job
|
||||||
|
await expect(CloudRunner.run(buildParameter, baseImage.toString())).resolves.not.toThrow();
|
||||||
|
Input.githubInputEnabled = true;
|
||||||
|
delete Cli.options;
|
||||||
|
}, 1000000);
|
||||||
|
});
|
||||||
92
src/model/cloud-runner/cloud-runner.ts
Normal file
92
src/model/cloud-runner/cloud-runner.ts
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
import AwsBuildPlatform from './providers/aws';
|
||||||
|
import { BuildParameters, Input } from '..';
|
||||||
|
import Kubernetes from './providers/k8s';
|
||||||
|
import CloudRunnerLogger from './services/cloud-runner-logger';
|
||||||
|
import { CloudRunnerStepState } from './cloud-runner-step-state';
|
||||||
|
import { WorkflowCompositionRoot } from './workflows/workflow-composition-root';
|
||||||
|
import { CloudRunnerError } from './error/cloud-runner-error';
|
||||||
|
import { TaskParameterSerializer } from './services/task-parameter-serializer';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
import CloudRunnerSecret from './services/cloud-runner-secret';
|
||||||
|
import { ProviderInterface } from './providers/provider-interface';
|
||||||
|
import CloudRunnerEnvironmentVariable from './services/cloud-runner-environment-variable';
|
||||||
|
import TestCloudRunner from './providers/test';
|
||||||
|
import LocalCloudRunner from './providers/local';
|
||||||
|
import LocalDockerCloudRunner from './providers/local-docker';
|
||||||
|
|
||||||
|
class CloudRunner {
|
||||||
|
public static Provider: ProviderInterface;
|
||||||
|
static buildParameters: BuildParameters;
|
||||||
|
public static defaultSecrets: CloudRunnerSecret[];
|
||||||
|
public static cloudRunnerEnvironmentVariables: CloudRunnerEnvironmentVariable[];
|
||||||
|
private static setup(buildParameters: BuildParameters) {
|
||||||
|
CloudRunnerLogger.setup();
|
||||||
|
CloudRunner.buildParameters = buildParameters;
|
||||||
|
CloudRunner.setupBuildPlatform();
|
||||||
|
CloudRunner.defaultSecrets = TaskParameterSerializer.readDefaultSecrets();
|
||||||
|
CloudRunner.cloudRunnerEnvironmentVariables = TaskParameterSerializer.readBuildEnvironmentVariables();
|
||||||
|
if (!buildParameters.isCliMode) {
|
||||||
|
const buildParameterPropertyNames = Object.getOwnPropertyNames(buildParameters);
|
||||||
|
for (const element of CloudRunner.cloudRunnerEnvironmentVariables) {
|
||||||
|
core.setOutput(Input.ToEnvVarFormat(element.name), element.value);
|
||||||
|
}
|
||||||
|
for (const element of buildParameterPropertyNames) {
|
||||||
|
core.setOutput(Input.ToEnvVarFormat(element), buildParameters[element]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static setupBuildPlatform() {
|
||||||
|
CloudRunnerLogger.log(`Cloud Runner platform selected ${CloudRunner.buildParameters.cloudRunnerCluster}`);
|
||||||
|
switch (CloudRunner.buildParameters.cloudRunnerCluster) {
|
||||||
|
case 'k8s':
|
||||||
|
CloudRunner.Provider = new Kubernetes(CloudRunner.buildParameters);
|
||||||
|
break;
|
||||||
|
case 'aws':
|
||||||
|
CloudRunner.Provider = new AwsBuildPlatform(CloudRunner.buildParameters);
|
||||||
|
break;
|
||||||
|
case 'test':
|
||||||
|
CloudRunner.Provider = new TestCloudRunner();
|
||||||
|
break;
|
||||||
|
case 'local-system':
|
||||||
|
CloudRunner.Provider = new LocalCloudRunner();
|
||||||
|
break;
|
||||||
|
case 'local-docker':
|
||||||
|
CloudRunner.Provider = new LocalDockerCloudRunner();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static async run(buildParameters: BuildParameters, baseImage: string) {
|
||||||
|
CloudRunner.setup(buildParameters);
|
||||||
|
try {
|
||||||
|
if (!CloudRunner.buildParameters.isCliMode) core.startGroup('Setup shared cloud runner resources');
|
||||||
|
await CloudRunner.Provider.setup(
|
||||||
|
CloudRunner.buildParameters.buildGuid,
|
||||||
|
CloudRunner.buildParameters,
|
||||||
|
CloudRunner.buildParameters.branch,
|
||||||
|
CloudRunner.defaultSecrets,
|
||||||
|
);
|
||||||
|
if (!CloudRunner.buildParameters.isCliMode) core.endGroup();
|
||||||
|
const output = await new WorkflowCompositionRoot().run(
|
||||||
|
new CloudRunnerStepState(baseImage, CloudRunner.cloudRunnerEnvironmentVariables, CloudRunner.defaultSecrets),
|
||||||
|
);
|
||||||
|
if (!CloudRunner.buildParameters.isCliMode) core.startGroup('Cleanup shared cloud runner resources');
|
||||||
|
await CloudRunner.Provider.cleanup(
|
||||||
|
CloudRunner.buildParameters.buildGuid,
|
||||||
|
CloudRunner.buildParameters,
|
||||||
|
CloudRunner.buildParameters.branch,
|
||||||
|
CloudRunner.defaultSecrets,
|
||||||
|
);
|
||||||
|
CloudRunnerLogger.log(`Cleanup complete`);
|
||||||
|
if (!CloudRunner.buildParameters.isCliMode) core.endGroup();
|
||||||
|
|
||||||
|
return output;
|
||||||
|
} catch (error) {
|
||||||
|
if (!CloudRunner.buildParameters.isCliMode) core.endGroup();
|
||||||
|
await CloudRunnerError.handleException(error);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default CloudRunner;
|
||||||
16
src/model/cloud-runner/error/cloud-runner-error.ts
Normal file
16
src/model/cloud-runner/error/cloud-runner-error.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import CloudRunnerLogger from '../services/cloud-runner-logger';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
import CloudRunner from '../cloud-runner';
|
||||||
|
|
||||||
|
export class CloudRunnerError {
|
||||||
|
public static async handleException(error: unknown) {
|
||||||
|
CloudRunnerLogger.error(JSON.stringify(error, undefined, 4));
|
||||||
|
core.setFailed('Cloud Runner failed');
|
||||||
|
await CloudRunner.Provider.cleanup(
|
||||||
|
CloudRunner.buildParameters.buildGuid,
|
||||||
|
CloudRunner.buildParameters,
|
||||||
|
CloudRunner.buildParameters.branch,
|
||||||
|
CloudRunner.defaultSecrets,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user