Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/hyperfine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Hyperfine Benchmark
on:
pull_request:
branches: ["**"]
paths-ignore: ["spec/**"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/pr_spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Spec tests
on:
pull_request:
branches:
- main
- 'spec/**'
push:
branches: ["**"]
paths: ["spec/**"]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
spec_structure:
name: Spec structure test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
Comment thread
MauroToscano marked this conversation as resolved.
- run: python3 spec/tooling/chip.py spec/src/config.toml spec/src/signatures.toml spec/src/*.toml
17 changes: 13 additions & 4 deletions spec/tooling/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1043,14 +1043,23 @@ def check_signatures(found: Iterable[Signature], expected: list[Signature]):
signatures = read_signatures(config, sys.argv[2])
if reporter.reported:
sys.exit(1)

reported = False
chips: list[Chip] = []
for file in sys.argv[3:]:
if file in sys.argv[1:3]:
continue
chips.append(Chip.from_file(config, file))
reported |= reporter.reported
if not reported:
for chip in chips:
reporter.update_location(f"Chip {chip.name}")
check_signatures(chip.typecheck(), signatures)
if reported:
sys.exit(1)

for chip in chips:
reporter.update_location(f"Chip {chip.name}")
check_signatures(chip.typecheck(), signatures)
reported |= reporter.reported
if reported:
sys.exit(1)
else:
print("No issues were found.")
sys.exit(0)
Loading