Преглед изворни кода

Speeding up macOS and iOS builds (#1854)

* Speeding up macOS and iOS builds by correctly specifying the number of threads to use
* Updated to latest emscripten and node version
Jorrit Rouwe пре 4 недеља
родитељ
комит
32996b0bdd
2 измењених фајлова са 13 додато и 12 уклоњено
  1. 6 5
      .github/workflows/build.yml
  2. 7 7
      .github/workflows/determinism_check.yml

+ 6 - 5
.github/workflows/build.yml

@@ -13,7 +13,8 @@ on:
       - '**.md'
 
 env:
-  EMSCRIPTEN_VERSION: 3.1.64
+  EMSCRIPTEN_VERSION: 4.0.22
+  NODE_VERSION: 24.x
   UBUNTU_CLANG_VERSION: clang++-18
   UBUNTU_GCC_VERSION: g++-14
 
@@ -404,7 +405,7 @@ jobs:
         source ${VULKAN_SDK_INSTALL}/setup-env.sh
         cmake -B ${{github.workspace}}/Build/MacOS_${{matrix.build_type}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=clang++ Build
     - name: Build
-      run: cmake --build ${{github.workspace}}/Build/MacOS_${{matrix.build_type}} -j $(nproc)
+      run: cmake --build ${{github.workspace}}/Build/MacOS_${{matrix.build_type}} -j $(sysctl -n hw.ncpu)
     - name: Test
       working-directory: ${{github.workspace}}/Build/MacOS_${{matrix.build_type}}
       run: |
@@ -441,7 +442,7 @@ jobs:
     - name: Configure CMake
       run: cmake -B ${{github.workspace}}/Build/XCode_iOS -DTARGET_HELLO_WORLD=OFF -DTARGET_PERFORMANCE_TEST=OFF -DCMAKE_SYSTEM_NAME=iOS -GXcode Build
     - name: Build
-      run: cmake --build ${{github.workspace}}/Build/XCode_iOS -- -sdk iphonesimulator -arch x86_64
+      run: cmake --build ${{github.workspace}}/Build/XCode_iOS -- -sdk iphonesimulator -arch arm64 -j $(sysctl -n hw.ncpu)
 
   emscripten:
     runs-on: ubuntu-latest
@@ -456,10 +457,10 @@ jobs:
         version: ${{env.EMSCRIPTEN_VERSION}}
     - name: Verify emsdk
       run: emcc -v
-    - name: Setup Node.js 18.x
+    - name: Setup Node.js ${{env.NODE_VERSION}}
       uses: actions/setup-node@v6
       with:
-        node-version: 18.x
+        node-version: ${{env.NODE_VERSION}}
     - name: Configure CMake
       working-directory: ${{github.workspace}}/Build
       run: ./cmake_linux_emscripten.sh Distribution -DTARGET_HELLO_WORLD=OFF -DTARGET_PERFORMANCE_TEST=OFF

+ 7 - 7
.github/workflows/determinism_check.yml

@@ -5,8 +5,8 @@ env:
   RAGDOLL_HASH: '0xc392d8f867b0be5b'
   PYRAMID_HASH: '0xafd93b295e75e3f6'
   CHARACTER_VIRTUAL_HASH: '0x19c55223035a8f1a'
-  EMSCRIPTEN_VERSION: 4.0.2
-  NODE_VERSION: 23.x
+  EMSCRIPTEN_VERSION: 4.0.22
+  NODE_VERSION: 24.x
   UBUNTU_CLANG_VERSION: clang++-18
   UBUNTU_GCC_VERSION: g++-14
   UBUNTU_GCC_AARCH64_VERSION: aarch64-linux-gnu-g++-14
@@ -433,16 +433,16 @@ jobs:
       run: cmake --build ${{github.workspace}}/Build/WASM_Distribution -j $(nproc)
     - name: Unit Tests
       working-directory: ${{github.workspace}}/Build/WASM_Distribution
-      run: node --experimental-wasm-memory64 UnitTests.js
+      run: node UnitTests.js
     - name: Test ConvexVsMesh
       working-directory: ${{github.workspace}}/Build/WASM_Distribution
-      run: node --experimental-wasm-memory64 PerformanceTest.js -q=LinearCast -t=max -s=ConvexVsMesh -validate_hash=${CONVEX_VS_MESH_HASH}
+      run: node PerformanceTest.js -q=LinearCast -t=max -s=ConvexVsMesh -validate_hash=${CONVEX_VS_MESH_HASH}
     - name: Test Ragdoll
       working-directory: ${{github.workspace}}/Build/WASM_Distribution
-      run: node --experimental-wasm-memory64 PerformanceTest.js -q=LinearCast -t=max -s=Ragdoll -validate_hash=${RAGDOLL_HASH}
+      run: node PerformanceTest.js -q=LinearCast -t=max -s=Ragdoll -validate_hash=${RAGDOLL_HASH}
     - name: Test Pyramid
       working-directory: ${{github.workspace}}/Build/WASM_Distribution
-      run: node --experimental-wasm-memory64 PerformanceTest.js -q=LinearCast -t=max -s=Pyramid -validate_hash=${PYRAMID_HASH}
+      run: node PerformanceTest.js -q=LinearCast -t=max -s=Pyramid -validate_hash=${PYRAMID_HASH}
     - name: Test CharacterVirtual
       working-directory: ${{github.workspace}}/Build/WASM_Distribution
-      run: node --experimental-wasm-memory64 PerformanceTest.js -q=Discrete -t=max -s=CharacterVirtual -validate_hash=${CHARACTER_VIRTUAL_HASH}
+      run: node PerformanceTest.js -q=Discrete -t=max -s=CharacterVirtual -validate_hash=${CHARACTER_VIRTUAL_HASH}