@@ -61,31 +61,32 @@ jobs:
6161 echo "UNITY_PROJECT_PATH: ${UNITY_PROJECT_PATH}" # Expected to be empty at this point
6262
6363 if [ -z "${UNITY_HUB_PATH}" ]; then
64- echo "Error: UNITY_HUB_PATH is not set"
64+ echo "::error:: UNITY_HUB_PATH is not set"
6565 exit 1
6666 fi
6767
6868 if [ "${{ matrix.unity-version }}" != "none" ] && [ -z "${UNITY_EDITOR_PATH}" ]; then
69- echo "Error: UNITY_EDITOR_PATH is not set"
69+ echo "::error:: UNITY_EDITOR_PATH is not set"
7070 exit 1
7171 fi
7272 - name : Activate License
73- if : ${{ matrix.unity-version != 'none' }}
73+ if : ${{ matrix.unity-version != 'none' }}
7474 shell : bash
7575 run : |
76+ unity-cli license-context
7677 unity-cli activate-license --license personal --email "${{ secrets.UNITY_USERNAME }}" --password "${{ secrets.UNITY_PASSWORD }}"
7778 - name : Create Unity Project
78- if : ${{ matrix.unity-version != 'none' }}
79+ if : ${{ matrix.unity-version != 'none' }}
7980 shell : bash
8081 run : |
8182 unity-cli list-project-templates --unity-editor "${UNITY_EDITOR_PATH}" --json
8283 unity-cli create-project --name "Unity Project" --unity-editor "${UNITY_EDITOR_PATH}" --json
8384 - name : Verify UNITY_PROJECT_PATH variable
84- if : ${{ matrix.unity-version != 'none' }}
85+ if : ${{ matrix.unity-version != 'none' }}
8586 shell : bash
8687 run : |
8788 if [ -z "${UNITY_PROJECT_PATH}" ]; then
88- echo "Error: UNITY_PROJECT_PATH is not set"
89+ echo "::error:: UNITY_PROJECT_PATH is not set"
8990 exit 1
9091 fi
9192 # check if the project can be built. Only Unity 2019.4+ and newer majors support the build pipeline package
@@ -134,6 +135,45 @@ jobs:
134135 exit 0
135136 fi
136137 unity-cli uninstall-unity --unity-editor "${UNITY_EDITOR_PATH}"
138+ - name : Print log paths
139+ if : ${{ matrix.unity-version != 'none' }}
140+ shell : bash
141+ run : |
142+ HUB_LOG_PATH=$(unity-cli hub-logs)
143+ PACKAGE_MANAGER_LOG_PATH=$(unity-cli package-manager-logs)
144+ LICENSING_CLIENT_LOG_PATH=$(unity-cli licensing-client-logs)
145+ LICENSING_AUDIT_LOG_PATH=$(unity-cli licensing-audit-logs)
146+
147+ echo "Hub Log Path: ${HUB_LOG_PATH}"
148+ echo "Package Manager Log Path: ${PACKAGE_MANAGER_LOG_PATH}"
149+ echo "Licensing Client Log Path: ${LICENSING_CLIENT_LOG_PATH}"
150+ echo "Licensing Audit Log Path: ${LICENSING_AUDIT_LOG_PATH}"
151+
152+ if [ ! -f "${HUB_LOG_PATH}" ]; then
153+ echo "::warning:: Hub log file does not exist at ${HUB_LOG_PATH}"
154+ # find all info-log.json files in ~/.config/unity3d/ - print their paths
155+ find ~/.config/unity3d/ -type f \( -name "info-log.json" \) -exec echo "{}" \;
156+ # also try to find in UNITY_HUB_PATH parent directory if set
157+ if [ -n "${UNITY_HUB_PATH}" ]; then
158+ HUB_DIR=$(dirname "${UNITY_HUB_PATH}")
159+ find "${HUB_DIR}" -type f \( -name "info-log.json" \) -exec echo "{}" \;
160+ fi
161+ # print all files found in ~/.config/
162+ find ~/.config/ -type f -exec echo "{}" \;
163+ echo "::error:: Hub log file does not exist at any known location"
164+ fi
165+
166+ if [ ! -f "${PACKAGE_MANAGER_LOG_PATH}" ]; then
167+ echo "::error::Package Manager log file does not exist at ${PACKAGE_MANAGER_LOG_PATH}"
168+ fi
169+
170+ if [ ! -f "${LICENSING_CLIENT_LOG_PATH}" ]; then
171+ echo "::error::Licensing Client log file does not exist at ${LICENSING_CLIENT_LOG_PATH}"
172+ fi
173+
174+ if [ ! -f "${LICENSING_AUDIT_LOG_PATH}" ]; then
175+ echo "::error::Licensing Audit log file does not exist at ${LICENSING_AUDIT_LOG_PATH}"
176+ fi
137177 - name : Return License
138178 if : always()
139179 shell : bash
0 commit comments