From 08e4e7815a6fa5a420110970f83eb7d97f339c90 Mon Sep 17 00:00:00 2001 From: Bruno Alexandre Rosa <1791393+brunoalr@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:42:27 -0300 Subject: [PATCH] parallelize --- .github/workflows/desktop-build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 44b901073..4a0b309ca 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -313,10 +313,14 @@ jobs: arch: ${{env.QT_ARCH}} modules: ${{env.QT_MODULES}} - - name: Strip arch from Qt libraries + - name: Thin Qt libraries run: | - echo "Stripping arch from Qt libraries" - find $RUNNER_WORKSPACE/Qt -type f -exec sh -c 'file -b --mime-type "$0" | grep -q "application/x-mach-binary"' {} \; -exec lipo {} -thin $(uname -m) -output {} \; + export ARCH=$(uname -m) + export NPROC=$(sysctl -n hw.ncpu) + echo "Thinning Qt libraries to $ARCH using $NPROC cores" + find $RUNNER_WORKSPACE/Qt -type f -print0 | \ + xargs -0 -n1 -P "$NPROC" sh -c \ + 'file -b --mime-type "$0" | grep -q "application/x-mach-binary" && lipo "$0" -thin "$ARCH" -output "$0" || true' - name: Setup vcpkg cache id: vcpkg-cache