Skip to content
This repository was archived by the owner on Aug 11, 2024. It is now read-only.

Commit adb6833

Browse files
- default apple cpu arch
1 parent 255358d commit adb6833

File tree

7 files changed

+21
-7
lines changed

7 files changed

+21
-7
lines changed

.github/workflows/validate.yml

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ jobs:
3131
build-targets: 'StandaloneWindows64 Android iOS'
3232
- os: macos-14
3333
build-targets: 'StandaloneOSX Android iOS'
34-
arch: 'arm64'
3534
- os: macos-latest
3635
build-targets: 'StandaloneOSX Android iOS'
3736

@@ -51,7 +50,6 @@ jobs:
5150
id: unity-setup
5251
with:
5352
build-targets: '${{ matrix.build-targets }}'
54-
architecture: '${{ matrix.arch }}'
5553

5654
- run: |
5755
echo "${{ env.UNITY_EDITOR_PATH }}"

dist/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -28074,6 +28074,14 @@ const main = async () => {
2807428074

2807528075
if (architecture) {
2807628076
core.debug(`architecture: ${architecture}`);
28077+
} else {
28078+
if (os.type() == 'Darwin') {
28079+
if (os.arch() == 'arm64') {
28080+
architecture = 'arm64';
28081+
} else if (os.arch() == 'x64') {
28082+
architecture = 'x86_64';
28083+
}
28084+
}
2807728085
}
2807828086

2807928087
var buildTargets = core.getInput('build-targets');

dist/unity-install.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ if (-not (Test-Path -Path $editorPath)) {
245245
$installArgs = @('install',"--version $unityVersion","--changeset $unityVersionChangeSet",'--cm')
246246
$installModules = AddModules
247247

248-
if (-not [string]::IsNullOrEmpty($architecture) -and $architecture -ne 'x86_64') {
248+
if (-not [string]::IsNullOrEmpty($architecture)) {
249249
$installArgs += "-a $architecture"
250250
}
251251

package-lock.json

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

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "unity-setup",
3-
"version": "7.5.0",
3+
"version": "7.5.1",
44
"description": "An atomic GitHub action to download and install the Unity Editor for runners.",
55
"main": "src/index.js",
66
"scripts": {

src/index.js

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ const main = async () => {
1313

1414
if (architecture) {
1515
core.debug(`architecture: ${architecture}`);
16+
} else {
17+
if (os.type() == 'Darwin') {
18+
if (os.arch() == 'arm64') {
19+
architecture = 'arm64';
20+
} else if (os.arch() == 'x64') {
21+
architecture = 'x86_64';
22+
}
23+
}
1624
}
1725

1826
var buildTargets = core.getInput('build-targets');

src/unity-install.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ if (-not (Test-Path -Path $editorPath)) {
245245
$installArgs = @('install',"--version $unityVersion","--changeset $unityVersionChangeSet",'--cm')
246246
$installModules = AddModules
247247

248-
if (-not [string]::IsNullOrEmpty($architecture) -and $architecture -ne 'x86_64') {
248+
if (-not [string]::IsNullOrEmpty($architecture)) {
249249
$installArgs += "-a $architecture"
250250
}
251251

0 commit comments

Comments
 (0)