Skip to content

Commit

Permalink
[unity]ut的unity_modules和install_path可定制
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Oct 8, 2024
1 parent ac895ba commit 9d5ac6b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/composites/unity-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ inputs:
required:
cachekey:
required:
install_path:
required:
unity_modules:
required:
UNITY_USERNAME:
required:
UNITY_PASSWORD:
Expand All @@ -20,29 +24,29 @@ runs:
- uses: actions/cache/restore@v3
id: cache-unity
with:
path: C:/UNITY
path: ${{ inputs.install_path }}
key: ${{ inputs.os }}-${{ inputs.cachekey }}-unity
- name: MKDIR
if: steps.cache-unity.outputs.cache-hit != 'true'
shell: bash
run: mkdir C:/UNITY
run: mkdir ${{ inputs.install_path }}
- name: Setup Unity
if: steps.cache-unity.outputs.cache-hit != 'true'
uses: kuler90/setup-unity@v1
with:
unity-modules: windows-il2cpp
unity-modules: ${{ inputs.unity_modules }}
unity-version: ${{ inputs.version }}
install-path: C:/UNITY
install-path: ${{ inputs.install_path }}
- uses: actions/cache/save@v3
if: steps.cache-unity.outputs.cache-hit != 'true'
with:
path: C:/UNITY
path: ${{ inputs.install_path }}
key: ${{ inputs.os }}-${{ inputs.cachekey }}-unity

- name: Activate Unity
uses: kuler90/[email protected]
with:
unity-path: C:/UNITY/${{ inputs.version }}/Editor/Unity.exe
unity-path: ${{ inputs.install_path }}/${{ inputs.version }}/Editor/Unity.exe
unity-username: ${{ inputs.UNITY_USERNAME }}
unity-password: ${{ inputs.UNITY_PASSWORD }}
unity-serial: ${{ inputs.UNITY_SERIAL }}
2 changes: 2 additions & 0 deletions .github/workflows/unity_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
os: 'win'
version: '2021.3.16f1'
cachekey: '2021'
install_path: C:/UNITY
unity_modules: windows-il2cpp
UNITY_USERNAME: ${{ secrets.UNITY_USERNAME }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
Expand Down

0 comments on commit 9d5ac6b

Please sign in to comment.