Skip to content

Commit

Permalink
Update to test unity 2020 to 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
RyodoTanaka committed Oct 7, 2024
1 parent 3f6ba80 commit d612d83
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 24 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
name: Acquire activation file
name: Acquire multiple activation files
on:
pull_request:
branches:
- master
- master
jobs:
activation:
name: Request manual activation file 🔑
name: Request activation files for multiple Unity versions 🔑
runs-on: ubuntu-latest
strategy:
matrix:
unityVersion:
- 2020.3.48f1
- 2021.3.42f1
- 2022.3.42f1
steps:
# Request manual activation file
- name: Request manual activation file
id: getManualLicenseFile
uses: webbertakken/[email protected]
with:
unityVersion: 2020.1.13f1
# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
# 手動アクティベーションファイルのリクエスト
- name: Request manual activation file for Unity ${{ matrix.unityVersion }}
id: getManualLicenseFile
uses: game-ci/unity-request-manual-activation-file@v4
with:
unityVersion: ${{ matrix.unityVersion }} # Matrixで指定したUnityバージョンを使用

# アーティファクトのアップロード
- name: Expose artifact for Unity ${{ matrix.unityVersion }}
uses: actions/upload-artifact@v4
with:
name: Unity_${{ matrix.unityVersion }}_activation_file # バージョンごとのアーティファクト名
path: ${{ steps.getManualLicenseFile.outputs.filePath }} # ファイルパスを使用
22 changes: 13 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ on:
pull_request:
branches:
- master
- develop

env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

jobs:
testAllModes:
Expand All @@ -23,28 +19,36 @@ jobs:
projectPath:
- ./
unityVersion:
- 2020.1.13f1
- 2020.3.48f1
- 2021.3.42f1
- 2022.3.42f1
testMode:
- all
# - playmode
# - editmode
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
lfs: true
- uses: actions/cache@v1.1.0
- uses: actions/cache@v4
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}
key: Library-${{ matrix.unityVersion }}-${{ matrix.projectPath }}-${{ matrix.testMode }}
restore-keys: |
Library-${{ matrix.unityVersion }}-${{ matrix.projectPath }}
Library-${{ matrix.projectPath }}
Library-
- uses: webbertakken/[email protected]
- uses: actions/download-artifact@v4
with:
name: Unity_${{ matrix.unityVersion }}_activation_file
- uses: game-ci/unity-test-runner@v4
id: tests
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
testMode: ${{ matrix.testMode }}
artifactsPath: ${{ matrix.testMode }}-artifacts
unityLicenses: ${{ secrets.UNITY_LICENSE }} # ライセンスファイルを使う
- uses: actions/upload-artifact@v4
with:
name: Test results for ${{ matrix.testMode }}
Expand Down

0 comments on commit d612d83

Please sign in to comment.