Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
text=auto
*.sh text eol=lf
59 changes: 59 additions & 0 deletions .github/workflows/build-options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"os": [
"ubuntu-latest",
"windows-latest",
"macos-latest"
],
"unity-version": [
"None",
"4.7.2",
"5.6.7f1 (e80cc3114ac1)",
"2020.3",
"2021.3.x",
"2022.x",
"6000.0.x",
"6000"
],
"include": [
{
"os": "ubuntu-latest",
"build-targets": "StandaloneLinux64, Android, iOS",
"modules": "linux-server"
},
{
"os": "windows-latest",
"build-targets": "StandaloneWindows64, Android, WSAPlayer",
"modules": "windows-server"
},
{
"os": "macos-latest",
"build-targets": "StandaloneOSX Android iOS VisionOS",
"modules": "mac-server"
},
{
"os": "ubuntu-latest",
"unity-version": "2019.4.40f1",
"modules": "None"
},
{
"os": "ubuntu-latest",
"unity-version": "2018.4.36f1 (6cd387d23174)",
"modules": "None"
},
{
"os": "ubuntu-latest",
"unity-version": "2017.4.40f1 (6e14067f8a9a)",
"modules": "None"
}
],
"exclude": [
{
"os": "ubuntu-latest",
"unity-version": "5.6.7f1 (e80cc3114ac1)"
},
{
"os": "ubuntu-latest",
"unity-version": "4.7.2"
}
]
}
37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: build
permissions:
contents: read
on:
workflow_call:
inputs:
matrix:
required: true
type: string
jobs:
build:
name: ${{ matrix.name }}
strategy:
matrix: ${{ fromJSON(inputs.matrix) }}
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
contents: read
env:
UNITY_EDITORS: '' # set by the unity-setup action
UNITY_HUB_PATH: '' # set by the unity-setup action
UNITY_EDITOR_PATH: '' # set by the unity-setup action
UNITY_PROJECT_PATH: '' # set by the unity-setup action
BUILD_OUTPUT_PATH: ${{ github.workspace }}/Builds/${{ matrix.build-target }}
steps:
- uses: actions/checkout@v4
- uses: ./ # buildalon/unity-setup
with:
version-file: 'None'
unity-version: ${{ matrix.unity-version }}
build-targets: ${{ matrix.build-targets }}
modules: ${{ matrix.modules }}
- run: |
echo "UNITY_HUB_PATH: '${{ env.UNITY_HUB_PATH }}'"
echo "UNITY_EDITORS: '${{ env.UNITY_EDITORS }}'"
echo "UNITY_EDITOR_PATH: '${{ env.UNITY_EDITOR_PATH }}'"
echo "UNITY_PROJECT_PATH: '${{ env.UNITY_PROJECT_PATH }}'"
76 changes: 22 additions & 54 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,30 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
setup:
runs-on: ubuntu-latest
permissions:
contents: read
env:
UNITY_EDITORS: '' # set by the unity-setup action
UNITY_HUB_PATH: '' # set by the unity-setup action
UNITY_EDITOR_PATH: '' # set by the unity-setup action
UNITY_PROJECT_PATH: '' # set by the unity-setup action
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
unity-version:
- None
- 5.6.7f1 (e80cc3114ac1)
- 2020.3
- 2021.3.x
- 2022.x
- 6000.0.x
- 6000
include:
- os: ubuntu-latest
build-targets: StandaloneLinux64, Android, iOS
modules: linux-server
- os: windows-latest
build-targets: StandaloneWindows64, Android, WSAPlayer
modules: windows-server
- os: macos-latest
build-targets: StandaloneOSX Android iOS VisionOS
modules: mac-server
- os: ubuntu-latest
unity-version: 2019.4.40f1
modules: None
- os: ubuntu-latest
unity-version: 2018.4.36f1 (6cd387d23174)
modules: None
- os: ubuntu-latest
unity-version: 2017.4.40f1 (6e14067f8a9a)
modules: None
exclude:
# Exclude Unity 5.x for linux as it is not supported
- os: ubuntu-latest
unity-version: '5.6.7f1 (e80cc3114ac1)'
steps:
- uses: actions/checkout@v4

- uses: ./ # buildalon/unity-setup
with:
version-file: 'None'
unity-version: ${{ matrix.unity-version }}
build-targets: ${{ matrix.build-targets }}
modules: ${{ matrix.modules }}

- run: |
echo "UNITY_HUB_PATH: '${{ env.UNITY_HUB_PATH }}'"
echo "UNITY_EDITORS: '${{ env.UNITY_EDITORS }}'"
echo "UNITY_EDITOR_PATH: '${{ env.UNITY_EDITOR_PATH }}'"
echo "UNITY_PROJECT_PATH: '${{ env.UNITY_PROJECT_PATH }}'"
sparse-checkout: .github/
- uses: RageAgainstThePixel/job-builder@v1
id: setup-jobs
with:
build-options: ./.github/workflows/build-options.json
group-by: 'os'
outputs:
jobs: ${{ steps.setup-jobs.outputs.jobs }}
validate:
if: ${{ needs.setup.outputs.jobs }}
needs: setup
name: ${{ matrix.jobs.name }}
permissions:
contents: read
strategy:
matrix: ${{ fromJSON(needs.setup.outputs.jobs) }}
secrets: inherit
uses: ./.github/workflows/build.yml
with:
matrix: ${{ toJSON(matrix.jobs.matrix) }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ steps:
| name | description | required |
| ----------- | ----------- | ----------- |
| `version-file` | Specify a path to search for the unity project version text file. Useful if there are multiple projects in a single repo. Pass `None` if creating a new project to skip file search. | false |
| `unity-version` | Specify the Unity version(s) to install. You must include the changeset! i.e `2019.4.13f1 (518737b1de84)`. ***This will override any version specified in the `version-file`!*** | false |
| `unity-version` | Specify the Unity version(s) to install. example: `2019.4.13f1 (518737b1de84)`. ***This will override any version specified in the `version-file`!*** | false |
| `build-targets` | Specify the build targets to install for. Remaps to corresponding module. One or more of `StandaloneWindows64` `WSAPlayer` `StandaloneOSX` `iOS` `StandaloneLinux64` `Android` `Lumin` `WebGL` `VisionOS`. | false |
| `modules` | Modules to install with the editor. This list can be different per editor version. | false |
| `architecture` | Specify the architecture to install. Either `x86_64` or `arm64`. | false |
Expand All @@ -60,4 +60,4 @@ steps:
- `UNITY_HUB_PATH`: The path to the installed unity hub.
- `UNITY_PROJECT_PATH`: The path to the Unity project.
- `UNITY_EDITOR_PATH`: The path to the last installed version of Unity.
- `UNITY_EDITORS`: A json object of each editor installation `{"version":"path"}`.
- `UNITY_EDITORS`: A json object array of each editor installation `[{"version":"path"},...]`.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
required: false
default: ''
unity-version:
description: 'Specify the Unity version(s) to install. You must include the changeset! i.e `2019.4.13f1 (518737b1de84)`. ***This will override any version specified in the `version-file`!***'
description: 'Specify the Unity version(s) to install. example: `2019.4.13f1 (518737b1de84)`. ***This will override any version specified in the `version-file`!***'
required: false
default: ''
build-targets:
Expand Down
Loading
Loading