Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with template repository to add pre-commit checks and CI #68

Merged
merged 4 commits into from
Jan 29, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Sync workflow with template repository again
Now includes pre-commit instructions as well as a minor workflow update.
arichardson committed Jan 29, 2024
commit 2b278c062f73331bb3230e558ad0e9e750e61208
2 changes: 1 addition & 1 deletion .github/workflows/build-pdf.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:
steps:
# Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,6 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/action@v3.0.0
28 changes: 26 additions & 2 deletions readme.adoc
Original file line number Diff line number Diff line change
@@ -31,7 +31,11 @@ git clone --recurse-submodules https://github.com/riscv/riscv-cheri.git

=== Building the Documentation

To start the build process, run `cd ./riscv-cheri && make all`.
To start the build process, run:

```shell
cd ./riscv-cheri && make all
```

The link:Makefile[] script will check the availability of Docker on your system:

@@ -44,4 +48,24 @@ The build process utilizes several options, including theming and font settings,

=== Cleaning up

To clean up the generated files, run `make clean`. This will remove the generated PDF file.
To clean up the generated files, run:

```shell
make clean
```

This will remove the generated PDF file.

== Enabling pre-commit checks locally
The repository has some basic commit checks set up with https://pre-commit.com/[pre-commit] that will be enforced by the GitHub CI.
To ensure these checks are also run in the local repository while making changes the following command can be run:
[source,shell]
----
pip3 install pre-commit && pre-commit install
----

When enabling additional checks https://pre-commit.com/#plugins[by editing .pre-commit-config.yaml], it is recommended to run to newly added check on all files in the repository. This can be done with the following command:
[source,shell]
----
pre-commit run --all-files
----