Skip to content

Commit

Permalink
ci: Regenerate and verify the address space files (#348)
Browse files Browse the repository at this point in the history
in order to enforce congruence between it and the source nodeset.

Furthermore drop the generated file from rustfmt ignore
as it's apparently currently formatted.
  • Loading branch information
AiyionPrime authored Jul 23, 2024
1 parent 49285e4 commit 5e8b661
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/ci_verify_clean_address_space.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI verify cleanly generated address space
'on':
workflow_call: null
jobs:
address_space:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
working-directory: tools/schema/
- name: Regenerate address space
run: node gen_address_space
working-directory: tools/schema/
- name: Format generated code
# This invokes formatting of all nodeset children as well.
run: rustfmt lib/src/server/address_space/generated/mod.rs
- name: Verify generated code matches committed code
run: git status --porcelain
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
code-coverage:
uses: ./.github/workflows/ci_code_coverage.yml

verify-clean-address-space:
uses: ./.github/workflows/ci_verify_clean_address_space.yml

verify-clean-supported-message:
uses: ./.github/workflows/ci_verify_clean_supported_message.yml

Expand Down
1 change: 0 additions & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ignore = [
"server/src/address_space/generated",
"types/src/node_ids.rs",
"types/src/service_types",
]

0 comments on commit 5e8b661

Please sign in to comment.