Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr #21

Closed
wants to merge 9 commits into from
Closed

Pr #21

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 48 additions & 44 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: tools/check_tidy.py

build-on-macos:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -36,17 +36,41 @@ jobs:
brew install cmake ninja pkg-config
- name: Build x64
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=darwin -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/mac $BUILD_OPTIONS
ninja -Cout/mac
- name: Run Tests
run: |
#FIXME try-catch is unstable in macos build
#remove 2 test files due to stack overflow occurred by recursion calls in debug mode build by apple-clang
rm $GITHUB_WORKSPACE/test/wasm-spec/core/call.wast
rm $GITHUB_WORKSPACE/test/wasm-spec/core/call_indirect.wast
$RUNNER --engine="$GITHUB_WORKSPACE/out/mac/walrus"

build-on-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
run: |
brew update
brew install cmake ninja pkg-config
- name: Build arm64
env:
BUILD_OPTIONS: -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/mac $BUILD_OPTIONS
ninja -Cout/mac
- name: Run Tests
run: |
cmake -H. -Bout/mac/x64 $BUILD_OPTIONS
ninja -Cout/mac/x64
#- name: Run Tests
#run: |
#FIXME try-catch is unstable in macos build
#remove 2 test files due to stack overflow occurred by recursion calls in debug mode build by apple-clang
#rm $GITHUB_WORKSPACE/test/wasm-spec/core/call.wast
#rm $GITHUB_WORKSPACE/test/wasm-spec/core/call_indirect.wast
#$RUNNER --engine="$GITHUB_WORKSPACE/out/mac/x64/walrus"
rm $GITHUB_WORKSPACE/test/wasm-spec/core/call.wast
rm $GITHUB_WORKSPACE/test/wasm-spec/core/call_indirect.wast
$RUNNER --engine="$GITHUB_WORKSPACE/out/mac/walrus"

build-by-clang:
runs-on: ubuntu-latest
Expand All @@ -60,25 +84,25 @@ jobs:
sudo apt install -y ninja-build gcc-multilib g++-multilib
- name: Build x86
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x86 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_ARCH=x86 -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
run: |
CC=clang CXX=clang++ cmake -H. -Bout/clang/x86 $BUILD_OPTIONS
ninja -Cout/clang/x86
- name: Build x64
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
run: |
CC=clang CXX=clang++ cmake -H. -Bout/clang/x64 $BUILD_OPTIONS
ninja -Cout/clang/x64
- name: Pure Build x86
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x86 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
BUILD_OPTIONS: -DWALRUS_ARCH=x86 -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
run: |
CC=clang CXX=clang++ cmake -H. -Bout/pure/x86 $BUILD_OPTIONS
ninja -Cout/pure/x86
- name: Pure Build x64
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
run: |
CC=clang CXX=clang++ cmake -H. -Bout/pure/x64 $BUILD_OPTIONS
ninja -Cout/pure/x64
Expand All @@ -104,7 +128,7 @@ jobs:
sudo apt install -y ninja-build gcc-multilib g++-multilib
- name: Build x86
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x86 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/linux/x86 $BUILD_OPTIONS
ninja -Cout/linux/x86
Expand All @@ -125,7 +149,7 @@ jobs:
sudo apt install -y ninja-build gcc-multilib g++-multilib
- name: Build x64
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/linux/x64 $BUILD_OPTIONS
ninja -Cout/linux/x64
Expand All @@ -146,7 +170,7 @@ jobs:
sudo apt install -y ninja-build gcc-multilib g++-multilib
- name: Build x64
env:
BUILD_OPTIONS: -DWALRUS_JITPERF=1 -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_JITPERF=1 -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/linux/x64 $BUILD_OPTIONS
ninja -Cout/linux/x64
Expand All @@ -171,8 +195,8 @@ jobs:
apt-get update
apt-get install -y cmake build-essential ninja-build pkg-config python3 clang git
run: |
CC=clang CXX=clang++ cmake -H. -Bout/debug -DWALRUS_ARCH=arm -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
CC=clang CXX=clang++ cmake -H. -Bout/pure -DWALRUS_ARCH=arm -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
CC=clang CXX=clang++ cmake -H. -Bout/debug -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -GNinja
CC=clang CXX=clang++ cmake -H. -Bout/pure -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
ninja -Cout/debug
ninja -Cout/pure
# remove 2 test files due to stack overflow occurred by recursion calls in debug mode build by clang
Expand All @@ -183,7 +207,7 @@ jobs:
python3 ./tools/run-tests.py --engine="./out/pure/walrus" basic-tests wasm-test-core jit
python3 ./tools/run-tests.py --jit --engine="./out/pure/walrus" basic-tests wasm-test-core jit

