Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 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
19 changes: 14 additions & 5 deletions .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,26 @@ jobs:
echo "ANDROID_NDK_HOME=/tmp/android-ndk-r21e" >> $GITHUB_ENV

- name: Install Unity installer (U3D)
shell: bash
run: gem install u3d -v 1.2.3
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
shell: bash
run: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
uses: nick-invision/retry@v2
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
Expand All @@ -128,6 +136,7 @@ jobs:
swig -version

- name: Build SDK (Android)
timeout-minutes: 90
shell: bash
run: |
# TODO add handling cmake_extras
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,34 @@ jobs:
cd ..

- name: Install Unity installer (U3D)
shell: bash
run: gem install u3d -v 1.2.3
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
shell: bash
run: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
uses: nick-invision/retry@v2
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

- name: Build SDK (iOS)
timeout-minutes: 90
shell: bash
run: |
# TODO add handling cmake_extras
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ jobs:
ruby-version: 3.0.2

- name: Install Unity installer (U3D)
shell: bash
run: gem install u3d -v 1.2.3
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@v2
Expand All @@ -95,9 +99,13 @@ jobs:
sudo apt install openssl

- name: Install Unity
shell: bash
run: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
uses: nick-invision/retry@v2
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
Expand All @@ -108,6 +116,7 @@ jobs:
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV

- name: Build SDK (Linux)
timeout-minutes: 90
shell: bash
run: |
# TODO add handling cmake_extras
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ jobs:
ruby-version: 3.0.2

- name: Install Unity installer (U3D)
shell: bash
run: gem install u3d -v 1.2.3
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@v2
Expand Down Expand Up @@ -101,9 +105,13 @@ jobs:
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl --installed)" >> $GITHUB_ENV

- name: Install Unity
shell: bash
run: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
uses: nick-invision/retry@v2
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
Expand All @@ -114,6 +122,7 @@ jobs:
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV

- name: Build SDK (MacOS)
timeout-minutes: 90
shell: bash
run: |
# TODO add handling cmake_extras
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: Firebase Unity SDK build
on:
schedule:
- cron: "0 7 * * *" # 7am UTC = 11pm PST / 12am PDT

pull_request:
types: [ labeled, closed ]

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -218,7 +221,6 @@ jobs:
uses: ./.github/workflows/package.yml
if: (needs.check_and_prepare.outputs.should_trigger_package == 'true') && !cancelled() && !failure()
with:
triggered_by_callable: true
release_label: ${{ needs.check_and_prepare.outputs.release_label }}
skipIntegrationTests: ${{ needs.check_and_prepare.outputs.skipIntegrationTests }}
build_run_id: ${{ github.run_id }}
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,12 @@ jobs:
ruby-version: 3.0.2

- name: Install Unity installer (U3D)
shell: bash
run: gem install u3d -v 1.2.3
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@v2
Expand Down Expand Up @@ -101,9 +105,13 @@ jobs:
choco install openssl -r

- name: Install Unity
shell: bash
run: |
python scripts/gha/unity_installer.py --install --platforms ${{ inputs.unity_platform_name }} --version ${{ inputs.unity_version }}
uses: nick-invision/retry@v2
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
Expand All @@ -114,6 +122,7 @@ jobs:
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV

- name: Build SDK (Windows)
timeout-minutes: 90
shell: bash
run: |
# TODO add handling cmake_extras
Expand Down
103 changes: 44 additions & 59 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:

workflow_dispatch:
inputs:
packaged_sdk_run_id:
description: 'run # of "Firebase Unity SDK build" workflow'
default: '0'
required: true
unity_versions:
description: 'Unity version'
default: '2019'
Expand All @@ -29,16 +33,10 @@ on:
description: 'Run mobile tests on real and/or virtual devices? (separated by commas)'
default: 'real,virtual'
required: true
sdk_url:
description: 'Download unity sdk from this URL'
default: 'https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_8.7.0.zip'
required: true
use_expanded_matrix:
description: 'Use an expanded matrix? Note: above config will be ignored.'
default: '0'
required: true
test_packaged_sdk:
description: 'Optional: Packaging run # to build against? (sdk_url will be ignored.)'
test_pull_request:
description: 'Optional: Pull request # to build and test? (With optional commit hash, separated by a colon. Specify the FULL hash.)'

