Improve error handling for YAML header parsing #2129
Workflow file for this run
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
| # jcarlin@hmc.edu 19 Nov 2025 | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: ACT Regression | |
| on: | |
| push: | |
| pull_request: | |
| # Only run CI on the latest commit if a PR is updated | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Pre-commit check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Ensure pre-commit checks pass | |
| run: uvx pre-commit run --all-files --show-diff-on-failure --color=always | |
| # Data-driven regression. | |
| # Configs are auto-discovered from the config directory. | |
| # Simulator/core wide setup is in config/<simulator>/ci.yaml. | |
| # The config-specific execution command is in config/<simulator>/<config>/run_cmd.txt. | |
| # To add a new simulator or config, just add the config files — no workflow changes needed. | |
| discover-configs: | |
| name: Discover CI Configs | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.discover.outputs.matrix }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Discover CI configs | |
| id: discover | |
| run: echo "matrix=$(.github/scripts/ci_config.py)" >> "$GITHUB_OUTPUT" | |
| regress: | |
| name: ${{ matrix.simulator }} (${{ matrix.config }}) | |
| needs: discover-configs | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: ${{ fromJson(needs.discover-configs.outputs.matrix) }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up mise | |
| uses: jdx/mise-action@v2 | |
| - name: Install sail-riscv model | |
| run: | | |
| sudo mkdir -p /usr/local | |
| curl --location https://github.com/riscv/sail-riscv/releases/download/0.10/sail-riscv-$(uname)-$(arch).tar.gz \ | |
| | sudo tar xvz --directory=/usr/local --strip-components=1 | |
| - name: Install RISC-V GCC toolchain | |
| run: | | |
| curl --location https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.07.16/riscv64-elf-ubuntu-22.04-gcc-nightly-2025.07.16-nightly.tar.xz \ | |
| | sudo tar xvJ --directory=/usr/local --strip-components=1 | |
| - name: Install Clang | |
| env: | |
| LLVM_VERSION: "21" | |
| run: | | |
| wget -qO- https://apt.llvm.org/llvm.sh | sudo bash -s -- $LLVM_VERSION | |
| sudo apt-get install -y clang-$LLVM_VERSION lld-$LLVM_VERSION llvm-$LLVM_VERSION | |
| for tool in clang clang++ lld llvm-objdump llvm-as llvm-ar llvm-nm llvm-readelf; do | |
| sudo ln -sf /usr/bin/${tool}-$LLVM_VERSION /usr/bin/${tool} | |
| done | |
| - name: Install runtime dependencies | |
| if: matrix.apt_packages != '' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ matrix.apt_packages }} | |
| - name: Restore cached simulator | |
| if: matrix.cache_key != '' | |
| id: cache-restore | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ github.workspace }}/${{ matrix.simulator }} | |
| key: ${{ matrix.cache_key }} | |
| - name: Install simulator | |
| if: matrix.install_script != '' && steps.cache-restore.outputs.cache-hit != 'true' | |
| run: bash ${{ matrix.install_script }} ${{ github.workspace }}/${{ matrix.simulator }} | |
| - name: Save cached simulator | |
| if: matrix.cache_key != '' && steps.cache-restore.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: ${{ github.workspace }}/${{ matrix.simulator }} | |
| key: ${{ matrix.cache_key }} | |
| - name: Add simulator to PATH | |
| if: matrix.install_script != '' | |
| run: echo "$GITHUB_WORKSPACE/${{ matrix.simulator }}/bin" >> $GITHUB_PATH | |
| - name: Run setup script | |
| if: matrix.setup_script != '' | |
| run: bash ${{ matrix.setup_script }} ${{ github.workspace }}/${{ matrix.simulator }} | |
| - name: Generate tests and coverpoints | |
| run: make tests --jobs $(nproc) | |
| - name: Build ELFs | |
| run: | | |
| FAST=True \ | |
| EXCLUDE_EXTENSIONS=${{ matrix.exclude_extensions }} \ | |
| CONFIG_FILES=${{ matrix.config_file }} \ | |
| make elfs --jobs $(nproc) | |
| - name: Run tests | |
| if: matrix.run_cmd != '' | |
| run: | | |
| ./run_tests.py "${{ matrix.run_cmd }}" \ | |
| work/${{ matrix.config }}/elfs | |
| - name: Upload logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.config }}-logs | |
| path: work/${{ matrix.config }}/logs | |
| vector-testgen: | |
| name: Vector Testgen | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up mise | |
| uses: jdx/mise-action@v2 | |
| - name: Generate vector tests | |
| run: make vector-tests --jobs $(nproc) | |
| ctp-build: | |
| name: Build CTP | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up mise | |
| uses: jdx/mise-action@v2 | |
| - run: git submodule update --init docs/docs-resources | |
| - name: Build CTP | |
| run: cd docs/ctp && make -j2 | |
| crd-build: | |
| name: Build CRD | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: git submodule update --init docs/docs-resources | |
| - name: Build CRD | |
| run: cd docs/crd && make -j2 | |
| # This is here so that the "Status checks that are required" Github | |
| # option doesn't need to list all of the matrix jobs (it doesn't seem | |
| # to work if you just specify the job ID of the matrix itself). | |
| ci_pass: | |
| runs-on: ubuntu-latest | |
| needs: [lint, regress, vector-testgen, ctp-build, crd-build] | |
| if: "${{ always() }}" | |
| steps: | |
| - name: exit failure | |
| if: "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" | |
| run: exit 1 | |
| - name: exit success | |
| if: "${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}" | |
| run: exit 0 |