-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start work on self hosted runner workflow
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Run Tests (Self-Hosted) 🧪 | ||
|
||
env: | ||
ACTIONS_RUNNER_DEBUG: true | ||
ACTIONS_STEP_DEBUG: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- self-hosted-runner | ||
workflow_dispatch: | ||
|
||
jobs: | ||
buildAndTestForSomePlatforms: | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true # Cancel other jobs if another one arrives | ||
name: Test on ${{ matrix.unityVersion }} for ${{ matrix.targetPlatform }} | ||
runs-on: self-hosted | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 1 # Only run one at a time, to prevent license contention | ||
matrix: | ||
projectPath: | ||
- YarnSpinner | ||
unityVersion: | ||
- 2021.3.1f1 | ||
# - 2022.2.1f1 | ||
# - 2023.1.1f1 | ||
targetPlatform: | ||
# - StandaloneOSX # Build a macOS standalone (Intel 64-bit). | ||
- StandaloneWindows64 # Build a Windows 64-bit standalone. | ||
# - StandaloneLinux64 # Build a Linux 64-bit standalone. | ||
# - iOS # Build an iOS player. | ||
# - Android # Build an Android player. | ||
# - WebGL # WebGL. | ||
steps: | ||
- name: Create empty Unity project | ||
run: | | ||
mkdir -p ${{ matrix.projectPath }}/Assets | ||
mkdir -p ${{ matrix.projectPath }}/ProjectSettings | ||
mkdir -p ${{ matrix.projectPath }}/Packages | ||
# Add the Unity Input System package, and configure the new project to use | ||
# both the Input System and the legacy Input Manager. | ||
- name: Add Input System package | ||
run: | | ||
cat <<EOF > ${{ matrix.projectPath }}/ProjectSettings/ProjectSettings.asset | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!129 &1 | ||
PlayerSettings: | ||
activeInputHandler: 2 | ||
EOF | ||
cat <<EOF > ${{ matrix.projectPath }}/Packages/manifest.json | ||
{ | ||
"dependencies": { | ||
"com.unity.inputsystem": "1.0.2", | ||
"com.unity.localization": "1.3.2" | ||
} | ||
} | ||
EOF | ||
- name: Check out to Packages/YarnSpinner | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
path: ${{ matrix.projectPath }}/Packages/YarnSpinner | ||
|