diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml index b2b6d58bdc..71f996eb40 100644 --- a/.github/workflows/build-wasm.yml +++ b/.github/workflows/build-wasm.yml @@ -5,7 +5,7 @@ on: workflow_call: jobs: wasm32-emscripten: - name: Build (${{ github.event.inputs.threading || inputs.threading }}) + name: Build runs-on: ubuntu-latest steps: - name: Checkout shards @@ -20,11 +20,15 @@ jobs: repository: emscripten-core/emsdk path: emsdk fetch-depth: 1 - - name: Download shards artifact - uses: actions/download-artifact@v4 - with: - name: shards-linux Release - path: build_host + # - name: Download shards artifact + # uses: actions/download-artifact@v4 + # with: + # name: shards-linux Release + # path: build_host + - name: Download shards + run: | + mkdir -p build_host + wget -O build_host/shards https://develop.fragcolor.com/shards-linux-release - name: Make shards executable run: | # Shards interpreter @@ -48,6 +52,8 @@ jobs: rustup toolchain install $RUSTUP_TOOLCHAIN rustup +$RUSTUP_TOOLCHAIN target add wasm32-unknown-emscripten + which ninja + # Use the prebuilt SDK tools/binaries (MAKE SURE VERSION IS COMPATIBLE) pushd emsdk ./emsdk install 4.0.1 @@ -56,8 +62,11 @@ jobs: cat ./.emscripten export EM_CONFIG=$PWD/.emscripten echo "EM_CONFIG=$EM_CONFIG" >> $GITHUB_ENV + echo "EMSCRIPTEN_ROOT=$PWD/upstream/emscripten" >> $GITHUB_ENV popd + which ninja + # - name: Set up emscripten fork # run: | # # Use custom fork for js/scripts (this is picked up by the cmake script) @@ -74,10 +83,14 @@ jobs: rustup +nightly component add rust-src - name: Build run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DNODEJS=1 -DSKIP_HEAVY_INLINE=1 -DUSE_LTO=0 -DRUST_USE_LTO=0 -DEMSCRIPTEN_PTHREADS=${{ steps.setup.outputs.threading == 'mt' }} -DEMSCRIPTEN_IDBFS=1 -DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN_ROOT/cmake/Modules/Platform/Emscripten.cmake - cmake --build shards --target shards + which ninja + + cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DSKIP_HEAVY_INLINE=1 -DUSE_LTO=0 -DRUST_USE_LTO=0 -DEMSCRIPTEN_PTHREADS=ON -DCMAKE_TOOLCHAIN_FILE=$EMSCRIPTEN_ROOT/cmake/Modules/Platform/Emscripten.cmake + cmake --build build --target shards echo "SHARDS_BUILD=$(pwd)/build" >> $GITHUB_ENV + + which ninja # Node LTS v16.15.0 freezes during exit on the st build, using version 18 works - uses: actions/setup-node@v3 with: @@ -93,7 +106,6 @@ jobs: # Spawn the test server ./run_server - source shards/tests/web/shared function queue_test() { @@ -123,8 +135,8 @@ jobs: # Copy distribution symbols pushd $SHARDS_BUILD mkdir dist - cp shards-mt.wasm shards/ - cp shards-mt.js shards/ + cp shards-mt.wasm dist/ + cp shards-mt.js dist/ - name: Upload artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 977b3a472a..e25ce67681 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,96 +24,97 @@ jobs: # Build shards for emscripten # wasm32-emscripten-mt: - needs: [Setup, Linux-Release] + # needs: [Setup, Linux-Release] + needs: [Setup] uses: ./.github/workflows/build-wasm.yml secrets: inherit # # Build shards for linux # - Linux-Debug: - needs: Setup - uses: ./.github/workflows/build-linux.yml - secrets: inherit - with: - build-type: Debug - run-tests: true - Linux-Release: - needs: Setup - uses: ./.github/workflows/build-linux.yml - secrets: inherit - with: - build-type: Release - run-tests: true - MacOS-GPU: - needs: Setup - uses: ./.github/workflows/test-macos-gpu.yml - secrets: inherit - with: - build-type: Debug - Codecov: - needs: [Linux-Debug, MacOS-GPU] - uses: ./.github/workflows/codecov.yml - secrets: inherit + # Linux-Debug: + # needs: Setup + # uses: ./.github/workflows/build-linux.yml + # secrets: inherit + # with: + # build-type: Debug + # run-tests: true + # Linux-Release: + # needs: Setup + # uses: ./.github/workflows/build-linux.yml + # secrets: inherit + # with: + # build-type: Release + # run-tests: true + # MacOS-GPU: + # needs: Setup + # uses: ./.github/workflows/test-macos-gpu.yml + # secrets: inherit + # with: + # build-type: Debug + # Codecov: + # needs: [Linux-Debug, MacOS-GPU] + # uses: ./.github/workflows/codecov.yml + # secrets: inherit # # Build shards and run valgrind on Linux # - Linux-valgrind: - needs: Setup - uses: ./.github/workflows/build-linux-valgrind.yml - secrets: inherit + # Linux-valgrind: + # needs: Setup + # uses: ./.github/workflows/build-linux-valgrind.yml + # secrets: inherit # # Build shards for Windows # - Windows-Debug: - needs: Setup - uses: ./.github/workflows/build-windows.yml - secrets: inherit - with: - build-type: Debug - run-tests: true - Windows-Release: - needs: Setup - uses: ./.github/workflows/build-windows.yml - secrets: inherit - with: - build-type: Release - run-tests: true + # Windows-Debug: + # needs: Setup + # uses: ./.github/workflows/build-windows.yml + # secrets: inherit + # with: + # build-type: Debug + # run-tests: true + # Windows-Release: + # needs: Setup + # uses: ./.github/workflows/build-windows.yml + # secrets: inherit + # with: + # build-type: Release + # run-tests: true # # Build the documentation # - docs: - needs: [Windows-Debug, Windows-Release] - uses: ./.github/workflows/build-doc.yml - secrets: inherit - with: - publish: ${{ github.ref == 'refs/heads/devel' && github.event_name == 'push' }} + # docs: + # needs: [Windows-Debug, Windows-Release] + # uses: ./.github/workflows/build-doc.yml + # secrets: inherit + # with: + # publish: ${{ github.ref == 'refs/heads/devel' && github.event_name == 'push' }} # # Build shards for macOS # - macOS-Debug: - needs: Setup - uses: ./.github/workflows/build-macos.yml - secrets: inherit - with: - build-type: Debug - run-tests: true - macOS-Release: - needs: Setup - uses: ./.github/workflows/build-macos.yml - secrets: inherit - with: - build-type: Release - run-tests: true + # macOS-Debug: + # needs: Setup + # uses: ./.github/workflows/build-macos.yml + # secrets: inherit + # with: + # build-type: Debug + # run-tests: true + # macOS-Release: + # needs: Setup + # uses: ./.github/workflows/build-macos.yml + # secrets: inherit + # with: + # build-type: Release + # run-tests: true # # Build shards for iOS # - iOS: - needs: Setup - uses: ./.github/workflows/build-ios.yml - secrets: inherit + # iOS: + # needs: Setup + # uses: ./.github/workflows/build-ios.yml + # secrets: inherit