From 6c18fe272f805418d655b2dcb2efc156f6260c4c Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Nov 2023 15:38:59 +0800 Subject: [PATCH 1/6] compile mac arm64 too --- .github/workflows/Release.yml | 47 +++---------------- CI/GitHubBuild.ps1 | 32 +++++++++---- Core/CMakeLists.txt | 4 +- .../bee/Convert/SceneConverter.Material.cpp | 4 +- Core/Source/bee/Convert/SceneConverter.cpp | 2 +- Core/Source/bee/Convert/fbxsdk/String.cpp | 2 +- vcpkg.json | 27 ----------- 7 files changed, 35 insertions(+), 83 deletions(-) delete mode 100644 vcpkg.json diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index e1fa9c9..023533e 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -37,8 +37,8 @@ jobs: with: tag_name: ${{steps.get_release_info.outputs.tag_name}} release_name: ${{steps.get_release_info.outputs.release_name}} - draft: true - prerelease: true + draft: false + prerelease: false release_windows_job: name: Release Windows @@ -62,8 +62,8 @@ jobs: Write-Output "::set-output name=artifact_path::$artifactPath" - id: build name: Build - run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" - shell: pwsh + run: CI/build.sh -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" + shell: bash - id: upload-release-asset name: Upload Release Asset uses: actions/upload-release-asset@v1 @@ -97,43 +97,8 @@ jobs: Write-Output "::set-output name=artifact_path::$artifactPath" - id: build name: Build - run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" - shell: pwsh - - id: upload-release-asset - name: Upload Release Asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.get_release_info_job.outputs.release_upload_url }} - asset_path: ${{ steps.get_this_release_info.outputs.artifact_path }} - asset_name: ${{ steps.get_this_release_info.outputs.artifact_path }} - asset_content_type: application/zip - - release_ubuntu_job: - name: Release Ubuntu - runs-on: ubuntu-latest - needs: get_release_info_job - steps: - - name: Print Debug Info - shell: pwsh - run: | - Write-Host @" - Version: ${{ needs.get_release_info_job.outputs.version }} - Release Upload URL: ${{ needs.get_release_info_job.outputs.release_upload_url }} - "@ - - uses: actions/checkout@v2 - - id: get_this_release_info - shell: pwsh - run: | - #Requires -Version "6.1" - $osName = if ($IsWindows) { "win32" } elseif ($IsLinux) { "ubuntu" } else { "darwin" } - $artifactPath = "FBX-glTF-conv-${{ needs.get_release_info_job.outputs.version }}-$osName.zip" - Write-Output "::set-output name=artifact_path::$artifactPath" - - id: build - name: Build - run: CI/GitHubBuild.ps1 -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" - shell: pwsh + run: CI/build.sh -Version "${{ needs.get_release_info_job.outputs.version }}" -ArtifactPath "${{ steps.get_this_release_info.outputs.artifact_path }}" + shell: bash - id: upload-release-asset name: Upload Release Asset uses: actions/upload-release-asset@v1 diff --git a/CI/GitHubBuild.ps1 b/CI/GitHubBuild.ps1 index 6867a7f..0f7692d 100644 --- a/CI/GitHubBuild.ps1 +++ b/CI/GitHubBuild.ps1 @@ -137,15 +137,29 @@ foreach ($cmakeBuildType in $cmakeBuildTypes) { $defineVersion = if ($Version) { "-DFBX_GLTF_CONV_CLI_VERSION=$Version" } else { "" } - cmake ` - -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" ` - "-DCMAKE_BUILD_TYPE=$cmakeBuildType" ` - -DCMAKE_INSTALL_PREFIX="$cmakeInstallPrefix/$cmakeBuildType" ` - -DFbxSdkHome:STRING="$fbxSdkHome" ` - "-DPOLYFILLS_STD_FILESYSTEM=$polyfillsStdFileSystem" ` - "$defineVersion" ` - "-S." ` - "-B$cmakeBuildDir" + if ($IsMacOS) { + cmake ` + -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" ` + -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ` + "-DCMAKE_BUILD_TYPE=$cmakeBuildType" ` + -DCMAKE_INSTALL_PREFIX="$cmakeInstallPrefix/$cmakeBuildType" ` + -DFbxSdkHome:STRING="$fbxSdkHome" ` + "-DPOLYFILLS_STD_FILESYSTEM=$polyfillsStdFileSystem" ` + "$defineVersion" ` + "-S." ` + "-B$cmakeBuildDir" + } + else { + cmake ` + -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" ` + "-DCMAKE_BUILD_TYPE=$cmakeBuildType" ` + -DCMAKE_INSTALL_PREFIX="$cmakeInstallPrefix/$cmakeBuildType" ` + -DFbxSdkHome:STRING="$fbxSdkHome" ` + "-DPOLYFILLS_STD_FILESYSTEM=$polyfillsStdFileSystem" ` + "$defineVersion" ` + "-S." ` + "-B$cmakeBuildDir" + } # The build type really matters: # https://stackoverflow.com/questions/24460486/cmake-build-type-is-not-being-used-in-cmakelists-txt diff --git a/Core/CMakeLists.txt b/Core/CMakeLists.txt index 5ce8dab..dd39677 100644 --- a/Core/CMakeLists.txt +++ b/Core/CMakeLists.txt @@ -135,8 +135,8 @@ target_include_directories(BeeCore PRIVATE ${CPPCODEC_INCLUDE_DIRS}) find_package(range-v3 CONFIG REQUIRED) target_link_libraries(BeeCore PRIVATE range-v3) -find_package(utf8cpp CONFIG REQUIRED) -target_link_libraries(BeeCore PRIVATE utf8cpp) +#find_package(utf8cpp CONFIG REQUIRED) +#target_link_libraries(BeeCore PRIVATE utf8cpp) install (TARGETS BeeCore DESTINATION "bin") install (FILES $ DESTINATION "lib" OPTIONAL) diff --git a/Core/Source/bee/Convert/SceneConverter.Material.cpp b/Core/Source/bee/Convert/SceneConverter.Material.cpp index 90659fb..b91fda8 100644 --- a/Core/Source/bee/Convert/SceneConverter.Material.cpp +++ b/Core/Source/bee/Convert/SceneConverter.Material.cpp @@ -687,7 +687,7 @@ std::optional SceneConverter::_convertUnknownMaterial( _log(Logger::Level::verbose, fmt::format( "Material property {} is invalid: can only reference to texture", - fbx_property_.GetHierarchicalName())); + fbx_property_.GetHierarchicalName().Buffer())); return {}; } else if (propertyDataType == fbxsdk::FbxCompoundDT) { return dumpCompoundProperty(fbx_property_); @@ -733,7 +733,7 @@ Json SceneConverter::_dumpMaterialProperties( _log(Logger::Level::verbose, fmt::format("Material property {} connected with multiple textures, " "which we can not processed now.", - fbx_property_.GetHierarchicalName())); + fbx_property_.GetHierarchicalName().Buffer())); return {}; } diff --git a/Core/Source/bee/Convert/SceneConverter.cpp b/Core/Source/bee/Convert/SceneConverter.cpp index 83e1097..6050aaa 100644 --- a/Core/Source/bee/Convert/SceneConverter.cpp +++ b/Core/Source/bee/Convert/SceneConverter.cpp @@ -138,7 +138,7 @@ void SceneConverter::_prepareScene() { _splitMeshesResult = split_meshes_per_material(_fbxScene, _fbxGeometryConverter); if (_options.verbose) { for (const auto &splitItem : _splitMeshesResult) { - _log(Logger::Level::verbose, fmt::format("Splitted {} into {}", splitItem.first->GetNameWithNameSpacePrefix(), splitItem.second->GetNameWithNameSpacePrefix())); + _log(Logger::Level::verbose, fmt::format("Splitted {} into {}", splitItem.first->GetNameWithNameSpacePrefix().Buffer(), splitItem.second->GetNameWithNameSpacePrefix().Buffer())); } } if (const auto shouldFixSplittedMeshesName = _options.preserve_mesh_instances || _options.match_mesh_names) { diff --git a/Core/Source/bee/Convert/fbxsdk/String.cpp b/Core/Source/bee/Convert/fbxsdk/String.cpp index b739716..81aa117 100644 --- a/Core/Source/bee/Convert/fbxsdk/String.cpp +++ b/Core/Source/bee/Convert/fbxsdk/String.cpp @@ -1,7 +1,7 @@ #include "./String.h" #define UTF_CPP_CPLUSPLUS 201703L -#include "utf8.h" +#include #include namespace bee { diff --git a/vcpkg.json b/vcpkg.json deleted file mode 100644 index 53421d4..0000000 --- a/vcpkg.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "fbx-gltf-conv", - "version-string": "1.0.0-alpha.0", - "maintainers": [ "Leslie Leigh " ], - "description": "A FBX to glTF file format converter.", - "license": "MIT", - "supports": "windows & osx", - "builtin-baseline": "d1e2ff0c340f89cc14ca67883dd069c6ada93582", - "dependencies": [ - "libxml2", - "zlib", - "nlohmann-json", - "fmt", - "cppcodec", - "range-v3", - "cxxopts", - "glm", - "doctest", - "utfcpp" - ], - "overrides": [ - { - "name": "fmt", - "version": "9.1.0#1" - } - ] -} \ No newline at end of file From 88a37daf8a77415bf210537306cf273657497f87 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Nov 2023 16:39:04 +0800 Subject: [PATCH 2/6] update test action (#2) --- .github/workflows/Test.yml | 26 ++-- CI/build.sh | 255 +++++++++++++++++++++++++++++++++++++ CI/install-fbx-sdk.bat | 11 ++ CI/lipo-dir-merge.py | 61 +++++++++ 4 files changed, 335 insertions(+), 18 deletions(-) create mode 100755 CI/build.sh create mode 100644 CI/install-fbx-sdk.bat create mode 100755 CI/lipo-dir-merge.py diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 945786b..3d17d57 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -4,16 +4,16 @@ on: [pull_request] jobs: test: - name: Test + name: Test on Windows runs-on: windows-latest steps: - uses: actions/checkout@v2 name: Checkout - name: Build - shell: pwsh + shell: bash run: | - CI/GitHubBuild.ps1 + CI/build.sh - name: Run Core Test shell: pwsh @@ -33,10 +33,12 @@ jobs: name: Checkout - name: Build - shell: pwsh + uses: actions/setup-xcode@v3 + with: + version: '14.3.1' + shell: bash run: | - sudo xcode-select --switch /Applications/Xcode_14.3.1.app - CI/GitHubBuild.ps1 + CI/build.sh - name: Upload Artifacts uses: actions/upload-artifact@v3 @@ -61,15 +63,3 @@ jobs: chmod 777 ./out/Release/bin/FBX-glTF-conv ./out/Release/bin/FBX-glTF-conv --help - test_on_ubuntu: - name: Test on Ubuntu - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - name: Checkout - - - name: Build - shell: pwsh - run: | - CI/GitHubBuild.ps1 - diff --git a/CI/build.sh b/CI/build.sh new file mode 100755 index 0000000..8ba0d9c --- /dev/null +++ b/CI/build.sh @@ -0,0 +1,255 @@ +#!/bin/bash + +IsWindows=false +IsMacOS=false +IsLinux=false +is64BitOperatingSystem=false +CurrentDir=$(dirname "$0") + +cmakeInstallPrefix='out/install' +ArtifactPath='' +IncludeDebug=false +Version='' + +# check platform +unameOut="$(uname -s)" +case "${unameOut}" in + Linux*) IsLinux=true;; + Darwin*) IsMacOS=true;; + CYGWIN*) IsWindows=true;; + MINGW*) IsWindows=true;; + *) ;; +esac + +if [ "$(uname -m)" == "x86_64" ]; then + is64BitOperatingSystem=true +fi + +parseArgs() { + args=("$@") + for ((i=0; i<${#args[@]}; i++)); do + case ${args[i]} in + '-ArtifactPath') + ArtifactPath=${args[++i]} + ;; + '-IncludeDebug') + IncludeDebug=true + ;; + '-Version') + Version=${args[++i]} + ;; + *) + ;; + esac + done +} + +printEnvironments() { + cat << EOF +IsWindows: $IsWindows +IsMacOS: $IsMacOS +IsLinux: $IsLinux +Is64BitOperatingSystem: $is64BitOperatingSystem +Current working directory: $(pwd) +ArtifactPath: $ArtifactPath +IncludeDebug: $IncludeDebug +Version: $Version +EOF +} + +installVcpkg() { + vcpkgUrl='https://github.com/microsoft/vcpkg.git' + git clone "$vcpkgUrl" + + if [ "$IsWindows" = true ]; then + ./vcpkg/bootstrap-vcpkg.bat + elif [ "$IsMacOS" = true ] || [ "$IsLinux" = true ]; then + ./vcpkg/bootstrap-vcpkg.sh + if [ "$IsMacOS" = true ]; then + # xcode-select --install + : + fi + else + echo 'vcpkg is not available on target platform.' + exit 1 + fi +} + +downloadFile() { + url="$1" + dest="$2" + + file=$(basename "$dest") + dir=$(dirname "$dest") + mkdir -p "$dir" + + while true; do + curl -L --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36" -o "$file" "$url" + ret=$? + if [ $ret -eq 0 ]; then + mv "$file" "$dest" + break + fi + done +} + +installFbxSdk() { + fbxSdkHome=$(pwd)/fbxsdk/Home + mkdir -p fbxsdk + + if [ "$IsWindows" = true ]; then + fbxSdkUrl='https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-2-1/fbx202021_fbxsdk_vs2019_win.exe' + fbxSdkWindowsInstaller="fbxsdk\\fbxsdk.exe" + + downloadFile "$fbxSdkUrl" "$fbxSdkWindowsInstaller" + + fbxSdkHome_unix=$fbxSdkHome + echo fbxSdkHome_unix=$fbxSdkHome_unix + + fbxSdkHome=$(cygpath -w $fbxSdkHome_unix) + + echo fbxSdkHome=$fbxSdkHome + + cmd "/C CI\install-fbx-sdk.bat $fbxSdkWindowsInstaller $fbxSdkHome" + echo "Installation finished($fbxSdkHome)." + + elif [ "$IsMacOS" = true ]; then + fbxSdkUrl='https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-2-1/fbx202021_fbxsdk_clang_mac.pkg.tgz' + fbxSdkVersion='2020.2.1' + fbxSdkMacOSTarball='./fbxsdk/fbxsdk.pkg.tgz' + + downloadFile "$fbxSdkUrl" "$fbxSdkMacOSTarball" + + tar -zxvf "$fbxSdkMacOSTarball" -C fbxsdk + fbxSdkMacOSPkgFile=$(find fbxsdk -name '*.pkg' -type f) + echo "FBX SDK MacOS pkg: $fbxSdkMacOSPkgFile" + sudo installer -pkg "$fbxSdkMacOSPkgFile" -target / + ln -s "/Applications/Autodesk/FBX SDK/$fbxSdkVersion" fbxsdk/Home + elif [ "$IsLinux" = true ]; then + fbxSdkUrl='https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/2020-2-1/fbx202021_fbxsdk_linux.tar.gz' + fbxSdkTarball=fbxsdk/fbxsdk.tar.gz + + echo "Downloading FBX SDK tar ball from $fbxSdkUrl ..." + downloadFile "$fbxSdkUrl" "$fbxSdkTarball" + tar -zxvf "$fbxSdkTarball" -C fbxsdk + + fbxSdkInstallationProgram=fbxsdk/fbx202021_fbxsdk_linux + chmod ugo+x "$fbxSdkInstallationProgram" + + fbxSdkHomeLocation="$HOME/fbxsdk/install" + echo "Installing from $fbxSdkInstallationProgram..." + mkdir -p "$fbxSdkHomeLocation" + + # This is really a HACK way after many tries... + yes yes | "$fbxSdkInstallationProgram" "$fbxSdkHomeLocation" + echo '' + + echo "Installation finished($fbxSdkHomeLocation)." + else + echo 'FBXSDK is not available on target platform.' + exit 1 + fi + + echo "$fbxSdkHome" +} + +installDependenciesForMacOS() { + # Download both x86-64 and arm-64 libs and merge them into a uniform binary. + # https://www.f-ax.de/dev/2022/11/09/how-to-use-vcpkg-with-universal-binaries-on-macos/ + dependencies=('libxml2' 'zlib' 'fmt' 'nlohmann-json' 'glm' 'cppcodec' 'range-v3' 'cxxopts' 'doctest' 'utfcpp') + for libName in "${dependencies[@]}"; do + ./vcpkg/vcpkg install --triplet=x64-osx "$libName" + ./vcpkg/vcpkg install --triplet=arm64-osx "$libName" + done + + python3 ./CI/lipo-dir-merge.py ./vcpkg/installed/arm64-osx ./vcpkg/installed/x64-osx ./vcpkg/installed/uni-osx +} + +installDependenciesForOthers() { + dependencies=('libxml2' 'zlib' 'fmt' 'nlohmann-json' 'glm' 'cppcodec' 'range-v3' 'cxxopts' 'doctest' 'utfcpp') + for libName in "${dependencies[@]}"; do + ./vcpkg/vcpkg install "$libName" + done +} + +installDependencies() { + if [ "$IsMacOS" = true ]; then + installDependenciesForMacOS + else + installDependenciesForOthers + fi +} + +runCMake() { + buildType="$1" + echo "Build $buildType ..." + cmakeBuildDir="out/build/$buildType" + + polyfillsStdFileSystem='OFF' + if [ "$IsWindows" = false ]; then + polyfillsStdFileSystem='ON' + fi + + defineVersion='' + if [ -n "$Version" ]; then + defineVersion="-DFBX_GLTF_CONV_CLI_VERSION=$Version" + fi + + if [ "$IsMacOS" = true ]; then + echo "fbx home is $fbxSdkHome" + cmake -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" \ + -DCMAKE_PREFIX_PATH="./vcpkg/installed/uni-osx" \ + -DVCPKG_TARGET_TRIPLET="uni-osx" \ + -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ + -DCMAKE_BUILD_TYPE="${buildType}" \ + -DCMAKE_INSTALL_PREFIX="${cmakeInstallPrefix/$buildType}" \ + -DFbxSdkHome:STRING="${fbxSdkHome}" \ + -DPOLYFILLS_STD_FILESYSTEM="${polyfillsStdFileSystem}" \ + "${defineVersion}" \ + -S. -B"${cmakeBuildDir}" + else + cmake -DCMAKE_TOOLCHAIN_FILE="vcpkg/scripts/buildsystems/vcpkg.cmake" \ + -DCMAKE_BUILD_TYPE=$"{buildType}" \ + -DCMAKE_INSTALL_PREFIX="${cmakeInstallPrefix}/${buildType}" \ + -DFbxSdkHome:STRING="${fbxSdkHome}" \ + -DPOLYFILLS_STD_FILESYSTEM="${polyfillsStdFileSystem}" \ + "${defineVersion}" \ + -S. -B"${cmakeBuildDir}" + fi + + cmake --build $cmakeBuildDir --config $buildType + + if [ "$IsWindows" = true ]; then + cmake --build $cmakeBuildDir --config $buildType --target install + else + cmake --install $cmakeBuildDir + fi +} + +build() { + cmakeBuildTypes=('Release') + if [ "$IncludeDebug" = true ]; then + cmakeBuildTypes+=('Debug') + fi + + for buildType in "${cmakeBuildTypes[@]}"; do + runCMake "$buildType" + done + + if [ ! -d "$cmakeInstallPrefix" ] || [ ! -e "$cmakeInstallPrefix" ]; then + echo 'Installation failed.' + exit -1 + fi + + if [ -n "$ArtifactPath" ]; then + # zip -r $ArtifactPath $cmakeInstallPrefix + gzip -cr $cmakeInstallPrefix > $ArtifactPath + fi +} + +parseArgs "$@" +printEnvironments +installFbxSdk +installVcpkg +installDependencies +build \ No newline at end of file diff --git a/CI/install-fbx-sdk.bat b/CI/install-fbx-sdk.bat new file mode 100644 index 0000000..74fff1e --- /dev/null +++ b/CI/install-fbx-sdk.bat @@ -0,0 +1,11 @@ +@echo off + +set arg0=%~1 +set arg1=%~2 + +set installer_exe=%arg0% +set install_dst=%arg1:~0,-1% + +%installer_exe% /S /D=%install_dst% + +exit \ No newline at end of file diff --git a/CI/lipo-dir-merge.py b/CI/lipo-dir-merge.py new file mode 100755 index 0000000..5e2e402 --- /dev/null +++ b/CI/lipo-dir-merge.py @@ -0,0 +1,61 @@ +# Copyright (C) Falko Axmann. All rights reserved. +# Licensed under the GPL v3 license. +# +# This script merges two directories containing static libraries for +# two different architectures into one directory with universal binaries. +# Files that don't end in ".a" will just be copied over from the first directory. +# +# Run it like this: +# `python3 lipo-dir-merge.py ` + +import sys +import shutil +import os +import subprocess + +# +# Make sure we got enough arguments on the command line +# +if len(sys.argv) < 4: + print("Not enough args") + print(f"{sys.argv[0]} ") + sys.exit(-1) + +# This is where we take most of the files from +primary_path = sys.argv[1] +# This is the directory tree from which we take libraries of the alternative arch +secondary_path = sys.argv[2] +# This is where we copy stuff to +destination_path = sys.argv[3] + + +# Merge the libraries at `src1` and `src2` and create a +# universal binary at `dst` +def merge_libs(src1, src2, dst): + subprocess.run(["lipo", "-create", src1, src2, "-output", dst]) + +# Find the library at `src` in the `secondary_path` and then +# merge the two versions, creating a universal binary at `dst`. +def find_and_merge_libs(src, dst): + rel_path = os.path.relpath(src, primary_path) + lib_in_secondary = os.path.join(secondary_path, rel_path) + + if os.path.exists(lib_in_secondary) == False: + print("Lib not found in secondary source: {lib_in_secondary}") + return + + merge_libs(src, lib_in_secondary, dst) + +# Either copy the file at `src` to `dst`, or, if it is a static +# library, merge it with its version from `secondary_path` and +# write the universal binary to `dst`. +def copy_file_or_merge_libs(src, dst, *, follow_symlinks=True): + _, file_ext = os.path.splitext(src) + if file_ext == ".a": + find_and_merge_libs(src, dst) + else: + shutil.copy2(src, dst, follow_symlinks=follow_symlinks) + +# Use copytree to do most of the work, with our own `copy_function` doing a little bit +# of magic in case of static libraries. +shutil.copytree(primary_path, destination_path, copy_function=copy_file_or_merge_libs) \ No newline at end of file From d9a89819c485c4d46c07c78b910efcdee695855a Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Nov 2023 16:49:48 +0800 Subject: [PATCH 3/6] fix test action --- .github/workflows/Test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 3d17d57..bd18cd7 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -30,12 +30,14 @@ jobs: runs-on: macos-11 steps: - uses: actions/checkout@v2 - name: Checkout - - - name: Build + name: + + - name: Set up Xcode uses: actions/setup-xcode@v3 with: version: '14.3.1' + + - name: Build shell: bash run: | CI/build.sh From 2e6880be8994412cff7756db448a71157c32af83 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Nov 2023 16:55:25 +0800 Subject: [PATCH 4/6] fix xcode setup action --- .github/workflows/Test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index bd18cd7..97846df 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -33,9 +33,9 @@ jobs: name: - name: Set up Xcode - uses: actions/setup-xcode@v3 + uses: maxim-lobanov/setup-xcode@v1 with: - version: '14.3.1' + xcode-version: '14.3.1' - name: Build shell: bash From e317890a94afde2b0398250b9b7169d392769b07 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Nov 2023 17:02:50 +0800 Subject: [PATCH 5/6] fix xcode setup action --- .github/workflows/Test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml index 97846df..12b583e 100644 --- a/.github/workflows/Test.yml +++ b/.github/workflows/Test.yml @@ -35,7 +35,7 @@ jobs: - name: Set up Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '14.3.1' + xcode-version: latest-stable - name: Build shell: bash From e49669cb8097d421008d8a7cc902a85712cc10d2 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 22 Nov 2023 18:00:12 +0800 Subject: [PATCH 6/6] fix install path --- CI/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CI/build.sh b/CI/build.sh index 8ba0d9c..7810f2a 100755 --- a/CI/build.sh +++ b/CI/build.sh @@ -202,7 +202,7 @@ runCMake() { -DVCPKG_TARGET_TRIPLET="uni-osx" \ -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \ -DCMAKE_BUILD_TYPE="${buildType}" \ - -DCMAKE_INSTALL_PREFIX="${cmakeInstallPrefix/$buildType}" \ + -DCMAKE_INSTALL_PREFIX="${cmakeInstallPrefix}/${buildType}" \ -DFbxSdkHome:STRING="${fbxSdkHome}" \ -DPOLYFILLS_STD_FILESYSTEM="${polyfillsStdFileSystem}" \ "${defineVersion}" \ @@ -242,7 +242,6 @@ build() { fi if [ -n "$ArtifactPath" ]; then - # zip -r $ArtifactPath $cmakeInstallPrefix gzip -cr $cmakeInstallPrefix > $ArtifactPath fi }