build-test-on-aarch64:
build-test-on-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -203,8 +227,8 @@ jobs:
apt-get update
apt-get install -y cmake build-essential ninja-build pkg-config python3 clang git
run: |
CC=clang CXX=clang++ cmake -H. -Bout/release -DWALRUS_ARCH=aarch64 -DWALRUS_HOST=linux -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -GNinja
CC=clang CXX=clang++ cmake -H. -Bout/pure -DWALRUS_ARCH=aarch64 -DWALRUS_HOST=linux -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
CC=clang CXX=clang++ cmake -H. -Bout/release -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -GNinja
CC=clang CXX=clang++ cmake -H. -Bout/pure -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -DWALRUS_WASI=OFF -GNinja
ninja -Cout/release
ninja -Cout/pure
python3 ./tools/run-tests.py --engine="./out/release/walrus"
Expand Down Expand Up @@ -252,26 +276,6 @@ jobs:
uses: mxschmitt/action-tmate@v3
timeout-minutes: 15

build-test-extended-feature:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Packages
run: |
sudo apt update
sudo apt install -y ninja-build gcc-multilib g++-multilib
- name: Build x64
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=shell -DWALRUS_EXTENDED_FEATURES=ON -GNinja
run: |
cmake -H. -Bout/extended $BUILD_OPTIONS
ninja -Cout/extended
- name: Run Tests
run: |
$RUNNER --engine="$GITHUB_WORKSPACE/out/extended/walrus" wasm-test-extended

build-test-performance:
runs-on: ubuntu-latest
steps:
Expand All @@ -287,7 +291,7 @@ jobs:
sudo pip install tqdm
- name: Build x64
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -GNinja
run: |
cmake -H. -Bout/linux/x64 $BUILD_OPTIONS
ninja -Cout/linux/x64
Expand All @@ -307,7 +311,7 @@ jobs:
sudo apt install -y ninja-build gcc-multilib g++-multilib
- name: Build x64
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=debug -DWALRUS_OUTPUT=api_test -GNinja
BUILD_OPTIONS: -DWALRUS_MODE=debug -DWALRUS_OUTPUT=api_test -GNinja
run: |
cmake -H. -Bout/api_test/x64 $BUILD_OPTIONS
ninja -Cout/api_test/x64
Expand Down Expand Up @@ -342,7 +346,7 @@ jobs:
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
- name: Build
env:
BUILD_OPTIONS: -DWALRUS_ARCH=x64 -DWALRUS_HOST=linux -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -GNinja
BUILD_OPTIONS: -DWALRUS_MODE=release -DWALRUS_OUTPUT=shell -GNinja
run: |
export PATH=$GITHUB_WORKSPACE/cov-analysis-linux64/bin:$PATH
cmake -H. -Bout/coverity_scan $BUILD_OPTIONS
Expand Down
4 changes: 0 additions & 4 deletions build/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ IF (${WALRUS_OUTPUT} STREQUAL "shared_lib" AND ${WALRUS_HOST} STREQUAL "android"
SET (WALRUS_LDFLAGS ${WALRUS_LDFLAGS} -shared)
ENDIF()

IF (WALRUS_EXTENDED_FEATURES)
SET (WALRUS_DEFINITIONS ${WALRUS_DEFINITIONS} -DENABLE_EXTENDED_FEATURES)
ENDIF()

#######################################################
# FLAGS FOR ADDITIONAL FUNCTION
#######################################################
Expand Down
5 changes: 4 additions & 1 deletion build/target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,11 @@ ELSEIF (${WALRUS_HOST} STREQUAL "android")
# bdwgc android amd64 cannot support keeping back ptrs
SET (WALRUS_THIRDPARTY_CFLAGS ${WALRUS_THIRDPARTY_CFLAGS} -UKEEP_BACK_PTRS -USAVE_CALL_COUNT -UDBG_HDRS_ALL)
ENDIF()
ELSEIF (${WALRUS_HOST} STREQUAL "darwin" AND ${WALRUS_ARCH} STREQUAL "x64")
ELSEIF (${WALRUS_HOST} STREQUAL "darwin")
FIND_PACKAGE (PkgConfig REQUIRED)
IF ((NOT ${WALRUS_ARCH} STREQUAL "x64") AND (NOT ${WALRUS_ARCH} STREQUAL "aarch64"))
MESSAGE (FATAL_ERROR ${WALRUS_ARCH} " is unsupported")
ENDIF()
SET (WALRUS_LDFLAGS -lpthread -Wl,-dead_strip)
# bdwgc mac cannot support pthread_getattr_np
SET (WALRUS_THIRDPARTY_CFLAGS ${WALRUS_THIRDPARTY_CFLAGS} -UHAVE_PTHREAD_GETATTR_NP)
Expand Down
Loading
Loading