Skip to content

Always build CXX

Always build CXX #57

name: Build C/C++ Sysroot
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
checks: write
jobs:
build_cxx_sysroot:
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
options: --user root --workdir /
steps:
- name: Update and install dependencies
run: |
pacman -Syu --noconfirm
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
- 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: 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 tools/clang-wasix.cmake_toolchain /opt/wasix-sysroot/clang-wasix.cmake_toolchain
- name: Upload sysroot
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v2
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