Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ddf4e4c
Refactor toolkit into independent components
glopesdev Jan 30, 2026
f988c4b
Add draft for benchmarking tool
bruno-f-cruz Feb 1, 2026
793d5cd
Refactor toolkit into independent components (#15)
glopesdev Feb 10, 2026
7b9ea10
Remove date from copyright statement
glopesdev Feb 25, 2026
77afbd4
Remove project specific properties
glopesdev Feb 25, 2026
525c371
Merge pull request #17 from harp-tech/project-layout
glopesdev Feb 25, 2026
e4e736d
Add device project template into toolkit (#18)
glopesdev Feb 25, 2026
26618cd
Normalize repository structure (#19)
glopesdev Mar 16, 2026
1456704
Remove unused dependencies
glopesdev Mar 16, 2026
95b3837
Add interface and firmware generator commands (#21)
glopesdev Mar 16, 2026
9eeb9b0
Add metadata generation command (#22)
glopesdev Mar 16, 2026
60f0b4a
Split device project template into separate repo (#23)
glopesdev Mar 17, 2026
8f864d0
Add default path for device and IO metadata (#24)
glopesdev Mar 17, 2026
d231f3f
Add code generation documentation (#25)
glopesdev Mar 17, 2026
f4e681e
Update harp generator version (#26)
glopesdev Mar 22, 2026
d13b083
Update harp generators (#27)
glopesdev Mar 22, 2026
61eb848
Refactor toolkit into independent components
glopesdev Jan 30, 2026
dd331ce
Add draft for benchmarking tool
bruno-f-cruz Feb 1, 2026
4b8c932
Merge branch 'feature-add-benchmarking-tool' of https://github.com/ha…
bruno-f-cruz Mar 25, 2026
513d527
Add dependencies
bruno-f-cruz Mar 25, 2026
87b09ae
Refactor folder structure to latest version of the library
bruno-f-cruz Mar 25, 2026
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
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"docfx": {
"version": "2.78.3",
"commands": [
"docfx"
],
"rollForward": false
}
}
}
53 changes: 36 additions & 17 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,27 +1,46 @@
# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
###############################
# Core EditorConfig Options #
###############################
# All files
root = true

[*]
indent_style = space

# XML project files
[*.{csproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
#--------------------------------------------------------------------------------------------------
# XML, JSON, and web files
#--------------------------------------------------------------------------------------------------
[*.{xml,csproj,vcxproj,vcxproj.filters,shproj,props,targets,config,nuspec,resx,vsixmanifest,wxs,vstemplate,slnx}]
indent_size = 2

# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
[*.json]
indent_size = 2

# Code files
[*.{cs,csx}]
[*.{html,css}]
indent_size = 2

#--------------------------------------------------------------------------------------------------
# C++
#--------------------------------------------------------------------------------------------------
[*.{c,cpp,h,hpp,ixx}]
indent_size = 4
charset = utf-8-bom
trim_trailing_whitespace = true
insert_final_newline = true

#--------------------------------------------------------------------------------------------------
# C#
#--------------------------------------------------------------------------------------------------
[*.{cs,csx}]
indent_size = 4
charset = utf-8-bom
###############################
# .NET Coding Conventions #
###############################
[*.{cs}]
# Organize usings
dotnet_sort_system_directives_first = true
trim_trailing_whitespace = true
insert_final_newline = true

# Language keyword vs full type name
# Predefined for members, etc does not create a message because the explicitly sized types are conveient in interop scenarios where the bit size matters.
dotnet_style_predefined_type_for_locals_parameters_members = true:none
dotnet_style_predefined_type_for_member_access = true:suggestion

# Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = warning

# Don't complain about not using modern collection syntax
dotnet_style_prefer_collection_expression = never
csharp_style_prefer_range_operator = false
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

# Scripts
*.cmd text eol=crlf
*.sh text eol=lf
*.ps1 text

# Config
*.gitignore text
*.gitattributes text
*.gitmodules text eol=lf
*.editorconfig text
*.git-blame-ignore-revs text
*.sln text
Expand Down Expand Up @@ -39,4 +41,4 @@ LICENSE text
*.png binary
*.ico binary
*.gif binary
*.svg text
*.svg text
291 changes: 291 additions & 0 deletions .github/workflows/Harp.Toolkit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,291 @@
# =======================================================================================================================================================================
# Harp.Toolkit CI/CD
# =======================================================================================================================================================================
# Index:
# * Build, test, and package .NET
# * Build documentation
# * Publish packages to GitHub
# * Publish packages to NuGet.org
# * Publish documentation
# =======================================================================================================================================================================
# Note that this is a generic workflow meant for all Bonsai packages. Minor local modifications are fine, see https://github.com/bonsai-rx/prefect for more information.
# =======================================================================================================================================================================
name: Harp.Toolkit
on:
push:
# This prevents tag pushes from triggering this workflow
branches: ['**']
pull_request:
release:
types: [published]
workflow_dispatch:
inputs:
publish-documentation:
description: "Publish documentation to GitHub Pages?"
default: "false"
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
ContinuousIntegrationBuild: true
jobs:
# =====================================================================================================================================================================
# Build, test, and package .NET
# ___ _ _ _ _ _ _ _ _ _ ___ _____
# | _ )_ _(_) |__| | | |_ ___ __| |_ __ _ _ _ __| | _ __ __ _ __| |____ _ __ _ ___ | \| | __|_ _|
# | _ \ || | | / _` |_ | _/ -_|_-< _|_ / _` | ' \/ _` | | '_ \/ _` / _| / / _` / _` / -_) _| .` | _| | |
# |___/\_,_|_|_\__,_( ) \__\___/__/\__( ) \__,_|_||_\__,_| | .__/\__,_\__|_\_\__,_\__, \___| (_)_|\_|___| |_|
# |/ |/ |_| |___/
# =====================================================================================================================================================================
build:
strategy:
fail-fast: false
matrix:
platform:
- name: Windows x64
os: windows-latest
rid: win-x64
- name: Linux x64
os: ubuntu-latest
rid: linux-x64
configuration: ['debug', 'release']
include:
- platform:
rid: win-x64
configuration: release
collect-packages: true
name: ${{matrix.platform.name}} ${{matrix.configuration}}
runs-on: ${{matrix.platform.os}}
outputs:
need-workflow-image-render: ${{steps.configure-build.outputs.need-workflow-image-render}}
steps:
# ----------------------------------------------------------------------- Checkout
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

# ----------------------------------------------------------------------- Set up tools
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

# ----------------------------------------------------------------------- Configure build
- name: Configure build
id: configure-build
uses: bonsai-rx/configure-build@v1

# ----------------------------------------------------------------------- Build
- name: Restore
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration ${{matrix.configuration}}

# ----------------------------------------------------------------------- Pack
- name: Pack
id: pack
run: dotnet pack --no-restore --no-build --configuration ${{matrix.configuration}}

# ----------------------------------------------------------------------- Test
- name: Test .NET 8
run: dotnet test --no-restore --no-build --configuration ${{matrix.configuration}} --verbosity normal --framework net8.0

# ----------------------------------------------------------------------- Collect artifacts
- name: Collect NuGet packages
uses: actions/upload-artifact@v4
if: matrix.collect-packages && steps.pack.outcome == 'success' && always()
with:
name: Packages
if-no-files-found: error
path: artifacts/package/${{matrix.configuration}}/**

# =====================================================================================================================================================================
# Build documentation
# ___ _ _ _ _ _ _ _
# | _ )_ _(_) |__| | __| |___ __ _ _ _ __ ___ _ _| |_ __ _| |_(_)___ _ _
# | _ \ || | | / _` | / _` / _ \/ _| || | ' \/ -_) ' \ _/ _` | _| / _ \ ' \
# |___/\_,_|_|_\__,_| \__,_\___/\__|\_,_|_|_|_\___|_||_\__\__,_|\__|_\___/_||_|
# =====================================================================================================================================================================
build-documentation:
name: Build documentation
runs-on: ubuntu-latest
steps:
# ----------------------------------------------------------------------- Checkout
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

# ----------------------------------------------------------------------- Set up tools
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Set up .NET tools
run: dotnet tool restore

# ----------------------------------------------------------------------- Configure build
- name: Configure build
id: configure-build
uses: bonsai-rx/configure-build@v1

# ----------------------------------------------------------------------- Restore
- name: Restore
run: dotnet restore

# ----------------------------------------------------------------------- Build metadata
- name: Build metadata
id: build-metadata
run: dotnet docfx metadata docs/docfx.json --noRestore

# ----------------------------------------------------------------------- Build documentation
- name: Build documentation
id: build-documentation
run: dotnet docfx build docs/docfx.json

# ----------------------------------------------------------------------- Collect artifacts
- name: Collect documentation metadata
uses: actions/upload-artifact@v4
if: steps.build-metadata.outcome == 'success' && always()
with:
name: DocumentationMetadata
if-no-files-found: error
path: artifacts/docs/api/

- name: Collect documentation artifact
uses: actions/upload-artifact@v4
if: steps.build-documentation.outcome == 'success' && always()
with:
name: DocumentationWebsite
if-no-files-found: error
path: artifacts/docs/site/

# =====================================================================================================================================================================
# Publish packages to GitHub
# ___ _ _ _ _ _ _ ___ _ _ _ _ _
# | _ \_ _| |__| (_)__| |_ _ __ __ _ __| |____ _ __ _ ___ ___ | |_ ___ / __(_) |_| || |_ _| |__
# | _/ || | '_ \ | (_-< ' \ | '_ \/ _` / _| / / _` / _` / -_|_-< | _/ _ \ | (_ | | _| __ | || | '_ \
# |_| \_,_|_.__/_|_/__/_||_| | .__/\__,_\__|_\_\__,_\__, \___/__/ \__\___/ \___|_|\__|_||_|\_,_|_.__/
# |_| |___/
# =====================================================================================================================================================================
publish-github:
name: Publish packages to GitHub
runs-on: ubuntu-latest
needs: build
permissions:
# Needed to attach files to releases
contents: write
# Needed to upload to GitHub Packages
packages: write
if: github.event_name == 'push' || github.event_name == 'release'
steps:
# ----------------------------------------------------------------------- Set up .NET
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

# ----------------------------------------------------------------------- Download built packages
- name: Download built packages
uses: actions/download-artifact@v4
with:
name: Packages
path: artifacts/packages/

# ----------------------------------------------------------------------- Upload release assets
- name: Upload release assets
if: github.event_name == 'release'
run: gh release upload --repo ${{github.repository}} ${{github.event.release.tag_name}} artifacts/packages/* --clobber
env:
GH_TOKEN: ${{github.token}}

# ----------------------------------------------------------------------- Push to GitHub Packages
- name: Push to GitHub Packages
run: dotnet nuget push "artifacts/packages/*.nupkg" --skip-duplicate --no-symbols --api-key ${{secrets.GITHUB_TOKEN}} --source https://nuget.pkg.github.com/${{github.repository_owner}}
env:
# This is a workaround for https://github.com/NuGet/Home/issues/9775
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0

# =====================================================================================================================================================================
# Publish packages to NuGet.org
# ___ _ _ _ _ _ _ _ _ ___ _
# | _ \_ _| |__| (_)__| |_ _ __ __ _ __| |____ _ __ _ ___ ___ | |_ ___ | \| |_ _ / __|___| |_ ___ _ _ __ _
# | _/ || | '_ \ | (_-< ' \ | '_ \/ _` / _| / / _` / _` / -_|_-< | _/ _ \ | .` | || | (_ / -_) _|_/ _ \ '_/ _` |
# |_| \_,_|_.__/_|_/__/_||_| | .__/\__,_\__|_\_\__,_\__, \___/__/ \__\___/ |_|\_|\_,_|\___\___|\__(_)___/_| \__, |
# |_| |___/ |___/
# =====================================================================================================================================================================
publish-packages-nuget-org:
name: Publish packages to NuGet.org
runs-on: ubuntu-latest
environment: public-release
needs: build
if: github.event_name == 'release'
steps:
# ----------------------------------------------------------------------- Set up .NET
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

# ----------------------------------------------------------------------- Download built packages
- name: Download built packages
uses: actions/download-artifact@v4
with:
name: Packages
path: artifacts/packages/

# ----------------------------------------------------------------------- Push to NuGet.org
- name: Push to NuGet.org
run: dotnet nuget push "artifacts/packages/*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source ${{vars.NUGET_API_URL}}
env:
# This is a workaround for https://github.com/NuGet/Home/issues/9775
DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0


# =====================================================================================================================================================================
# Publish documentation
# ___ _ _ _ _ _ _ _ _
# | _ \_ _| |__| (_)__| |_ __| |___ __ _ _ _ __ ___ _ _| |_ __ _| |_(_)___ _ _
# | _/ || | '_ \ | (_-< ' \ / _` / _ \/ _| || | ' \/ -_) ' \ _/ _` | _| / _ \ ' \
# |_| \_,_|_.__/_|_/__/_||_| \__,_\___/\__|\_,_|_|_|_\___|_||_\__\__,_|\__|_\___/_||_|
# =====================================================================================================================================================================
publish-documentation:
name: Publish documentation
runs-on: ubuntu-latest
# Publishing is not strictly necessary here, but if we're going to do a public release we want to wait to publish the docs until it goes out
needs: [build-documentation, publish-packages-nuget-org]
permissions:
# Both required by actions/deploy-pages
pages: write
id-token: write
environment:
# Intentionally not using the "default" github-pages environment as it's not compatible with this workflow
name: documentation-website
url: ${{steps.publish.outputs.page_url}}
# Only run if the workflow isn't dying and build-documentation was successful and either A) we're releasing or B) we have continuous deployment enabled
if: |
!cancelled() && !failure() && needs.build-documentation.result == 'success'
&& (github.event_name == 'release'
|| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish-documentation == 'true')
|| (vars.CONTINUOUS_DOCUMENTATION && github.event_name != 'pull_request')
)
steps:
# ----------------------------------------------------------------------- Download documentation website components
- name: Download documentation website
uses: actions/download-artifact@v4
with:
name: DocumentationWebsite

# ----------------------------------------------------------------------- Collect artifacts
- name: Upload final documentation website artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'

# ----------------------------------------------------------------------- Publish to GitHub Pages
- name: Publish to GitHub Pages
id: publish
uses: actions/deploy-pages@v4
Loading
Loading