Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
31 changes: 31 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,37 @@ jobs:
- name: List working directory
run: ${{ matrix.dir_command }}

native-coverage-windows:
name: native-coverage-windows-asan
if: ${{ github.event_name == 'pull_request' || github.event_name == 'push' }}
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Build Rust FFI libraries (release)
shell: pwsh
run: |
cargo build --manifest-path native/rust/Cargo.toml --release -p cose_sign1_validation_ffi -p cose_sign1_validation_ffi_certificates -p cose_sign1_validation_ffi_mst -p cose_sign1_validation_ffi_akv -p cose_sign1_validation_ffi_trust

- name: Install OpenCppCoverage
shell: pwsh
run: |
choco install opencppcoverage -y --no-progress

- name: Native C coverage (Debug + ASAN, 95% gate)
shell: pwsh
run: |
./native/c/collect-coverage.ps1 -Configuration Debug -MinimumLineCoveragePercent 95

- name: Native C++ coverage (Debug + ASAN, 95% gate)
shell: pwsh
run: |
./native/c_pp/collect-coverage.ps1 -Configuration Debug -MinimumLineCoveragePercent 95

# Create a changelog that includes all the PRs merged since the last release.
# If it's not a pull request, skip to the build job.
create_changelog:
Expand Down
44 changes: 44 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ bld/
[Ll]og/
[Ll]ogs/

# CMake build directories
build/
build-*/
cmake-build-*/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand Down Expand Up @@ -149,6 +154,11 @@ coverage*.json
coverage*.xml
coverage*.info

# Coverage output directories (native scripts, OpenCppCoverage, etc.)
coverage/
coverage-*/
coverage*/

# Visual Studio code coverage results
*.coverage
*.coveragexml
Expand Down Expand Up @@ -198,6 +208,26 @@ PublishScripts/
*.nupkg
# NuGet Symbol Packages
*.snupkg

# vcpkg artifacts (manifest mode / local dev)
vcpkg_installed/
vcpkg/downloads/
vcpkg/buildtrees/
vcpkg/packages/

# vcpkg artifacts that may appear under subfolders
native/**/vcpkg_installed/
native/**/vcpkg/downloads/
native/**/vcpkg/buildtrees/
native/**/vcpkg/packages/

# Native (C/C++) CMake build outputs
native/**/build/
native/**/CMakeFiles/
native/**/CMakeCache.txt
native/**/cmake_install.cmake
native/**/CTestTestfile.cmake
native/**/Testing/
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
Expand Down Expand Up @@ -366,3 +396,17 @@ FodyWeavers.xsd

# Visual Studio live unit testing configuration files.
*.lutconfig

# --- Rust (Cargo) ---
# Cargo build artifacts (repo-wide; native/rust also has its own .gitignore)
**/target/

# Rustfmt / editor backups
**/*.rs.bk

# LLVM/coverage/profiling artifacts (can be emitted outside target)
**/*.profraw
**/*.profdata
lcov.info
tarpaulin-report.html

22 changes: 22 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": 4,
"configurations": [
{
"name": "windows-msvc-x64 (native packs)",
"intelliSenseMode": "windows-msvc-x64",
"cStandard": "c11",
"cppStandard": "c++17",
"includePath": [
"${workspaceFolder}/native/c/include",
"${workspaceFolder}/native/c_pp/include",
"${workspaceFolder}/native/c_pp/../c/include"
],
"defines": [
"COSE_HAS_CERTIFICATES_PACK",
"COSE_HAS_MST_PACK",
"COSE_HAS_AKV_PACK",
"COSE_HAS_TRUST_PACK"
]
}
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
// This repo contains multiple independent CMake projects under native/.
// The C/C++ extension may not automatically pick up per-target CMake definitions,
// so we provide a workspace-wide IntelliSense config in .vscode/c_cpp_properties.json
// (including COSE_HAS_*_PACK defines) to prevent pack-gated code from being greyed out.
"C_Cpp.default.intelliSenseMode": "windows-msvc-x64",
"C_Cpp.default.cppStandard": "c++17",
"C_Cpp.default.cStandard": "c11"
}
31 changes: 31 additions & 0 deletions native/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# CMake build directories
build/
Build/
out/
build-*/
cmake-build-*/

# Rust build artifacts
target/

# Visual Studio
.vs/
*.user
*.suo
*.vcxproj.user

# Test outputs
Testing/

# Coverage reports
coverage/
coverage-*/
coverage*/
*.profraw
*.profdata

# vcpkg artifacts (when using vcpkg from this folder)
vcpkg_installed/
vcpkg/downloads/
vcpkg/buildtrees/
vcpkg/packages/
Loading
Loading