Skip to content

Commit

Permalink
Fast test
Browse files Browse the repository at this point in the history
Update CI

Update CI

Update CI

Update CI

Update CI
  • Loading branch information
guusw committed Jan 27, 2025
1 parent 1fa2ef3 commit 7735945
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 78 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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:
Expand All @@ -93,7 +106,6 @@ jobs:
# Spawn the test server
./run_server
source shards/tests/web/shared
function queue_test() {
Expand Down Expand Up @@ -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
Expand Down
135 changes: 68 additions & 67 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7735945

Please sign in to comment.