Skip to content

Commit caa0a81

Browse files
authored
License Activation fixes and Github Annotations (#590)
* Ensure serial is prioritized * Add compile listener to create github annotations * Update node modules * Don't build ubuntu on PR as secrets are now needed. Update PR template to request an example successful run. Remove 32bit windows build. Build on push to any branch * Update activation to use blank project * Ensure exceptions get annotated as well * More robust console printing * Update test project * Build iOS test on macos to verify burst functionality. Add annotation for license activation error. Fix unity version test. Remove minification from android * Improve license checks * Mask partially redacted serial in addition to full serial * Add retry logic to ubuntu builds * Allow dirty build on retry * Bump unity version
1 parent 7afabe7 commit caa0a81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4702
-3356
lines changed

.github/pull_request_template.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
- ...
1212

13+
#### Successful Workflow Run Link
14+
15+
- ...
16+
1317
#### Checklist
1418

1519
<!-- please check all items and add your own -->

.github/workflows/build-tests-mac.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Builds - MacOS
33
on:
44
workflow_dispatch:
55
push:
6-
branches:
7-
- main
86

97
concurrency:
108
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -20,11 +18,12 @@ jobs:
2018
projectPath:
2119
- test-project
2220
unityVersion:
23-
- 2021.3.31f1
24-
- 2022.3.11f1
25-
- 2023.1.17f1
21+
- 2021.3.32f1
22+
- 2022.3.13f1
23+
- 2023.1.19f1
2624
targetPlatform:
2725
- StandaloneOSX # Build a MacOS executable
26+
- iOS # Build an iOS executable
2827

2928
steps:
3029
###########################

.github/workflows/build-tests-ubuntu.yml

+51-9
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@ name: Builds - Ubuntu
33
on:
44
workflow_dispatch:
55
push:
6-
branches:
7-
- main
8-
pull_request:
9-
paths-ignore:
10-
- '.github/**'
116

127
concurrency:
138
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -52,9 +47,9 @@ jobs:
5247
projectPath:
5348
- test-project
5449
unityVersion:
55-
- 2021.3.31f1
56-
- 2022.3.11f1
57-
- 2023.1.17f1
50+
- 2021.3.32f1
51+
- 2022.3.13f1
52+
- 2023.1.19f1
5853
targetPlatform:
5954
- StandaloneOSX # Build a macOS standalone (Intel 64-bit) with mono backend.
6055
- StandaloneWindows64 # Build a Windows 64-bit standalone with mono backend.
@@ -84,14 +79,61 @@ jobs:
8479
###########################
8580
# Build #
8681
###########################
87-
- uses: ./
82+
- name: Build
83+
uses: ./
84+
id: build-1
85+
continue-on-error: true
86+
env:
87+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
88+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
8889
with:
8990
projectPath: ${{ matrix.projectPath }}
9091
unityVersion: ${{ matrix.unityVersion }}
9192
targetPlatform: ${{ matrix.targetPlatform }}
9293
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
9394
providerStrategy: ${{ matrix.providerStrategy }}
9495

96+
- name: Sleep for Retry
97+
if: ${{ steps.build-1.outcome == 'failure' }}
98+
run: |
99+
sleep 60
100+
101+
- name: Build (Retry 1)
102+
uses: ./
103+
id: build-2
104+
if: ${{ steps.build-1.outcome == 'failure' }}
105+
continue-on-error: true
106+
env:
107+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
108+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
109+
with:
110+
projectPath: ${{ matrix.projectPath }}
111+
unityVersion: ${{ matrix.unityVersion }}
112+
targetPlatform: ${{ matrix.targetPlatform }}
113+
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
114+
providerStrategy: ${{ matrix.providerStrategy }}
115+
allowDirtyBuild: true
116+
117+
- name: Sleep for Retry
118+
if: ${{ steps.build-2.outcome == 'failure' }}
119+
run: |
120+
sleep 240
121+
122+
- name: Build (Retry 2)
123+
uses: ./
124+
id: build-3
125+
if: ${{ steps.build-2.outcome == 'failure' }}
126+
env:
127+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
128+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
129+
with:
130+
projectPath: ${{ matrix.projectPath }}
131+
unityVersion: ${{ matrix.unityVersion }}
132+
targetPlatform: ${{ matrix.targetPlatform }}
133+
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
134+
providerStrategy: ${{ matrix.providerStrategy }}
135+
allowDirtyBuild: true
136+
95137
###########################
96138
# Upload #
97139
###########################

.github/workflows/build-tests-windows.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: Builds - Windows
33
on:
44
workflow_dispatch:
55
push:
6-
branches:
7-
- main
86

97
concurrency:
108
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -20,13 +18,12 @@ jobs:
2018
projectPath:
2119
- test-project
2220
unityVersion:
23-
- 2021.3.31f1
24-
- 2022.3.11f1
25-
- 2023.1.17f1
21+
- 2021.3.32f1
22+
- 2022.3.13f1
23+
- 2023.1.19f1
2624
targetPlatform:
2725
- Android # Build an Android apk.
2826
- StandaloneWindows64 # Build a Windows 64-bit standalone.
29-
- StandaloneWindows # Build a Windows 32-bit standalone.
3027
- WSAPlayer # Build a UWP App
3128
- tvOS # Build an Apple TV XCode project
3229

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using UnityEngine;
3+
using UnityEditor;
4+
5+
namespace UnityBuilderAction.Reporting
6+
{
7+
[InitializeOnLoad]
8+
static class CompileListener
9+
{
10+
static CompileListener()
11+
{
12+
if (Application.isBatchMode)
13+
{
14+
Application.logMessageReceived += Application_logMessageReceived;
15+
}
16+
}
17+
18+
private static void Application_logMessageReceived(string condition, string stackTrace, LogType type)
19+
{
20+
string prefix = "";
21+
switch (type)
22+
{
23+
case LogType.Error:
24+
prefix = "error";
25+
break;
26+
case LogType.Warning:
27+
prefix = "warning";
28+
break;
29+
case LogType.Exception:
30+
prefix = "error";
31+
break;
32+
}
33+
Console.WriteLine($"{Environment.NewLine}::{prefix} ::{condition}{Environment.NewLine}{stackTrace}");
34+
}
35+
}
36+
}

dist/default-build-script/Assets/Editor/UnityBuilderAction/Reporting/CompileListener.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)