Skip to content

Commit 7108079

Browse files
tweak gha
1 parent b5b1abf commit 7108079

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/scripts/run-project.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ RUN_UNITY() {
1010
unity-cli run --unity-project "${UNITY_PROJECT_PATH}" --unity-editor "${UNITY_EDITOR_PATH}" -quit -batchmode -nographics -buildTarget "${BUILD_TARGET}" --log-name "${PROJECT}" "$@"
1111
}
1212

13+
RUN_UNITY || true
14+
15+
(cd "${UNITY_PROJECT_PATH}" && openupm add com.utilities.buildpipeline) || {
16+
echo "Failed to add build pipeline package";
17+
exit 1;
18+
}
19+
20+
RUN_UNITY -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset || true
21+
1322
case "$PROJECT" in
1423
compiler-warnings)
1524
RUN_UNITY
@@ -22,8 +31,6 @@ case "$PROJECT" in
2231
}
2332
;;
2433
build-warnings|build-errors)
25-
(cd "${UNITY_PROJECT_PATH}" && openupm add com.utilities.buildpipeline)
26-
RUN_UNITY -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset
2734
ec=0; RUN_UNITY -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild -sceneList Assets/Scenes/Main.unity ${BUILD_ARGS:+"${BUILD_ARGS}"} || ec=$?
2835
if [[ "$PROJECT" == "build-errors" ]]; then
2936
[[ $ec -eq 0 ]] && {

0 commit comments

Comments
 (0)