Skip to content

Commit 9c35035

Browse files
authored
docs: fix README paths, add CI document (#981)
1 parent c449100 commit 9c35035

File tree

3 files changed

+59
-10
lines changed

3 files changed

+59
-10
lines changed

CONTRIBUTING.adoc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ All patches must meet the UnifiedDB code standards. This includes:
3636
=== Regression tests
3737

3838
All contributions must pass the full suite of regression tests.
39-
Regression tests are checked in GitHub for every PR, and they can also be run locally using `./do test:regress`.
40-
41-
If a Pull Request adds a new feature that is not already covered by the regression test suite, it
42-
must add at least one new test.
39+
Tests are documented more in xref:doc/ci.adoc[Continuous Integration].
4340

4441
=== Commit messages
4542

README.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ image::https://api.reuse.software/badge/github.com/riscv-software-src/riscv-unif
77
----
88
This project is under rapid development. Expect schemas and APIs to change.
99
10-
The data in the `arch` directory is also a work in progress and may be incorrect.
10+
The data in the `spec` directory is also a work in progress and may be incorrect.
1111
1212
That said, the following data has been validated against third-party sources:
1313
@@ -44,16 +44,16 @@ https://lf-riscv.atlassian.net/wiki/x/iwCsCw?atlOrigin=eyJpIjoiYzU3N2ZiNDViMGRkN
4444

4545
The following directories contain information relevant to most users of UnifiedDB
4646

47-
* `data`: Holds all data specification files, along with their schemas
48-
* `data/arch`: The RISC-V standard
49-
* `data/arch_overlay`: Non-standard RISC-V extensions
50-
* `data/schemas`: Data schemas for the specification content
47+
* `spec`: Holds all data specification files, along with their schemas
48+
* `spec/std`: The RISC-V standard
49+
* `spec/custom`: Non-standard RISC-V extensions
50+
* `spec/schemas`: Data schemas for the specification content
5151
* `cfgs`: Configurations used by backends to customize generated outputs
5252

5353
Additionally, developers will be interested in the following:
5454

5555
* `backends`: Tools to generate artifacts (documents, simulators, etc.) from UDB data
56-
* `tools/gems`: Ruby gem libraries for interacting with UDB / IDL
56+
* `tools/ruby-gems`: Ruby gem libraries for interacting with UDB / IDL
5757
* `bin`: Wrapper scripts to run commands within the container environment
5858

5959
== Getting Started

doc/ci.adoc

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
// SPDX-License-Identifier: CC-BY-4.0
3+
4+
= Continuous Integration
5+
6+
The UnifiedDB project uses continuous integration (CI) to improve quality and automate artifact creation.
7+
8+
We use two framworks for CI:
9+
10+
- https://pre-commit.com[pre-commit]
11+
- https://docs.github.com/en/actions[GitHub Actions]
12+
13+
== Frameworks
14+
15+
=== pre-commit
16+
17+
`pre-commit` checks are installed by the UnifiedDB setup and automatically run as a git hook on commit.
18+
Any errors from pre-commit will cause a `git commit` to fail.
19+
Most pre-commit checks (like linters) will automatically edit the offending files to fix them;
20+
just `git add` the changes and try again.
21+
22+
`pre-commit` can also be run on demand with `./bin/pre-commit`.
23+
24+
=== GitHub Actions
25+
26+
The upstream UnifiedDB main branch is protected by a variety of checks.
27+
The checks are split into two different groups.
28+
29+
==== PR Regression Tests
30+
31+
The first group runs on any PR targeting the main branch.
32+
All of the tests must pass before the PR is allowed to move to the https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue[merge queue].
33+
The tests are specified in xref:.github/workflows/regress.yml[`.github/workflows/regress.yml`].
34+
35+
==== Deployment Tests / Actions
36+
37+
The second group of tests run when a PR enters the merge queue.
38+
They generate artifacts that are deployed to https://riscv-software-src.github.io/riscv-unified-db/[GitHub pages].
39+
If any test in the second group fails, a PR is removed from the merge queue.
40+
While in the merge queue, the CI tests generate artifacts but do not upload/update pages yet.
41+
The upload occurs after the PR merges to main and the test runs again.
42+
The tests are specified in xref:.github/workflows/deploy.yml[`.github/workflows/deploy.yml`] and are uploaded via xref:.github/workflows/pages.yml[`.github/workflows/pages.yml`].
43+
44+
== CI Policies
45+
46+
=== Test Coverage
47+
48+
Code coverage is tracked for the `idlc` and `udb` Ruby gems.
49+
New PRs must not drop line coverage of the gems by more than 1%.
50+
51+
While coverage is not currently tracked for other collateral, any new features are expected to be
52+
tested and those tests are expected to be run during CI.

0 commit comments

Comments
 (0)