Fix issues on android symbols for older unity versions. Change symbol default to public. Increase build test coverage of unity versions.

pull/505/head
Andrew Kahr 2023-02-12 03:11:53 -08:00
parent 25e471bdd5
commit 0b21b4c73a
7 changed files with 67 additions and 7 deletions

View File

@ -1,6 +1,7 @@
name: Builds name: Builds
on: on:
workflow_dispatch:
push: { branches: [main] } push: { branches: [main] }
pull_request: pull_request:
paths-ignore: paths-ignore:
@ -45,8 +46,22 @@ jobs:
projectPath: projectPath:
- test-project - test-project
unityVersion: unityVersion:
- 2019.2.11f1 - 2018.1.8f1
- 2018.2.21f1
- 2018.3.14f1
- 2018.4.36f1
- 2019.1.14f1
- 2019.2.21f1
- 2019.3.15f1 - 2019.3.15f1
- 2019.4.40f1
- 2020.1.17f1
- 2020.2.7f1
- 2020.3.44f1
- 2021.1.28f1
- 2021.2.19f1
- 2021.3.18f1
- 2022.1.24f1
- 2022.2.6f1
targetPlatform: targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit). - StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows64 # Build a Windows 64-bit standalone. - StandaloneWindows64 # Build a Windows 64-bit standalone.

View File

@ -1,6 +1,7 @@
name: Mac Builds name: Mac Builds
on: on:
workflow_dispatch:
push: push:
branches: branches:
- main - main
@ -18,7 +19,22 @@ jobs:
projectPath: projectPath:
- test-project - test-project
unityVersion: unityVersion:
- 2020.3.24f1 - 2018.1.8f1
- 2018.2.21f1
- 2018.3.14f1
- 2018.4.36f1
- 2019.1.14f1
- 2019.2.21f1
- 2019.3.15f1
- 2019.4.40f1
- 2020.1.17f1
- 2020.2.7f1
- 2020.3.44f1
- 2021.1.28f1
- 2021.2.19f1
- 2021.3.18f1
- 2022.1.24f1
- 2022.2.6f1
targetPlatform: targetPlatform:
- StandaloneOSX # Build a MacOS executable - StandaloneOSX # Build a MacOS executable

View File

@ -1,6 +1,7 @@
name: Windows Builds name: Windows Builds
on: on:
workflow_dispatch:
push: push:
branches: branches:
- main - main
@ -18,7 +19,22 @@ jobs:
projectPath: projectPath:
- test-project - test-project
unityVersion: unityVersion:
- 2020.3.24f1 - 2018.1.8f1
- 2018.2.21f1
- 2018.3.14f1
- 2018.4.36f1
- 2019.1.14f1
- 2019.2.21f1
- 2019.3.15f1
- 2019.4.40f1
- 2020.1.17f1
- 2020.2.7f1
- 2020.3.44f1
- 2021.1.28f1
- 2021.2.19f1
- 2021.3.18f1
- 2022.1.24f1
- 2022.2.6f1
targetPlatform: targetPlatform:
- StandaloneWindows64 # Build a Windows 64-bit standalone. - StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneWindows # Build a Windows 32-bit standalone. - StandaloneWindows # Build a Windows 32-bit standalone.

View File

@ -86,7 +86,7 @@ inputs:
description: 'The android symbol type to export. Should be "none", "public" or "debugging".' description: 'The android symbol type to export. Should be "none", "public" or "debugging".'
sshAgent: sshAgent:
required: false required: false
default: '' default: 'public'
description: 'SSH Agent path to forward to the container' description: 'SSH Agent path to forward to the container'
gitPrivateToken: gitPrivateToken:
required: false required: false

View File

@ -57,7 +57,8 @@ namespace UnityBuilderAction.Input
if (options.TryGetValue("androidSymbolType", out string symbolType) && !string.IsNullOrEmpty(symbolType)) if (options.TryGetValue("androidSymbolType", out string symbolType) && !string.IsNullOrEmpty(symbolType))
{ {
switch(symbolType) #if UNITY_2021_1_OR_NEWER
switch (symbolType)
{ {
case "public": case "public":
EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Public; EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Public;
@ -69,6 +70,18 @@ namespace UnityBuilderAction.Input
EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Disabled; EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Disabled;
break; break;
} }
#elif UNITY_2019_2_OR_NEWER
switch (symbolType)
{
case "public":
case "debugging":
EditorUserBuildSettings.androidCreateSymbolsZip = true;
break;
case "none":
EditorUserBuildSettings.androidCreateSymbolsZip = false;
break;
}
#endif
} }
} }
} }

2
dist/index.js vendored
View File

@ -8119,7 +8119,7 @@ class Versioning {
* The commit SHA that triggered the workflow run. * The commit SHA that triggered the workflow run.
*/ */
static get sha() { static get sha() {
return 'HEAD'; return process.env.GITHUB_SHA;
} }
/** /**
* Maximum number of lines to print when logging the git diff * Maximum number of lines to print when logging the git diff

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long