Skip to content

Commit

Permalink
Fix BuildTarget mapping for macOS and StandaloneOSX
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfoconnor committed Aug 11, 2022
1 parent 85e91bd commit 8dfc118
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/mac-build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- 2020.3.24f1
targetPlatform:
- StandaloneOSX # Build a MacOS executable
- iOS

steps:
###########################
Expand All @@ -36,9 +37,9 @@ jobs:
- uses: actions/cache@v2
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-macos-${{ matrix.targetPlatform }}
key: Library-${{ matrix.projectPath }}-${{ runner.os }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-macos-
Library-${{ matrix.projectPath }}-${{ runner.os }}-
Library-
###########################
Expand Down Expand Up @@ -69,6 +70,6 @@ jobs:
###########################
- uses: actions/upload-artifact@v2
with:
name: Build MacOS (${{ matrix.unityVersion }})
name: Build ${{ matrix.targetPlatform }} (${{ matrix.unityVersion }})
path: build
retention-days: 14
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/model/platform-setup/setup-mac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ class SetupMac {
case 'Android':
command += '--module android ';
break;
case 'MacOS':
case 'StandaloneOSX':
command += '--module mac-il2cpp ';
break;
case 'WebGL':
command += '--module webgl ';
break;
default:
// Consider adding support for all valid targetPlatforms
// https://docs.unity3d.com/ScriptReference/BuildTarget.html
throw new Error(`Unsupported module for target platform: ${targetPlatform}.`);
}

Expand Down

0 comments on commit 8dfc118

Please sign in to comment.