From 67d37c9ed54b1e44105536c2aa3e60c723e27f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 1 Jul 2022 19:50:22 +0200 Subject: [PATCH] package/ci: build in parallel also on iOS. FUCKING stupid defaults. CMake's default no less stupid. I'm MAD, why would anybody even want to have the build run sequentially on todays machines?! If your build is crap and can't run in parallel, FIX YOUR CODE, but don't make the other 99% users suffer!! --- package/ci/circleci.yml | 4 ++++ package/ci/ios-simulator-gles.sh | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package/ci/circleci.yml b/package/ci/circleci.yml index bed75dea3..f82254895 100644 --- a/package/ci/circleci.yml +++ b/package/ci/circleci.yml @@ -589,6 +589,10 @@ jobs: environment: # STUPID yml interprets unquoted ON as a boolean TARGET_GLES2: "OFF" + # Yep, xcodebuild is beyond stupid and just DOESN'T build in parallel by + # default. The default medium resource class has 4 CPUs and Ninja uses + # -j6, so do the same for xcodebuild. + XCODE_JOBS: 6 steps: - install-base-macos: extra: xcbeautify diff --git a/package/ci/ios-simulator-gles.sh b/package/ci/ios-simulator-gles.sh index c12e411cf..0da3aed51 100755 --- a/package/ci/ios-simulator-gles.sh +++ b/package/ci/ios-simulator-gles.sh @@ -32,7 +32,7 @@ cmake .. \ -DCORRADE_TESTSUITE_TARGET_XCTEST=ON \ -DCORRADE_WITH_INTERCONNECT=OFF \ -G Xcode -set -o pipefail && cmake --build . --config Release --target install | xcbeautify +set -o pipefail && cmake --build . --config Release --target install -j$XCODE_JOBS | xcbeautify cd ../.. # Crosscompile SDL. On 2022-14-02 curl says the certificate is expired, so @@ -41,7 +41,7 @@ cd ../.. curl --insecure -O https://www.libsdl.org/release/SDL2-2.0.10.tar.gz tar -xzvf SDL2-2.0.10.tar.gz cd SDL2-2.0.10/Xcode-iOS/SDL -set -o pipefail && xcodebuild -sdk iphonesimulator13.7 | xcbeautify +set -o pipefail && xcodebuild -sdk iphonesimulator13.7 -jobs $XCODE_JOBS -parallelizeTargets | xcbeautify cp build/Release-iphonesimulator/libSDL2.a $HOME/deps/lib mkdir -p $HOME/deps/include/SDL2 cp -R ../../include/* $HOME/deps/include/SDL2 @@ -78,11 +78,11 @@ cmake .. \ -DMAGNUM_BUILD_TESTS=ON \ -DMAGNUM_BUILD_GL_TESTS=ON \ -G Xcode -set -o pipefail && cmake --build . --config Release | xcbeautify +set -o pipefail && cmake --build . --config Release -j$XCODE_JOBS | xcbeautify # TODO: find a better way to avoid # Library not loaded: /System/Library/Frameworks/OpenGLES.framework/OpenGLES # error DYLD_FALLBACK_LIBRARY_PATH="/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/OpenGLES.framework" DYLD_FALLBACK_FRAMEWORK_PATH="/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 12.4.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks" CORRADE_TEST_COLOR=ON ctest -V -C Release -E "GLTest|GLBenchmark" # Test install, after running the tests as for them it shouldn't be needed -set -o pipefail && cmake --build . --config Release --target install | xcbeautify +set -o pipefail && cmake --build . --config Release --target install -j$XCODE_JOBS | xcbeautify