Skip to content

Commit

Permalink
Merge pull request #8 from NTIA/CrossPlatform-and-Proplib2.0
Browse files Browse the repository at this point in the history
PropLib 2.0 refactor, cross-platform support
  • Loading branch information
aromanielloNTIA authored Oct 28, 2024
2 parents 6490d4d + bdb3c2c commit e863109
Show file tree
Hide file tree
Showing 66 changed files with 2,373 additions and 1,510 deletions.
103 changes: 103 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# NTIA/ITS C++ Clang-Format Style Options
# Updated 9/25/2024
---
AlignAfterOpenBracket: BlockIndent
AlignOperands: AlignAfterOperator
AlignTrailingComments: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BasedOnStyle: WebKit
BinPackArguments: false
BinPackParameters: false
BitFieldColonSpacing: After
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BeforeLambdaBody: false
BeforeWhile: false
BreakBeforeBinaryOperators: All
BreakBeforeBraces: Attach
BreakInheritanceList: AfterColon
BreakBeforeConceptDeclarations: false
BreakConstructorInitializers: AfterColon
BreakStringLiterals: true
ColumnLimit: 80
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
EmptyLineBeforeAccessModifier: Never
FixNamespaceComments: true
IncludeBlocks: Regroup
IndentAccessModifiers: true
IndentCaseBlocks: true
IndentCaseLabels: true
IndentExternBlock: Indent
IndentGotoLabels: true
IndentPPDirectives: BeforeHash
IndentRequires: true
IndentWidth: 4
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
LineEnding: CRLF
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Right
ReflowComments: false
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: false
SpaceBeforeInheritanceColon: false
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInConditionalStatement: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++14
TabWidth: 4
UseTab: Never
58 changes: 58 additions & 0 deletions .github/workflows/ctest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# This action compiles the library and runs all unit tests using an OS and CMake matrix
# Doxygen documentation is also built. Build fails on missing documentation.
name: Unit Tests

on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
workflow_dispatch:

# Define the matrix for different operating systems
jobs:
build-and-test:
name: ${{ matrix.os }} / CMake ${{ matrix.cmakeVersion }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Windows-2019 is used as a dedicated 32-bit build/test platform
os: [ubuntu-latest, macos-latest, windows-latest, windows-2019]
# CMake >= 3.21 is required to use "--preset <presetName>" and discover generators
cmakeVersion: ["3.21", latest]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Clone required submodules
run: |
git submodule init extern/googletest
git submodule init extern/doxygen-awesome-css
git submodule update
- name: Install CMake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmakeVersion }}

- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
with:
version: "1.11.0"

- name: "CMake: Build and Test (32-bit)"
if: matrix.os == 'windows-2019'
uses: lukka/run-cmake@v10
with:
configurePreset: release32
buildPreset: release32
testPreset: release32

- name: "CMake: Build and Test (64-bit)"
if: matrix.os != 'windows-2019'
uses: lukka/run-cmake@v10
with:
configurePreset: release64
buildPreset: release64
testPreset: release64
70 changes: 70 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This action builds **AND DEPLOYS** Doxygen documentation to GitHub Pages
# Doxygen site is DEPLOYED if this action is triggered by publishing a release.
# Doxygen site is NOT DEPLOYED (only built) when triggered by pull request or dispatched.
name: C++ Docs

on:
release:
types: ["published"]
pull_request:
branches: ["main", "dev"]
workflow_dispatch:

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Clone doxygen-awesome-css submodule
run: |
git submodule init extern/doxygen-awesome-css
git submodule update
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
with:
version: "1.11.0"

- name: Setup GitHub Pages
if: ${{ github.event_name == 'release' }}
id: pages
uses: actions/configure-pages@v5

- name: Install CMake
uses: lukka/get-cmake@latest

- name: Build documentation with Doxygen
uses: lukka/run-cmake@v10
with:
configurePreset: docsOnly
buildPreset: docsOnly

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
if: ${{ github.event_name == 'release' }}
with:
path: ./docs/html/

deploy:
if: ${{ github.event_name == 'release'}}
needs: build
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
70 changes: 70 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This action compiles multi-platform binaries for a release.
# It is triggered when a new tag is made with a version number starting with "v"
name: Create Release Artifacts

on:
push:
tags: ['v[0-9]+.*']
workflow_dispatch:

permissions:
contents: write

jobs:
create_release_artifacts:
name: Create release artifacts
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install CMake # (latest stable version)
uses: lukka/get-cmake@latest

- name: "CMake: Build (32-bit)"
if: matrix.os == 'windows-2019'
uses: lukka/run-cmake@v10
with:
configurePreset: release32
configurePresetAdditionalArgs: "['-DBUILD_DOCS=OFF', '-DRUN_TESTS=OFF']"
buildPreset: release32

- name: "CMake: Build (64-bit)"
if: matrix.os != 'windows-2019'
uses: lukka/run-cmake@v10
with:
configurePreset: release64
configurePresetAdditionalArgs: "['-DBUILD_DOCS=OFF', '-DRUN_TESTS=OFF']"
buildPreset: release64

- name: Upload release artifact (macOS or Linux)
if: runner.os != 'Windows'
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.os }}
path: |
${{ github.workspace }}/bin/*.dylib
${{ github.workspace }}/bin/*.so
if-no-files-found: error
overwrite: true

- name: Upload release artifact (Windows x86)
if: matrix.os == 'windows-2019'
uses: actions/upload-artifact@v4
with:
name: release-windows-x86
path: ${{ github.workspace }}\bin\Debug\*.dll
if-no-files-found: error
overwrite: true

- name: Upload release artifact (Windows x64)
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v4
with:
name: release-windows-x64
path: ${{ github.workspace }}\bin\Debug\*.dll
if-no-files-found: error
overwrite: true
29 changes: 28 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,31 @@ Thumbs.db
*.aps
**/obj
**/x64
**/x86
**/x86

#########
## CMake
#########
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
build


###########
## Doxygen
###########
docs/html

###########
## VS Code
###########
.vscode
7 changes: 7 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[submodule "extern/doxygen-awesome-css"]
path = extern/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css
[submodule "extern/googletest"]
path = extern/googletest
url = https://github.com/google/googletest
branch = v1.12.x
10 changes: 6 additions & 4 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
"orcid": "0000-0002-7417-4009",
"affiliation": "The Institute for Telecommunication Sciences",
"name": "Kozma Jr, William"
},
{
"orcid": "0000-0001-8437-6504",
"affiliation": "The Institute for Telecommunication Sciences",
"name": "Romaniello, Anthony W."
}
],

"title": "Recommendation ITU-R P.2108-1, Release 1.0",

"description": "Models for the prediction of clutter loss",
"upload_type": "software",

"version": "1.0.0",

"keywords": ["Study Group 3", "ITU-R", "P2108", "clutter", "propagation"]
}
Loading

0 comments on commit e863109

Please sign in to comment.