-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feat: Additional Github Workflow Actions #37
base: develop
Are you sure you want to change the base?
Changes from all commits
b93a576
97a3bfd
2d64c51
d531076
cc49161
ed17e62
60a8186
752c421
2df7fd7
4fdb71c
7d49778
d7bc406
83c1ebf
a80f83f
61fd5f7
5890c33
1e9a24e
02a9456
a7f666d
282a2c0
d7dc4ca
537af14
4388623
6439ad0
ac50652
26ff129
8c18498
ed43b4c
d62fca1
9023903
a4e57dc
4138a29
cb38cbd
66d6a18
d9444cc
efbb0fa
a9e8db3
7622d15
f972ce4
0e10c3e
4f27f63
bd3a1c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"LABEL": { | ||
"name": "title needs formatting", | ||
"color": "EEEEEE" | ||
}, | ||
"CHECKS": { | ||
"prefixes": ["feat: ", "bugfix: ", "tidy: ", "breaking: ", "core_update: "], | ||
"regexp": "^(feat|bugfix|tidy|breaking|core_update): .+", | ||
"regexpFlags": "i", | ||
"ignoreLabels" : ["dont-check-PRs-with-this-label", "meta"] | ||
}, | ||
"MESSAGES": { | ||
"success": "### ✅ PR Title Formatted Correctly", | ||
"failure": "### 🚨 PR Title Needs Formatting\n\nThe title of this PR needs to be formatted correctly.\nPlease update the title to match the format `type: description`. For more details, see CONTRIBUTING.md.\n\n#### Examples:\n- `bugfix: fix typo in README.md AB#123`\n- `tidy: update dependencies AB#456`\n- `feat: add new feature AB#789`\n- `breaking: big change`\n", | ||
"notice": "" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# This scans MaCh3 and tries to find vulnerabilities | ||
|
||
name: "CodeQL C++ Analysis" | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0' # Every Sunday at midnight | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze C++ Code with CodeQL | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/dune/mach3:alma9latest | ||
permissions: | ||
security-events: write | ||
packages: read | ||
actions: read | ||
contents: read | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: c-cpp | ||
build: none # Specify build none to skip any build steps | ||
|
||
- name: Build Code | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake ../ | ||
make -j4 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
# This is a basic workflow make doxygen documentation | ||
# every time develop is updated | ||
name: Doxygen | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the develop branch | ||
push: | ||
branches: [ develop ] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "Doxygen" | ||
|
||
Doxygen: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
|
||
# Updates the package list to ensure you get the latest version of packages | ||
- run: sudo apt-get update | ||
|
||
# Installs texlive for LaTeX support in Doxygen documentation | ||
- run: sudo apt-get install -y texlive | ||
|
||
# Installs libjs-mathjax for rendering mathematical notation in Doxygen documentation | ||
- run: sudo apt-get install -y libjs-mathjax | ||
|
||
# Install perl for bibtex | ||
- run: sudo apt-get install -y perl | ||
|
||
# Runs a single command using the runners shell | ||
- name: Doxygen Action | ||
uses: mattnotmitt/[email protected] | ||
with: | ||
doxyfile-path: './doc/Doxyfile' | ||
working-directory: . | ||
|
||
# Deploys the generated documentation to GitHub Pages | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./doc/html |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
# Lint our code and throw error if something is looking fishy in the changes | ||
name: Super Linter | ||
|
||
on: | ||
pull_request: | ||
branches: [develop] | ||
|
||
|
||
jobs: | ||
super-linter: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run Super Linter | ||
uses: github/super-linter@v7 | ||
continue-on-error: true | ||
env: | ||
VALIDATE_MARKDOWN: true # Enable Markdown linting | ||
VALIDATE_DOCKERFILE: true # Enable Dockerfile linting | ||
VALIDATE_YAML: true # Enable YAML linting | ||
VALIDATE_GITHUB_ACTIONS: true # Enable GitHub Actions workflow linting | ||
VALIDATE_PYTHON: true # Enable Python linting | ||
VALIDATE_ALL_CODEBASE: true # Lint the entire codebase | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for permissions | ||
# DISABLE_LINTERS: "CPP" # Disable linting for other languages | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# This workflow make sure PR tittles obeys Contributing guide | ||
name: "PR Title Checker" | ||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- labeled | ||
- unlabeled | ||
workflow_dispatch: # This allows the workflow to be triggered manually | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- uses: thehanimo/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
pass_on_octokit_error: false | ||
local_configuration_path: .github/pr-title-checker-config.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,17 @@ endif() | |
################################## MaCh3 ###################################### | ||
#If MaCh3 was sourced find it, otherwise use CPM | ||
SET(MaCh3_FOUND FALSE) | ||
find_package(MaCh3 1.3.5 EXACT QUIET) | ||
|
||
# KS: Here we try to find tag matching tutorial version. If we can't find one then use develop | ||
# This will allow to grab tutorial for tagged MaCh3 version without a need of manually changing version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really an upgrade? It's now requiring two strings to be updated anytime we update core version - I don't think there's any new feature here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess it's related to the flexible core update - but I don't know if that's really a good thing to support - need more discussion |
||
if(NOT DEFINED MaCh3_Branch) | ||
SET(MaCh3_Branch "v1.3.5") | ||
find_package(MaCh3 1.3.5 EXACT QUIET) | ||
else() | ||
# If user is just trying to use their own version we can grab it | ||
find_package(MaCh3 QUIET) | ||
endif() | ||
|
||
|
||
if(NOT MaCh3_FOUND) | ||
cmessage(STATUS "Didn't find MaCh3, attempting to use built in MaCh3") | ||
|
@@ -152,7 +162,7 @@ if(NOT MaCh3_FOUND) | |
|
||
CPMAddPackage( | ||
NAME MaCh3 | ||
GIT_TAG "v1.3.5" | ||
GIT_TAG ${MaCh3_Branch} | ||
GITHUB_REPOSITORY mach3-software/MaCh3 | ||
) | ||
else() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we really get away with the CPP linter enabled? I guess you've dealt with this by including the continue-on-error true? I think it's more useful to disable the CPP linter and require errors on YAML to be fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like for example, you can see a YAML error here: https://github.com/DUNE/MaCh3_DUNE/actions/runs/13117147270/job/36594095657#step:4:939
To me, it's more important that we catch these YAML errors and have the bot fail