[CI] Bump llvm 11 to 18 for static code analysis (#3861) #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test WasmEdge on riscv64 arch | |
concurrency: | |
group: build-riscv64-${{ github.head_ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- ".github/workflows/build_for_riscv.yml" | |
- "include/**" | |
- "lib/**" | |
- "test/**" | |
- "!test/plugins/**" | |
- "thirdparty/**" | |
- "tools/**" | |
- "CMakeLists.txt" | |
- "cmake/**" | |
pull_request: | |
branches: | |
- master | |
- 'proposal/**' | |
paths: | |
- ".github/workflows/build_for_riscv.yml" | |
- "include/**" | |
- "lib/**" | |
- "test/**" | |
- "!test/plugins/**" | |
- "thirdparty/**" | |
- "tools/**" | |
- "CMakeLists.txt" | |
- "cmake/**" | |
permissions: | |
contents: read | |
jobs: | |
# TODO: Refactor `lint` with `on.workflow_run` | |
# https://docs.github.com/en/actions/using-workflows/triggering-a-workflow | |
lint: | |
uses: ./.github/workflows/reusable-call-linter.yml | |
build_riscv64: | |
name: RISC-V64 | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Ensure git safe directory | |
run: | | |
git config --global --add safe.directory $(pwd) | |
- uses: uraimo/run-on-arch-action@v2 | |
name: Build WasmEdge | |
with: | |
arch: riscv64 | |
distro: ubuntu22.04 | |
githubToken: ${{ github.token }} | |
dockerRunArgs: | | |
--volume "${PWD}:/workplace" | |
shell: /bin/sh | |
install: | | |
apt-get update -q -y | |
apt-get install -q -y git cmake g++ dpkg | |
apt-get install -q -y software-properties-common | |
apt-get install -q -y llvm-15-dev liblld-15-dev zlib1g-dev | |
apt-get install -q -y wabt # For generating wasm | |
run: | | |
mkdir -p build && cd build | |
cmake -DCMAKE_BUILD_TYPE=Release .. && make -j $(nproc) && make install | |
wasmedge -v | |
wasmedgec -v | |
wasmedge compile -h | |
wasmedge run -h | |
cd ../examples/wasm | |
wat2wasm fibonacci.wat -o fibonacci.wasm | |
wasmedgec fibonacci.wasm fibonacci_aot_c.wasm | |
wasmedge --reactor fibonacci_aot_c.wasm fib 30 | |
wasmedge run --reactor fibonacci_aot_c.wasm fib 30 | |
wasmedge compile fibonacci.wasm fibonacci_aot_compile.wasm | |
wasmedge --reactor fibonacci_aot_compile.wasm fib 30 | |
wasmedge run --reactor fibonacci_aot_compile.wasm fib 30 |