Skip to content

Create Unity GHA and apply to all the workflows #512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 48 commits into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
b36d6c8
merge unity installation & activation
sunmou99 Sep 7, 2022
065b4da
merge unity installation & activation
sunmou99 Sep 7, 2022
37c6721
add platform installation info
sunmou99 Sep 7, 2022
cb08667
uses unity github action
sunmou99 Sep 8, 2022
d918060
update gha path
sunmou99 Sep 8, 2022
a433708
update gha
sunmou99 Sep 8, 2022
4b4119e
update gha
sunmou99 Sep 8, 2022
3ea2eb1
update gha
sunmou99 Sep 8, 2022
8e32c87
update gha
sunmou99 Sep 8, 2022
6244f81
update gha
sunmou99 Sep 8, 2022
1be2fee
update gha
sunmou99 Sep 8, 2022
c69efc1
update gha
sunmou99 Sep 8, 2022
7f73b74
Return Unity license
sunmou99 Sep 9, 2022
3850349
update check
sunmou99 Sep 9, 2022
3282f68
update check
sunmou99 Sep 9, 2022
5d5f727
readme
sunmou99 Sep 9, 2022
5ab3cd2
merge main
sunmou99 Oct 31, 2022
6280134
test latest u3d version
sunmou99 Oct 31, 2022
7d23b46
test latest u3d version
sunmou99 Oct 31, 2022
56b9f3b
test env
sunmou99 Oct 31, 2022
4639867
test env
sunmou99 Oct 31, 2022
0c2211f
shell: bash
sunmou99 Oct 31, 2022
597e58a
test
sunmou99 Oct 31, 2022
563288f
test 1.3.0
sunmou99 Oct 31, 2022
53de1cf
test 1.2.3
sunmou99 Oct 31, 2022
bd23ce7
test ruby 2.6.10
sunmou99 Oct 31, 2022
daee4dc
move unity gha path
sunmou99 Nov 1, 2022
acf2db8
test playmode
sunmou99 Nov 1, 2022
32b4560
build android
sunmou99 Nov 1, 2022
0d6182d
update u3d version
sunmou99 Nov 1, 2022
cc0e4d8
use unity gha
sunmou99 Nov 1, 2022
b394b6e
decouple unity installation
sunmou99 Nov 1, 2022
0577f32
remove unity setting from print_matrix_CONFIG
sunmou99 Nov 2, 2022
00fbe69
fix unity path
sunmou99 Nov 2, 2022
e4cacc5
add unity_path to the env
sunmou99 Nov 2, 2022
0182baf
remove some env
sunmou99 Nov 2, 2022
ba59c81
update return value
sunmou99 Nov 2, 2022
c2c7642
add tvos to unity gha
sunmou99 Nov 2, 2022
9162aed
test output
sunmou99 Nov 2, 2022
afb24fe
fix output
sunmou99 Nov 2, 2022
7362691
remove debug code
sunmou99 Nov 2, 2022
e1c8ee1
update android ndk patch
sunmou99 Nov 2, 2022
951b76d
update unity gha output
sunmou99 Nov 2, 2022
bbe948e
update unity gha output
sunmou99 Nov 2, 2022
3f4badd
remove env
sunmou99 Nov 2, 2022
4b45c50
active unity license for playmode
sunmou99 Nov 2, 2022
e90453b
add read me
sunmou99 Nov 2, 2022
12d50fe
update based on comments
sunmou99 Nov 2, 2022
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
30 changes: 4 additions & 26 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ jobs:
strategy:
fail-fast: false
env:
# LC_ALL, LANG and U3D_PASSWORD are needed for U3D.
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
U3D_PASSWORD: ""
# Disable checking for U3D updates, since it is buggy
U3D_SKIP_UPDATE_CHECK: 1
CCACHE_DIR: ${{ github.workspace }}/ccache_dir

steps:
Expand Down Expand Up @@ -103,32 +97,16 @@ jobs:
echo "NDK_ROOT=/tmp/android-ndk-r21e" >> $GITHUB_ENV
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV

- name: Install Unity installer (U3D)
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: gem install u3d -v 1.2.3

- name: Install python deps
shell: bash
run: |
pip install -r scripts/gha/requirements.txt

- name: Install Unity
uses: nick-invision/retry@v2
- id: unity_setup
uses: firebase/firebase-unity-sdk/gha/unity@unity-gha
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}

- name: Setup Unity path
shell: bash
run: |
echo "UNITY_ROOT_DIR=$( python scripts/gha/print_matrix_configuration.py -u ${{ inputs.unity_version }} -k unity_path )" >> $GITHUB_ENV
version: ${{ inputs.unity_version }}
platforms: ${{ inputs.unity_platform_name }}

- name: Display Swig Version
shell: bash
Expand Down
30 changes: 4 additions & 26 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
fail-fast: false

env:
# LC_ALL, LANG and U3D_PASSWORD are needed for U3D.
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
U3D_PASSWORD: ""
# Disable checking for U3D updates, since it is buggy
U3D_SKIP_UPDATE_CHECK: 1
xcodeVersion: "13.3.1"

steps:
Expand Down Expand Up @@ -82,32 +76,16 @@ jobs:
python scripts/gha/install_prereqs_desktop.py
cd ..

- name: Install Unity installer (U3D)
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: gem install u3d -v 1.2.3

- name: Install python deps
shell: bash
run: |
pip install -r scripts/gha/requirements.txt

- name: Install Unity
uses: nick-invision/retry@v2
- id: unity_setup
uses: firebase/firebase-unity-sdk/gha/unity@unity-gha
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}