Expand Down Expand Up @@ -215,12 +213,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Unity installer (U3D)
timeout-minutes: 10
shell: bash
run: |
gem install u3d -v 1.2.3
u3d available
# u3d available -u ${{ matrix.unity_version }} -p
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
gem install u3d -v 1.2.3
u3d available
- name: Setup python
uses: actions/setup-python@v2
with:
Expand All @@ -231,12 +231,15 @@ jobs:
run: |
pip install -r scripts/gha/requirements.txt
- name: Install Unity
timeout-minutes: 30
shell: bash
run: |
python scripts/gha/unity_installer.py --install \
--platforms ${{ matrix.platform }} \
--version ${{ matrix.unity_version }}
uses: nick-invision/retry@v2
with:
timeout_minutes: 30
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install \
--platforms ${{ matrix.platform }} \
--version ${{ matrix.unity_version }}
- name: Activate Unity license
timeout-minutes: 10
shell: bash
Expand All @@ -254,26 +257,15 @@ jobs:
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
- name: Fetch prebuilt packaged SDK from previous run
uses: dawidd6/action-download-artifact@v2
if: ${{ github.event.inputs.test_packaged_sdk != '' }}
with:
name: 'firebase_unity_sdk.zip'
workflow: 'packaging.yml'
run_id: ${{ github.event.inputs.test_packaged_sdk }}

workflow: 'build_starter.yml'
run_id: ${{ github.event.inputs.packaged_sdk_run_id }}
- name: Build integration tests
timeout-minutes: 180
shell: bash
run: |
if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then
unzip -q firebase_unity_sdk.zip -d ~/Downloads/
else
if [[ -z "${{ github.event.inputs.sdk_url }}" ]];then
sdk_url="https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_8.7.0.zip"
else
sdk_url=${{ github.event.inputs.sdk_url }}
fi
curl ${sdk_url} -o ~/Downloads/firebase_unity_sdk.zip
unzip -q ~/Downloads/firebase_unity_sdk.zip -d ~/Downloads/
fi
unzip -q firebase_unity_sdk.zip -d ~/Downloads/
python scripts/gha/build_testapps.py \
--t ${{ needs.check_and_prepare.outputs.apis }} \
--u $( python scripts/gha/print_matrix_configuration.py -k version -u ${{matrix.unity_version}}) \
Expand Down Expand Up @@ -411,12 +403,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Unity installer (U3D)
timeout-minutes: 10
shell: bash
run: |
gem install u3d
u3d available
# u3d available -u ${{ matrix.unity_version }} -p
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
gem install u3d
u3d available
- name: Setup python
uses: actions/setup-python@v2
with:
Expand All @@ -427,11 +421,14 @@ jobs:
run: |
pip install -r scripts/gha/requirements.txt
- name: Install Unity
timeout-minutes: 30
shell: bash
run: |
python scripts/gha/unity_installer.py --install \
--version ${{ matrix.unity_version }}
uses: nick-invision/retry@v2
with:
timeout_minutes: 15
max_attempts: 3
shell: bash
command: |
python scripts/gha/unity_installer.py --install \
--version ${{ matrix.unity_version }}
- name: Activate Unity license
timeout-minutes: 10
shell: bash
Expand All @@ -449,26 +446,14 @@ jobs:
python scripts/gha/restore_secrets.py --passphrase "${{ secrets.TEST_SECRET }}"
- name: Fetch prebuilt packaged SDK from previous run
uses: dawidd6/action-download-artifact@v2
if: ${{ github.event.inputs.test_packaged_sdk != '' }}
with:
name: 'firebase_unity_sdk.zip'
workflow: 'packaging.yml'
run_id: ${{ github.event.inputs.test_packaged_sdk }}

workflow: 'build_starter.yml'
run_id: ${{ github.event.inputs.packaged_sdk_run_id }}
- name: Run Playmode (in editor mode) integration tests
shell: bash
run: |
if [[ -n "${{ github.event.inputs.test_packaged_sdk }}" ]]; then
unzip -q firebase_unity_sdk.zip -d ~/Downloads/
else
if [[ -z "${{ github.event.inputs.sdk_url }}" ]];then
sdk_url="https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_8.7.0.zip"
else
sdk_url=${{ github.event.inputs.sdk_url }}
fi
curl ${sdk_url} -o ~/Downloads/firebase_unity_sdk.zip
unzip -q ~/Downloads/firebase_unity_sdk.zip -d ~/Downloads/
fi
unzip -q firebase_unity_sdk.zip -d ~/Downloads/
python scripts/gha/build_testapps.py \
--t ${{ needs.check_and_prepare.outputs.apis }} \
--u $( python scripts/gha/print_matrix_configuration.py -k version -u ${{matrix.unity_version}}) \
Expand Down
Loading