summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArshia Ghafoori <arshia001@live.com>2024-06-14 12:39:17 +0400
committerArshia001 <Arshia001@users.noreply.github.com>2024-06-14 16:36:26 +0330
commitde97096297d9452083072ce809016916bf9a8063 (patch)
treeced31a67dd34a79765c3f8d50530e1d0b999aa0d
parent96a41cc7758327f2ffdbbd6f15777a0aa348cef3 (diff)
Fix CI
-rw-r--r--.github/workflows/build_cxx_sysroot.yml62
m---------tools/llvm-project0
2 files changed, 55 insertions, 7 deletions
diff --git a/.github/workflows/build_cxx_sysroot.yml b/.github/workflows/build_cxx_sysroot.yml
index 9f309c9..7c63865 100644
--- a/.github/workflows/build_cxx_sysroot.yml
+++ b/.github/workflows/build_cxx_sysroot.yml
@@ -20,12 +20,40 @@ jobs:
- name: Update and install dependencies
run: |
pacman -Syu --noconfirm
- pacman -Sy --noconfirm coreutils nodejs npm wget git cmake ninja llvm clang rsync make lld wasmer cargo
+ pacman -Sy --noconfirm coreutils nodejs npm wget git cmake ninja llvm14 clang14 rsync make lld wasmer cargo python3
+ ln -s /usr/lib/llvm14/bin/clang-14 /usr/bin/clang
+ ln -s /usr/lib/llvm14/bin/clang++ /usr/bin/clang++
+ ln -s /usr/bin/llvm-ar-14 /usr/bin/llvm-ar
+ ln -s /usr/bin/llvm-nm-14 /usr/bin/llvm-nm
+ ln -s /usr/bin/llvm-ranlib-14 /usr/bin/llvm-ranlib
+
+ - name: Log tool versions
+ run: |
+ echo git
+ git --version
+ echo "##########################"
+ echo wasmer
+ wasmer -V
+ echo "##########################"
+ echo clang
+ clang -v
+ echo "##########################"
+ echo llvm-ar
+ llvm-ar -V
+ echo "##########################"
+ echo llvm-nm
+ llvm-nm -V
+ echo "##########################"
+ echo nodejs
+ node -v
+ echo "##########################"
+ echo npm
+ npm -v
- name: Checkout
uses: actions/checkout@v3
with:
- submodules: true
+ submodules: recursive
- name: Build
run: |
@@ -33,7 +61,31 @@ jobs:
./build32.sh
rm -rf /opt/wasix-sysroot
cp -r sysroot /opt/wasix-sysroot
- cp .github/workflows/files/clang-wasix.cmake_toolchain /opt/wasix-sysroot/clang-wasix.cmake_toolchain
+ cp tools/clang-wasix.cmake_toolchain /opt/wasix-sysroot/clang-wasix.cmake_toolchain
+
+ - name: Build and install compiler_rt builtins
+ run: |
+ mkdir -p build-compiler-rt-builtins
+ cd build-compiler-rt-builtins
+ cmake --fresh \
+ -DCOMPILER_RT_BAREMETAL_BUILD=On \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCOMPILER_RT_OS_DIR=wasm32-wasi \
+ -DCOMPILER_RT_DEFAULT_TARGET_ONLY:BOOL=ON \
+ -DCMAKE_TOOLCHAIN_FILE=/opt/wasix-sysroot/clang-wasix.cmake_toolchain \
+ -DCMAKE_SYSROOT=/opt/wasix-sysroot \
+ -DCMAKE_INSTALL_PREFIX=/opt/wasix-sysroot \
+ ../tools/llvm-project/compiler-rt/lib/builtins
+ cmake --build . --target install --parallel 4
+ llvm-ranlib /opt/wasix-sysroot/lib/wasm32-wasi/libclang_rt.builtins-wasm32.a
+
+ - name: Run WASIX tests
+ run: |
+ export CLANG_VERSION=$(clang --version | grep -i "clang version" | sed -n 's/.*version \([0-9.]*\).*/\1/p')
+ echo Detected clang version $CLANG_VERSION
+ mkdir -p /usr/lib/llvm14/lib/clang/$CLANG_VERSION/lib/wasi
+ cp /opt/wasix-sysroot/lib/wasm32-wasi/libclang_rt.builtins-wasm32.a /usr/lib/llvm14/lib/clang/$CLANG_VERSION/lib/wasi/libclang_rt.builtins-wasm32.a
+ TOOLCHAIN=/opt/wasix-sysroot/clang-wasix.cmake_toolchain ./test/wasix/run_tests.sh
- name: Upload sysroot
if: ${{ !env.ACT }}
@@ -41,7 +93,3 @@ jobs:
with:
name: wasix-sysroot
path: /opt/wasix-sysroot
-
- - name: Run WASIX tests
- run: |
- TOOLCHAIN=/opt/wasix-sysroot/clang-wasix.cmake_toolchain ./test/wasix/run_tests.sh
diff --git a/tools/llvm-project b/tools/llvm-project
new file mode 160000
+Subproject 4ba6a9c9f65bbc8bd06e3652cb20fd4dfc84613