diff --git a/.github/workflows/regress.yml b/.github/workflows/regress.yml index 191bbcad7..0deaac109 100755 --- a/.github/workflows/regress.yml +++ b/.github/workflows/regress.yml @@ -16,6 +16,17 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 - uses: pre-commit/action@v3.0.1 + regress-validate-cfgs: + runs-on: ubuntu-latest + env: + SINGULARITY: 1 + steps: + - name: Clone Github Repo Action + uses: actions/checkout@v4 + - name: singularity setup + uses: ./.github/actions/singularity-setup + - name: Validate all config files + run: ./do test:cfgs regress-smoke: needs: build-llvm runs-on: ubuntu-latest diff --git a/Rakefile b/Rakefile index fd4feea87..f1b31fd51 100755 --- a/Rakefile +++ b/Rakefile @@ -241,6 +241,27 @@ namespace :test do puts "All IDL passed type checking" end + + desc "Validate all config files in cfgs/" + task :cfgs do + puts "Validating all config files..." + cfg_files = Dir["#{$root}/cfgs/*.yaml"] + failed_cfgs = [] + + cfg_files.each do |cfg_file| + cfg_name = File.basename(cfg_file, ".yaml") + puts "Validating #{cfg_name}..." + unless system "bundle exec udb validate cfg #{cfg_file}" + failed_cfgs << cfg_name + end + end + + if failed_cfgs.empty? + puts "All config files are valid" + else + raise "Config validation failed for: #{failed_cfgs.join(', ')}" + end + end end def insert_warning(str, from) diff --git a/cfgs/mc100-32-full-example.yaml b/cfgs/MC100-32-Full.yaml similarity index 100% rename from cfgs/mc100-32-full-example.yaml rename to cfgs/MC100-32-Full.yaml diff --git a/cfgs/prm_demo_rv32.yaml b/cfgs/prm_demo_rv32.yaml index bf7b0be18..71339700e 100644 --- a/cfgs/prm_demo_rv32.yaml +++ b/cfgs/prm_demo_rv32.yaml @@ -3,7 +3,7 @@ $schema: config_schema.json# kind: architecture configuration type: partially configured -name: demo_rv32 +name: prm_demo_rv32 description: | A demo RISC-V RV32 processor configuration for demonstrating the Programmer's Reference Manual generation capabilities. diff --git a/cfgs/rv32-riscv-tests.yaml b/cfgs/rv32-riscv-tests.yaml index a7eac07de..a8bec9427 100644 --- a/cfgs/rv32-riscv-tests.yaml +++ b/cfgs/rv32-riscv-tests.yaml @@ -113,6 +113,7 @@ params: STVEC_MODE_VECTORED: true SATP_MODE_BARE: true TRAP_ON_ECALL_FROM_S: true + TRAP_ON_ECALL_FROM_U: true TRAP_ON_SFENCE_VMA_WHEN_SATP_MODE_IS_READ_ONLY: false MSTATUS_FS_WRITABLE: false MSTATUS_VS_WRITABLE: false