OpenToonz - An open-source full-featured 2D animation creation software
C
ci: fix Homebrew Python 3.13 conflict breaking macOS build
Anderson Prado7c4a7879756e
diff --git a/.github/workflows/workflow_macos.yml b/.github/workflows/workflow_macos.ymlindex 0a0ad9821..6ec844a75 100644--- a/.github/workflows/workflow_macos.yml+++ b/.github/workflows/workflow_macos.yml@@ -26,16 +26,19 @@ jobs:steps:- uses: actions/checkout@v4- - name: Remove symlinks+ - name: Clean Python symlinksrun: |- # Remove existing symlinks before installing Python- for symlink in 2to3 idle3 pydoc3 python3 python3-config \- 2to3-3.11 idle3.11 pydoc3.11 python3.11 python3.11-config \- 2to3-3.12 idle3.12 pydoc3.12 python3.12 python3.12-config \- idle3.13 pydoc3.13 python3.13 python3.13-config; do- rm -f /usr/local/bin/$symlink+ # Remove potentially conflicting Python symlinks+ find /usr/local/bin -type l \( -name "python*" -o -name "pip*" -o -name "2to3*" -o -name "idle*" -o -name "pydoc*" \) \+ -exec sh -c 'file -b {} | grep -q "symbolic link to .*Python.framework" && echo "Removing {}" && rm {}' \;+ # Ensure Homebrew Python is properly linked+ if brew list --versions $py_version >/dev/null; then+ brew unlink $py_version || true+ fidone-+ brew link --overwrite --force [email protected] || true+- name: Install librariesrun: |checkPkgAndInstall() {@@ -50,15 +53,12 @@ jobs:brew updatebrew cleanup-checkPkgAndInstall pkg-config glew lz4 libjpeg libpng lzo boost libusb libmypaint ccache jpeg-turbo ninja opencv qt@5brew unlink qt-- name: Set up cacherun: |export PATH="/usr/local/opt/ccache/libexec:$PATH"mkdir -p /Users/runner/.ccache-- uses: actions/cache@v4with:path: /Users/runner/.ccache@@ -70,7 +70,6 @@ jobs:cd thirdparty/tiff-4.0.3CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --disable-lzmamake -j $(sysctl -n hw.ncpu)-- name: Buildrun: |export PKG_CONFIG_PATH="/usr/local/opt/jpeg-turbo/lib/pkgconfig:$PKG_CONFIG_PATH"@@ -84,7 +83,6 @@ jobs:-DCMAKE_PREFIX_PATH=$(brew --prefix qt@5)/lib/cmake/Qt5 \-DWITH_TRANSLATION=OFFninja -j $(sysctl -n hw.ncpu)-- name: Introduce Libraries and Stuffrun: |cd toonz/build/toonz@@ -97,7 +95,6 @@ jobs:-executable=OpenToonz.app/Contents/MacOS/tconverter \-executable=OpenToonz.app/Contents/MacOS/tfarmcontroller \-executable=OpenToonz.app/Contents/MacOS/tfarmserver-- name: Modify Library Pathsrun: |cd toonz/build/toonz/OpenToonz.app/Contents/Frameworks@@ -109,28 +106,22 @@ jobs:fidonedone-- name: Create Artifactrun: |cd toonz/build/toonzecho "Creating DMG..."-ATTEMPT=1until /usr/local/opt/qt@5/bin/macdeployqt OpenToonz.app -dmg -verbose=0 && [ -f OpenToonz.dmg ]; doecho "Attempt $ATTEMPT failed to build DMG."-if [ $ATTEMPT -eq 10 ]; thenecho ">>> DMG file creation failed after 10 attempts. Aborting!"exit 1fi-ATTEMPT=$((ATTEMPT + 1))echo "Retrying in 5 seconds..."sleep 5done-echo "DMG created successfully."-- uses: actions/upload-artifact@v4with:name: Opentoonz-${{ runner.os }}-${{ github.sha }}