Add regression test CI (#4512)

The entire CI test run takes approximately 3 minutes.
The test run fails if there is at least one failed case (failed > 0).
This commit is contained in:
Liu Jia 2025-07-30 10:26:19 +08:00 committed by GitHub
parent 2685f2cae0
commit 6c6447fadb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 47 additions and 0 deletions

View File

@ -371,6 +371,47 @@ jobs:
ctest
working-directory: tests/unit
build_regression_tests:
needs:
[build_llvm_libraries_on_ubuntu_2204]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
include:
- os: ubuntu-22.04
llvm_cache_key: ${{ needs.build_llvm_libraries_on_ubuntu_2204.outputs.cache_key }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: Get LLVM libraries
id: retrieve_llvm_libs
uses: actions/cache@v4
with:
path: |
./core/deps/llvm/build/bin
./core/deps/llvm/build/include
./core/deps/llvm/build/lib
./core/deps/llvm/build/libexec
./core/deps/llvm/build/share
key: ${{ matrix.llvm_cache_key }}
- name: Quit if cache miss
if: (steps.retrieve_llvm_libs.outputs.cache-hit != 'true')
run: echo "::error::can not get prebuilt llvm libraries" && exit 1
- name: Build wamrc and iwasm
run: |
./build_wamr.sh
working-directory: tests/regression/ba-issues
- name: Run regression tests
run: |
python run.py
working-directory: tests/regression/ba-issues
build_samples_wasm_c_api:
needs:
[

View File

@ -11,6 +11,7 @@ import subprocess
import glob
import re
import argparse
import sys
from typing import Dict, Optional, List
@ -275,6 +276,11 @@ def process_and_run_test_cases(
else:
print(f" Issues not found in folder: {format_issue_ids_should_test}")
if failed > 0:
# Exit with error code if there are failed test for CI
print("Some tests failed, see log file for details.")
sys.exit(1)
def main():
parser = argparse.ArgumentParser(description="Run BA issue tests.")