-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# | ||
# detailed syntax defined in | ||
# https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | ||
# | ||
name: "Static Tests" | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
clang-format: | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
CLANG_REQUIRE_VERSION: 17.0.4 | ||
CLANG_FORMAT_FILE: ".clang-format" | ||
steps: | ||
- name: "Checkout repository content" | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Install dependencies" | ||
run: | | ||
python -m pip install --force-reinstall clang-format==${{ env.CLANG_REQUIRE_VERSION }} | ||
- name: "Run clang-format..." | ||
run: | | ||
files=$(find . -iname "*.h" -o -iname "*.cu" -o -iname "*.cpp") | ||
diff -u <(cat ${files}) <(clang-format ${files}) | ||
black: | ||
runs-on: "ubuntu-20.04" | ||
steps: | ||
- name: "Checkout repository content" | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Run black..." | ||
uses: psf/black@2a1c67e0b2f81df602ec1f6e7aeb030b9709dc7c # 23.11.0 | ||
|
||
flake8: | ||
runs-on: "ubuntu-20.04" | ||
steps: | ||
- name: "Checkout repository content" | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: "Set up Python 3.x" | ||
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: "Install dependencies" | ||
run: | | ||
pip install flake8 | ||
- name: "Run flake8..." | ||
run: | | ||
flake8 . |