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

Feat: Additional Github Workflow Actions #37

Open
wants to merge 42 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b93a576
Adds basic doxycomments
Jan 24, 2025
97a3bfd
Adds doxyfile and workflow
Jan 24, 2025
2d64c51
Pointed to incorrect folder
Jan 24, 2025
d531076
More small typo correction in doxygen workflow
Jan 24, 2025
cc49161
More edits to doxyfile to point to correct directories
Jan 24, 2025
ed17e62
more small doxygen patches to include path
Jan 24, 2025
60a8186
Another attempt to update the doxyfile
Jan 24, 2025
752c421
finally got the thing working, remove link to this branch
Jan 24, 2025
2df7fd7
Update atmospherics doxyy-comment
Jan 24, 2025
4fdb71c
Include samplePDFBeam{N,F}D in compilation
dbarrow257 Jan 10, 2025
7d49778
Updates to cmake - move inline with T2K base cmake standards
dbarrow257 Jan 13, 2025
d7bc406
Pulling more cmake changes from T2K repo
dbarrow257 Jan 14, 2025
83c1ebf
Address all core fixes needed
dbarrow257 Jan 14, 2025
a80f83f
Bump to use v1.3.4
dbarrow257 Jan 22, 2025
61fd5f7
more merges...
Jan 24, 2025
5890c33
Update
Jan 24, 2025
1e9a24e
Update doxyfile again
Jan 24, 2025
02a9456
re-updates doxyfile to find correct paths
Jan 24, 2025
a7f666d
Remove test branch from workflow
Jan 24, 2025
282a2c0
Merge branch 'develop' into hwallace/feature/doxyfiles
henry-wallace-phys Jan 24, 2025
d7dc4ca
Update CMakeLists.txt
henry-wallace-phys Jan 24, 2025
537af14
add code scanning workflow
Jan 25, 2025
4388623
adds linter
Jan 25, 2025
6439ad0
forgot comma for debugging
Jan 25, 2025
ac50652
Debugging commit to test linter performance
Jan 25, 2025
26ff129
Debugging commit to test linter performance on c++
Jan 25, 2025
8c18498
For now removing debugging code from Linter workflow
Jan 25, 2025
ed43b4c
Adds PR title checker (with additional core_update title) from MaCh3 …
Jan 25, 2025
d62fca1
Small tweak to CMakeLists to let user pull their own version of core …
Jan 25, 2025
9023903
adds workflow to build DUNE against develop on a weekly basis in orde…
Jan 25, 2025
a4e57dc
small fix to indentation in workflow yaml
Jan 25, 2025
4138a29
More small typos in workflow yaml
Jan 25, 2025
cb38cbd
Update docker again to change core_version->mach3_core_version
Jan 25, 2025
66d6a18
debugging commit to workflow to pull this branch
Jan 25, 2025
d9444cc
More dumb typos in docker files
Jan 25, 2025
efbb0fa
Changes name of docker image created by this job
Jan 25, 2025
a9e8db3
Clean up debugging code, remove unecessary complexity from workflow
Jan 25, 2025
7622d15
Adds landmine test
Jan 25, 2025
f972ce4
Remove separate file, just needs to be in CI workflow
Jan 25, 2025
0e10c3e
fix yaml
Jan 25, 2025
4f27f63
Remove core/develop branch matching test for now
Jan 25, 2025
bd3a1c6
Remove landmine checker
henry-wallace-phys Feb 3, 2025
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
17 changes: 17 additions & 0 deletions .github/pr-title-checker-config.json
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": ""
}
}
38 changes: 38 additions & 0 deletions .github/workflows/CodeQL.yml
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
56 changes: 56 additions & 0 deletions .github/workflows/Doxygen.yml
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
31 changes: 31 additions & 0 deletions .github/workflows/Linter.yml
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
Copy link
Member

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

Copy link
Member

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

24 changes: 24 additions & 0 deletions .github/workflows/PRTitleChecker.yml
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
14 changes: 12 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The 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?

Copy link
Member

Choose a reason for hiding this comment

The 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")
Expand Down Expand Up @@ -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()
Expand Down
Loading