Skip to content

Commit

Permalink
Fix test workflows (#632)
Browse files Browse the repository at this point in the history
* Only build mono for windows/mac on linux test builds. Add dedicated server build tests

* Fix typo

* Fix build matrix and upload name

* Remove unsupported unity version
  • Loading branch information
AndrewKahr authored Feb 19, 2024
1 parent f4d2cce commit e820c9c
Show file tree
Hide file tree
Showing 6 changed files with 1,050 additions and 12 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build-tests-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
unityVersion:
- 2021.3.32f1
- 2022.3.13f1
- 2023.1.19f1
- 2023.2.2f1
targetPlatform:
- StandaloneOSX # Build a MacOS executable
Expand All @@ -45,6 +44,13 @@ jobs:
Library-${{ matrix.projectPath }}-macos-
Library-
###########################
# Set Scripting Backend #
###########################
- name: Set Scripting Backend To il2cpp
run: |
mv -f "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" "./test-project/ProjectSettings/ProjectSettings.asset"
###########################
# Build #
###########################
Expand Down
59 changes: 52 additions & 7 deletions .github/workflows/build-tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,49 @@ jobs:
unityVersion:
- 2021.3.32f1
- 2022.3.13f1
- 2023.1.19f1
- 2023.2.2f1
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit) with mono backend.
- StandaloneWindows64 # Build a Windows 64-bit standalone with mono backend.
- StandaloneLinux64 # Build a Linux 64-bit standalone with mono backend.
- iOS # Build an iOS player.
- StandaloneLinux64 # Build a Linux 64-bit standalone with mono/il2cpp backend.
- iOS # Build an iOS project.
- Android # Build an Android .apk.
- WebGL # WebGL.
buildWithIl2cpp:
- false
- true
additionalParameters:
- -param value
- -standaloneBuildSubtarget Server
# Skipping configurations that are not supported
exclude:
# No il2cpp support on Linux Host
- targetPlatform: StandaloneOSX
buildWithIl2cpp: true
- targetPlatform: StandaloneWindows64
buildWithIl2cpp: true
# Only builds with Il2cpp
- targetPlatform: iOS
buildWithIl2cpp: false
- targetPlatform: Android
buildWithIl2cpp: false
- targetPlatform: WebGL
buildWithIl2cpp: false
# No dedicated server support
- targetPlatform: WebGL
additionalParameters: -standaloneBuildSubtarget Server
- targetPlatform: Android
additionalParameters: -standaloneBuildSubtarget Server
- targetPlatform: iOS
additionalParameters: -standaloneBuildSubtarget Server
# No dedicated server support on Linux Host
- targetPlatform: StandaloneOSX
additionalParameters: -standaloneBuildSubtarget Server
# No il2cpp dedicated server support on Linux Host
- targetPlatform: StandaloneWindows64
additionalParameters: -standaloneBuildSubtarget Server
buildWithIl2cpp: true

steps:
- name: Clear Space for Android Build
if: matrix.targetPlatform == 'Android'
Expand All @@ -81,6 +115,14 @@ jobs:
Library-${{ matrix.projectPath }}-ubuntu-
Library-
###########################
# Set Scripting Backend #
###########################
- name: Set Scripting Backend To il2cpp
if: matrix.buildWithIl2cpp == true
run: |
mv -f "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" "./test-project/ProjectSettings/ProjectSettings.asset"
###########################
# Build #
###########################
Expand All @@ -96,8 +138,9 @@ jobs:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue ${{ matrix.additionalParameters }}
providerStrategy: ${{ matrix.providerStrategy }}
allowDirtyBuild: true

- name: Sleep for Retry
if: ${{ steps.build-1.outcome == 'failure' }}
Expand All @@ -117,7 +160,7 @@ jobs:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue ${{ matrix.additionalParameters }}
providerStrategy: ${{ matrix.providerStrategy }}
allowDirtyBuild: true

Expand All @@ -138,7 +181,7 @@ jobs:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue ${{ matrix.additionalParameters }}
providerStrategy: ${{ matrix.providerStrategy }}
allowDirtyBuild: true

Expand All @@ -147,6 +190,8 @@ jobs:
###########################
- uses: actions/upload-artifact@v4
with:
name: Build ${{ matrix.targetPlatform }} on Ubuntu (${{ matrix.unityVersion }})
name:
'Build ${{ matrix.targetPlatform }} on Ubuntu (${{ matrix.unityVersion }}_il2cpp_${{ matrix.buildWithIl2cpp
}}_params_${{ matrix.additionalParameters }})'
path: build
retention-days: 14
8 changes: 7 additions & 1 deletion .github/workflows/build-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
unityVersion:
- 2021.3.32f1
- 2022.3.13f1
- 2023.1.19f1
- 2023.2.2f1
targetPlatform:
- Android # Build an Android apk.
Expand All @@ -47,6 +46,13 @@ jobs:
Library-${{ matrix.projectPath }}-windows-
Library-
###########################
# Set Scripting Backend #
###########################
- name: Set Scripting Backend To il2cpp
run: |
Move-Item -Path "./test-project/ProjectSettings/ProjectSettingsIl2cpp.asset" -Destination "./test-project/ProjectSettings/ProjectSettings.asset" -Force
###########################
# Build #
###########################
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

42 changes: 40 additions & 2 deletions test-project/ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ PlayerSettings:
Android: com.GameCI.TestProject
Standalone: com.GameCI.TestProject
iPhone: com.GameCI.TestProject
tvOS: com.GameCI.TestProject
buildNumber:
Standalone: 0
iPhone: 0
Expand Down Expand Up @@ -462,6 +463,43 @@ PlayerSettings:
m_Height: 1024
m_Kind: 4
m_SubKind: App Store
- m_BuildTarget: tvOS
m_Icons:
- m_Textures: []
m_Width: 1280
m_Height: 768
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 800
m_Height: 480
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 400
m_Height: 240
m_Kind: 0
m_SubKind:
- m_Textures: []
m_Width: 4640
m_Height: 1440
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 2320
m_Height: 720
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 3840
m_Height: 1440
m_Kind: 1
m_SubKind:
- m_Textures: []
m_Width: 1920
m_Height: 720
m_Kind: 1
m_SubKind:
m_BuildTargetBatching:
- m_BuildTarget: Standalone
m_StaticBatching: 1
Expand Down Expand Up @@ -806,8 +844,8 @@ PlayerSettings:
platformArchitecture: {}
scriptingBackend:
Android: 1
Server: 1
Standalone: 1
Server: 0
Standalone: 0
il2cppCompilerConfiguration: {}
managedStrippingLevel: {}
incrementalIl2cppBuild: {}
Expand Down
Loading

0 comments on commit e820c9c

Please sign in to comment.