- name: Setup Unity path
shell: bash
run: |
echo "UNITY_ROOT_DIR=$( python scripts/gha/print_matrix_configuration.py -u ${{ inputs.unity_version }} -k unity_path )" >> $GITHUB_ENV
version: ${{ inputs.unity_version }}
platforms: ${{ inputs.unity_platform_name }}

- name: Build SDK (iOS)
timeout-minutes: 90
Expand Down
29 changes: 5 additions & 24 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ jobs:
strategy:
fail-fast: false

env:
# LC_ALL, LANG and U3D_PASSWORD are needed for U3D.
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
U3D_PASSWORD: ""
# Disable checking for U3D updates, since it is buggy
U3D_SKIP_UPDATE_CHECK: 1
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -68,14 +61,6 @@ jobs:
with:
ruby-version: 3.0.2

- name: Install Unity installer (U3D)
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: gem install u3d -v 1.2.3

- name: Setup python
uses: actions/setup-python@v4
with:
Expand All @@ -98,19 +83,15 @@ jobs:
run: |
sudo apt install openssl

- name: Install Unity
uses: nick-invision/retry@v2
- id: unity_setup
uses: firebase/firebase-unity-sdk/gha/unity@unity-gha
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
version: ${{ inputs.unity_version }}
platforms: ${{ inputs.unity_platform_name }}

- name: Setup Unity path
- name: Setup Env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: seems it's only setup swig related environment, so let's be a bit more specific, set the name to Setup Swig Env

shell: bash
run: |
echo "UNITY_ROOT_DIR=$( python scripts/gha/print_matrix_configuration.py -u ${{inputs.unity_version}} -k unity_path )" >> $GITHUB_ENV
echo "$(swig -swiglib)" >> $GITHUB_PATH
swig -swiglib
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV
Expand Down
31 changes: 6 additions & 25 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ jobs:
runs-on: macos-latest
strategy:
fail-fast: false

env:
# LC_ALL, LANG and U3D_PASSWORD are needed for U3D.
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
U3D_PASSWORD: ""
# Disable checking for U3D updates, since it is buggy
U3D_SKIP_UPDATE_CHECK: 1

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -68,14 +61,6 @@ jobs:
with:
ruby-version: 3.0.2

- name: Install Unity installer (U3D)
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: gem install u3d -v 1.2.3

- name: Setup python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -104,19 +89,15 @@ jobs:
# brew won't overwrite MacOS system default OpenSSL, so force it here.
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl --installed)" >> $GITHUB_ENV

- name: Install Unity
uses: nick-invision/retry@v2
- id: unity_setup
uses: firebase/firebase-unity-sdk/gha/unity@unity-gha
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
version: ${{ inputs.unity_version }}
platforms: ${{ inputs.unity_platform_name }}

- name: Setup Unity path
- name: Setup Env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

shell: bash
run: |
echo "UNITY_ROOT_DIR=$( python scripts/gha/print_matrix_configuration.py -u ${{ inputs.unity_version }} -k unity_path )" >> $GITHUB_ENV
echo "$(swig -swiglib)" >> $GITHUB_PATH
swig -swiglib
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV
Expand Down
30 changes: 4 additions & 26 deletions .github/workflows/build_tvos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ jobs:
fail-fast: false

env:
# LC_ALL, LANG and U3D_PASSWORD are needed for U3D.
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
U3D_PASSWORD: ""
# Disable checking for U3D updates, since it is buggy
U3D_SKIP_UPDATE_CHECK: 1
xcodeVersion: "13.3.1"

steps:
Expand Down Expand Up @@ -103,14 +97,6 @@ jobs:
python scripts/gha/install_prereqs_desktop.py
cd ..

- name: Install Unity installer (U3D)
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: gem install u3d -v 1.2.3

- name: Install python deps
shell: bash
run: |
Expand All @@ -122,19 +108,11 @@ jobs:
run: |
pod repo add cocoapods https://github.com/CocoaPods/Specs.git

- name: Install Unity
uses: nick-invision/retry@v2
- id: unity_setup
uses: firebase/firebase-unity-sdk/gha/unity@unity-gha
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}

- name: Setup Unity path
shell: bash
run: |
echo "UNITY_ROOT_DIR=$( python scripts/gha/print_matrix_configuration.py -u ${{ inputs.unity_version }} -k unity_path )" >> $GITHUB_ENV
version: ${{ inputs.unity_version }}
platforms: ${{ inputs.unity_platform_name }}

- name: Build SDK (tvOS)
timeout-minutes: 90
Expand Down
31 changes: 6 additions & 25 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ jobs:
runs-on: windows-2019
strategy:
fail-fast: false

env:
# LC_ALL, LANG and U3D_PASSWORD are needed for U3D.
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
U3D_PASSWORD: ""
# Disable checking for U3D updates, since it is buggy
U3D_SKIP_UPDATE_CHECK: 1

steps:
- uses: actions/checkout@v3
with:
Expand All @@ -71,14 +64,6 @@ jobs:
with:
ruby-version: 3.0.2

- name: Install Unity installer (U3D)
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: gem install u3d -v 1.2.3

- name: Setup python
uses: actions/setup-python@v4
with:
Expand All @@ -104,19 +89,15 @@ jobs:
run: |
choco install openssl -r

- name: Install Unity
uses: nick-invision/retry@v2
- id: unity_setup
uses: firebase/firebase-unity-sdk/gha/unity@unity-gha
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
version: ${{ inputs.unity_version }}
platforms: ${{ inputs.unity_platform_name }}

- name: Setup Unity path
- name: Setup Env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

shell: bash
run: |
echo "UNITY_ROOT_DIR=$( python scripts/gha/print_matrix_configuration.py -u ${{inputs.unity_version}} -k unity_path )" >> $GITHUB_ENV
echo "$(swig -swiglib)" >> $GITHUB_PATH
swig -swiglib
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV
Expand Down
Loading