Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Arshia001 committed Jun 14, 2024
1 parent 49944e5 commit 2e143fb
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
51 changes: 48 additions & 3 deletions .github/workflows/build_cxx_sysroot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,65 @@ 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 llvm15 clang15 rsync make lld wasmer cargo python3
ln -s /usr/lib/llvm15/bin/clang-15 /usr/bin/clang
ln -s /usr/lib/llvm15/bin/clang++ /usr/bin/clang++
ln -s /usr/bin/llvm-ar-15 /usr/bin/llvm-ar
ln -s /usr/bin/llvm-nm-15 /usr/bin/llvm-nm
- 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: |
git config --global --add safe.directory $(pwd)
./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 \
../llvm-project/compiler-rt/lib/builtins
cmake --build . --target install --parallel 4
export CLANG_MAJOR_VERSION=$(clang --version | grep -i "clang version" | sed -r 's/.*version ([0-9]+).*/\1/')
mkdir -p /usr/lib/clang/$CLANG_MAJOR_VERSION/lib/wasi
cp /opt/wasix-sysroot/lib/wasm32-wasi/libclang_rt.builtins-wasm32.a /usr/lib/clang/$CLANG_MAJOR_VERSION/lib/wasi/libclang_rt.builtins-wasm32.a
- name: Upload sysroot
if: ${{ !env.ACT }}
Expand Down
1 change: 1 addition & 0 deletions tools/llvm-project
Submodule llvm-project added at 4ba6a9

0 comments on commit 2e143fb

Please sign in to comment.