Print out where all the zlib locations might be. #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to handle building the Unity SDK on windows | ||
name: Build windows (SubWorkflow) | ||
on: | ||
workflow_call: | ||
inputs: | ||
unity_version: | ||
description: 'Unity version' | ||
default: '2021' | ||
required: true | ||
type: string | ||
firebase_cpp_sdk_version: | ||
description: 'Firebase CPP SDK version to build against (The branch, tag or SHA to checkout)' | ||
default: '' | ||
required: false | ||
type: string | ||
unity_branch: | ||
description: 'Unity branch to build against, empty means current branch' | ||
default: '' | ||
type: string | ||
apis: | ||
description: 'CSV of apis to build and test' | ||
default: 'analytics,app_check,auth,crashlytics,database,dynamic_links,firebaseai,firestore,functions,installations,messaging,remote_config,storage' | ||
required: true | ||
type: string | ||
unity_platform_name: | ||
description: 'The platform name Unity should install with' | ||
default: '' | ||
required: true | ||
type: string | ||
# Additional CMake flags to use | ||
additional_cmake_flags: | ||
description: 'Additional flags to pass into CMake' | ||
default: '' | ||
required: false | ||
type: string | ||
permissions: write-all | ||
jobs: | ||
build_desktop: | ||
name: build-windows-unity${{inputs.unity_version}}-CPP${{ inputs.firebase_cpp_sdk_version }} | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- uses: lukka/get-cmake@latest | ||
with: | ||
cmakeVersion: "~3.31.0" | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
ref: ${{ inputs.unity_branch }} | ||
fetch-depth: 0 | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: firebase/firebase-cpp-sdk | ||
path: firebase-cpp-sdk | ||
submodules: true | ||
ref: ${{ inputs.firebase_cpp_sdk_version }} | ||
fetch-depth: 0 | ||
- name: Support longpaths | ||
run: git config --system core.longpaths true | ||
- name: Setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
- name: Add msbuild to PATH (windows) | ||
uses: microsoft/[email protected] | ||
- name: Install prerequisites | ||
shell: bash | ||
run: | | ||
echo "FIREBASE_CPP_SDK_DIR=${{ github.workspace }}/firebase-cpp-sdk" >> $GITHUB_ENV | ||
cd firebase-cpp-sdk | ||
python scripts/gha/install_prereqs_desktop.py | ||
cd .. | ||
- name: Install python deps | ||
shell: bash | ||
run: | | ||
pip install -r scripts/gha/requirements.txt | ||
- name: Install OpenSSL (Windows) | ||
run: | | ||
choco install openssl -r | ||
- id: unity_setup | ||
uses: ./gha/unity | ||
timeout-minutes: 30 | ||
with: | ||
version: ${{ inputs.unity_version }} | ||
platforms: ${{ inputs.unity_platform_name }} | ||
- name: Setup Swig Env | ||
shell: bash | ||
run: | | ||
echo "$(swig -swiglib)" >> $GITHUB_PATH | ||
swig -swiglib | ||
echo "SWIG_DIR=$(swig -swiglib)" >> $GITHUB_ENV | ||
# mingw has zlib installed, which causes problems for the build, so we remove it | ||
- name: Remove zlib | ||
shell: bash | ||
run: | | ||
find "C:/" -name 'libz*' | ||
rm -f C:/msys64/mingw64/lib/libz* | ||
# Strawberry Perl has zlib within, so we also remove it | ||
- name: Remove Strawberry | ||
shell: bash | ||
run: | | ||
rm -rf C:/Strawberry | ||
- name: Build SDK (Windows) | ||
timeout-minutes: 90 | ||
shell: bash | ||
run: | | ||
# TODO add handling cmake_extras | ||
python scripts/build_scripts/build_zips.py --gha --platform=windows --unity_root="$UNITY_ROOT_DIR" --swig_dir="$SWIG_DIR" --apis=${{ inputs.apis }} | ||
- name: Check zip file | ||
shell: bash | ||
run: | | ||
if [ -f windows_unity/*.zip ]; then | ||
echo "windows_unity zip created." | ||
else | ||
echo "Fail to create windows_unity zip." | ||
exit 1 | ||
fi | ||
- name: Upload Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: windows_unity | ||
path: windows_unity/*.zip |