Skip to content

Commit 9a1379c

Browse files
style(audience): hardcode step scope labels, drop scope-derivation logic
Reverts the setup-job scope derivation and the per-cell env-var single-source pattern. Step names and if: conditions now state the scope directly: Detect or Install Unity (Windows + macOS only) Detect or Install VS Build Tools (StandaloneWindows64 IL2CPP only) Trade-off: adding a desktop target that needs Unity install or VS Build Tools requires editing the step's name and if: in the workflow alongside matrix-shared.json. Worth the simpler workflow.
1 parent 22fce64 commit 9a1379c

1 file changed

Lines changed: 3 additions & 25 deletions

File tree

.github/workflows/test-audience-sample-app.yml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ jobs:
4141
desktop_targets: ${{ steps.set.outputs.desktop_targets }}
4242
mobile_targets: ${{ steps.set.outputs.mobile_targets }}
4343
pr_exclude: ${{ steps.set.outputs.pr_exclude }}
44-
install_unity_scope: ${{ steps.set.outputs.install_unity_scope }}
45-
install_vs_tools_scope: ${{ steps.set.outputs.install_vs_tools_scope }}
4644
steps:
4745
- uses: actions/checkout@v4
4846
- id: set
@@ -58,21 +56,6 @@ jobs:
5856
else
5957
echo 'pr_exclude=[]' >> "$GITHUB_OUTPUT"
6058
fi
61-
# Friendly scope label for the "Detect or Install Unity" step: all desktop
62-
# targets that carry an install_unity_script, with target names cleaned up.
63-
install_unity_scope=$(jq -r '[.desktop_targets[] | select(.install_unity_script != "") | .target | sub("^Standalone"; "") | sub("64$"; "") | sub("OSX"; "macOS")] | join(" + ")' "$f")
64-
echo "install_unity_scope=$install_unity_scope" >> "$GITHUB_OUTPUT"
65-
# Scope label for the "Detect or Install VS Build Tools" step: cartesian
66-
# of Windows desktop targets and the IL2CPP backend (the structural Unity
67-
# rule). Joined with " or " so multi-target setups still produce a single
68-
# readable label.
69-
install_vs_tools_scope=$(jq -r '
70-
[.desktop_targets[] | select(.target | contains("Windows")) | .target] as $win
71-
| (.scripting_backends | map(select(. == "IL2CPP"))) as $il
72-
| [$win[] as $t | $il[] as $b | "\($t) \($b)"]
73-
| join(" or ")
74-
' "$f")
75-
echo "install_vs_tools_scope=$install_vs_tools_scope" >> "$GITHUB_OUTPUT"
7659
7760
playmode:
7861
needs: setup
@@ -88,11 +71,6 @@ jobs:
8871
timeout-minutes: 45
8972
env:
9073
AUDIENCE_TEST_CELL_ID: ${{ matrix.platform.target }}-${{ matrix.backend }}-${{ matrix.unity.version }}
91-
# Always-populated scope labels. Step names show them as "(<scope> only)" on
92-
# every cell, so a reader can see what the step is for without expanding it.
93-
# Both labels are derived from matrix data in the setup job.
94-
INSTALL_UNITY_SCOPE: ${{ needs.setup.outputs.install_unity_scope }}
95-
INSTALL_VS_TOOLS_SCOPE: ${{ needs.setup.outputs.install_vs_tools_scope }}
9674

9775
steps:
9876
- uses: actions/checkout@v4
@@ -108,16 +86,16 @@ jobs:
10886
Library-${{ matrix.backend }}-${{ matrix.platform.target }}-${{ matrix.unity.version }}-
10987
Library-${{ matrix.backend }}-${{ matrix.platform.target }}-
11088
111-
- name: Detect or Install Unity (${{ env.INSTALL_UNITY_SCOPE }} only)
89+
- name: Detect or Install Unity (Windows + macOS only)
11290
if: matrix.platform.install_unity_script != ''
11391
env:
11492
UNITY_VERSION: ${{ matrix.unity.version }}
11593
UNITY_CHANGESET: ${{ matrix.unity.changeset }}
11694
BACKEND: ${{ matrix.backend }}
11795
run: ${{ matrix.platform.install_unity_script }}
11896

119-
- name: Detect or Install VS Build Tools (${{ env.INSTALL_VS_TOOLS_SCOPE }} only)
120-
if: contains(env.INSTALL_VS_TOOLS_SCOPE, format('{0} {1}', matrix.platform.target, matrix.backend))
97+
- name: Detect or Install VS Build Tools (StandaloneWindows64 IL2CPP only)
98+
if: matrix.platform.target == 'StandaloneWindows64' && matrix.backend == 'IL2CPP'
12199
shell: pwsh
122100
run: .github/scripts/audience/ensure-msvc-windows.ps1
123101

0 commit comments

Comments
 (0)