-
Notifications
You must be signed in to change notification settings - Fork 359
105 lines (91 loc) · 3.34 KB
/
build_macos.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Workflow to build EDM4U packages on macOS
name: Build macOS (SubWorkflow)
on:
workflow_call:
inputs:
unity_version:
description: 'Unity version'
default: '2019'
type: string
required: true
env:
pythonVersion: '3.7'
artifactRetentionDays: 2
assetPackageArtifactName: "AssetPackage_macOS"
tarballPackageArtifactName: "TarballPackage_macOS"
jobs:
build_desktop:
name: build-macOS-unity${{ inputs.unity_version}}
runs-on: macos-13
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- id: build_setup
uses: ./gha/build_setup
timeout-minutes: 30
with:
unity_version: ${{ inputs.unity_version }}
platform: macOS
python_version: ${{ env.pythonVersion }}
unity_username: ${{ secrets.UNITY_USERNAME }}
unity_password: ${{ secrets.UNITY_PASSWORD }}
unity_serial_id: ${{ secrets.SERIAL_ID }}
- name: Set Unity Env for EDM4U build script
shell: bash
run: echo "UNITY_EXE=${{ env.UNITY_ROOT_DIR }}/Unity.app/Contents/MacOS/Unity" >> $GITHUB_ENV
- name: Force Java 8
shell: bash
run: echo "JAVA_HOME=${JAVA_HOME_8_X64}" >> $GITHUB_ENV
# Build .unitypackage
- run: ./gradlew buildPlugin --info
# Build .tgz
- run: ./gradlew buildUpmPlugin --info
- name: Return Unity license
if: always()
uses: firebase/firebase-unity-sdk/gha/unity@main
with:
version: ${{ inputs.unity_version }}
release_license: "true"
- name: Check build files
shell: bash
run: |
if [ -f build/external-dependency-manager.unitypackage ]; then
echo "external-dependency-manager.unitypackage zip created."
else
echo "Fail to create external-dependency-manager.unitypackage."
exit 1
fi
if ls build/com.google.external-dependency-manager*.tgz 1> /dev/null 2>&1; then
echo "com.google.external-dependency-manager.tgz created."
else
echo "Fail to create com.google.external-dependency-manager.tgz ."
exit 1
fi
- name: Upload build results artifact
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: ${{ env.assetPackageArtifactName }}
path: build/external-dependency-manager.unitypackage
retention-days: ${{ env.artifactRetentionDays }}
- name: Upload build results artifact
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: ${{ env.tarballPackageArtifactName }}
path: build/com.google.external-dependency-manager-*.tgz
retention-days: ${{ env.artifactRetentionDays }}