ci: 移除临时故障诊断步骤,恢复精简流水线 #28
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Test Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtest-dev gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf | |
| sudo cmake -S /usr/src/googletest -B /tmp/gtest | |
| sudo cmake --build /tmp/gtest | |
| sudo install -m 644 /tmp/gtest/lib/libgtest*.a /usr/lib | |
| - name: Init Submodules | |
| run: git submodule update --init --recursive | |
| - name: Build ISA Tests (p-only) | |
| run: | | |
| make -C riscv-tests/isa -f Makefile \ | |
| src_dir="${GITHUB_WORKSPACE}/riscv-tests/isa" \ | |
| XLEN=64 \ | |
| tests='$(rv32ui_p_tests) $(rv32uc_p_tests) $(rv32um_p_tests) $(rv32ua_p_tests) $(rv32uf_p_tests) $(rv32ud_p_tests) $(rv32uzfh_p_tests) $(rv32uzba_p_tests) $(rv32uzbb_p_tests) $(rv32uzbc_p_tests) $(rv32uzbs_p_tests) $(rv32si_p_tests) $(rv32mi_p_tests) $(rv64ui_p_tests) $(rv64ua_p_tests) $(rv64uc_p_tests) $(rv64ud_p_tests) $(rv64uf_p_tests) $(rv64um_p_tests)' | |
| - name: Build riscv-tests Benchmarks | |
| run: | | |
| make -C riscv-tests/benchmarks -f Makefile \ | |
| src_dir="${GITHUB_WORKSPACE}/riscv-tests/benchmarks" \ | |
| XLEN=64 | |
| - name: Configure | |
| run: cmake -S . -B build | |
| - name: Build | |
| run: cmake --build build -j | |
| - name: Unit Tests | |
| run: ctest --test-dir build --output-on-failure | |
| - name: ISA Tests (rv64, in-order + ooo) | |
| run: | | |
| python3 run_tests.py -p "rv64*-p-*" -w 1 --timeout 20 | |
| python3 run_tests.py -p "rv64*-p-*" --ooo -w 1 --timeout 30 | |
| - name: Benchmarks Smoke Tests (non-blocking) | |
| continue-on-error: true | |
| run: | | |
| python3 run_tests.py --tests-subdir benchmarks -p "*.riscv" -w 1 --timeout 120 | |
| - name: CoreMark Smoke Test (if available, non-blocking) | |
| continue-on-error: true | |
| run: | | |
| if [ -x "riscv-tests/benchmarks/coremark.riscv" ]; then | |
| python3 run_tests.py --tests-subdir benchmarks -p "coremark.riscv" -w 1 --timeout 180 | |
| else | |
| echo "Skip: riscv-tests/benchmarks/coremark.riscv not found." | |
| fi |