Skip to content

Commit 5c851e6

Browse files
committed
Initial commit
Signed-off-by: Mart Somermaa <mrts@users.noreply.github.com>
1 parent b707249 commit 5c851e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+7487
-1
lines changed

.clang-format

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
BasedOnStyle: WebKit
2+
3+
Standard: Cpp11
4+
ColumnLimit: 100
5+
6+
# Disable reflow of qdoc comments: indentation rules are different.
7+
# Translation comments are also excluded
8+
CommentPragmas: "^!|^:"
9+
10+
# We want & and * to be attached to the type
11+
PointerBindsToType: true
12+
13+
# We want long lines to break before the operators, but not before a '='
14+
BreakBeforeBinaryOperators: NonAssignment
15+
16+
# Braces are usually attached, but not after functions or classes declaration
17+
BreakBeforeBraces: Custom
18+
BraceWrapping:
19+
AfterClass: true
20+
AfterControlStatement: false
21+
AfterEnum: false
22+
AfterFunction: true
23+
AfterNamespace: true
24+
AfterObjCDeclaration: false
25+
AfterStruct: true
26+
AfterUnion: false
27+
BeforeCatch: false
28+
BeforeElse: false
29+
IndentBraces: false
30+
31+
AlignAfterOpenBracket: true
32+
AlwaysBreakTemplateDeclarations: true
33+
AllowShortFunctionsOnASingleLine: Inline
34+
SpaceInEmptyBlock: false
35+
FixNamespaceComments: true
36+
Cpp11BracedListStyle: true
37+
BreakConstructorInitializers: AfterColon
38+
39+
SortIncludes: false
40+
41+
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]

.gitattributes

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Assures that line endings are consistently normalized.
2+
#
3+
# Comments:
4+
# - use filter='...' to pass through external filters, e.g. clang-format
5+
6+
# --- Source files
7+
*.c text
8+
*.cc text
9+
*.cpp text
10+
*.cxx text
11+
*.h text
12+
*.hh text
13+
*.hpp text
14+
*.ipp text
15+
16+
*.js text
17+
*.pl text
18+
*.py text
19+
20+
# --- Resource files
21+
*.rc text eol=crlf
22+
*.rc2 text eol=crlf
23+
24+
# --- Windows and VS-specific files
25+
*.bat text eol=crlf
26+
*.cmd text eol=crlf
27+
*.cpy text eol=crlf
28+
*.ddf text eol=crlf
29+
*.def text eol=crlf
30+
*.inf text eol=crlf
31+
*.msbuild text eol=crlf
32+
*.sln text eol=crlf
33+
*.vcproj text eol=crlf
34+
*.vcxproj text eol=crlf
35+
36+
# --- Text files
37+
*.htm text
38+
*.html text
39+
*.md text
40+
*.properties text
41+
*.rst text
42+
*.txt text
43+
*.xml text
44+
45+
# --- Binary files
46+
*.bmp binary
47+
*.dll binary
48+
*.exe binary
49+
*.gif binary
50+
*.ico binary
51+
*.jpg binary
52+
*.lib binary
53+
*.png binary
54+
55+
# --- git files
56+
.gitignore text eol=lf
57+
.gitattributes text eol=lf
58+
.clang-format text eol=lf
59+
60+
# --- Makefiles
61+
Makefile text eol=lf
62+
Makefile.dep text eol=lf
63+
64+
# --- CMake files
65+
CMakeLists.txt text
66+
67+
# --- Shell scripts, git hooks
68+
*.sh text eol=lf
69+
commit-msg text eol=lf
70+
pre-commit text eol=lf
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CMake (Ubuntu Linux)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: RelWithDebInfo
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
container: mrts/qt-cmake-gtest-valgrind-ubuntu:v1.8
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
submodules: recursive
17+
18+
- name: Create build directory
19+
run: mkdir build
20+
21+
- name: Configure CMake
22+
working-directory: ${{github.workspace}}/build
23+
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
24+
25+
- name: Build
26+
working-directory: ${{github.workspace}}/build
27+
run: cmake --build . --config $BUILD_TYPE
28+
29+
- name: Test
30+
working-directory: ${{github.workspace}}/build
31+
run: ctest -V -C $BUILD_TYPE

.github/workflows/cmake-macos.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CMake (macOS)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: RelWithDebInfo
7+
8+
jobs:
9+
build:
10+
runs-on: macos-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
with:
16+
submodules: recursive
17+
18+
- name: Install libraries
19+
run: brew install web-eid/gtest/gtest
20+
21+
- name: Create build directory
22+
run: mkdir build
23+
24+
- name: Configure CMake
25+
working-directory: ${{github.workspace}}/build
26+
run: cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
27+
28+
- name: Build
29+
working-directory: ${{github.workspace}}/build
30+
run: cmake --build . --config ${BUILD_TYPE}
31+
32+
- name: Test
33+
working-directory: ${{github.workspace}}/build
34+
run: ctest -V -C ${BUILD_TYPE}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CMake (Windows)
2+
3+
on: [push, pull_request]
4+
5+
env:
6+
BUILD_TYPE: RelWithDebInfo
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
with:
16+
submodules: recursive
17+
18+
- name: Prepare vcpkg and libraries
19+
uses: lukka/run-vcpkg@v6
20+
with:
21+
vcpkgArguments: gtest:x64-windows
22+
vcpkgTriplet: x64-windows
23+
vcpkgDirectory: ${{runner.workspace}}/vcpkg/
24+
vcpkgGitCommitId: ec6fe06e8da05a8157dc8581fa96b36b571c1bd5
25+
26+
- name: Create build directory
27+
run: mkdir build
28+
29+
- name: Configure CMake
30+
working-directory: ${{github.workspace}}/build
31+
run: cmake -A x64 "-DCMAKE_TOOLCHAIN_FILE=${{runner.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake" "-DCMAKE_BUILD_TYPE=${env:BUILD_TYPE}" ..
32+
33+
- name: Build
34+
working-directory: ${{github.workspace}}/build
35+
run: cmake --build . --config ${env:BUILD_TYPE}
36+
37+
- name: Test
38+
working-directory: ${{github.workspace}}/build
39+
run: ctest -V -C ${env:BUILD_TYPE}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
# ******** NOTE ********
12+
13+
name: CodeQL code analysis
14+
15+
on:
16+
push:
17+
branches: [ main ]
18+
pull_request:
19+
# The branches below must be a subset of the branches above
20+
branches: [ main ]
21+
schedule:
22+
- cron: '18 17 * * 4'
23+
24+
jobs:
25+
analyze:
26+
name: Analyze
27+
runs-on: ubuntu-latest
28+
container: mrts/qt-cmake-gtest-valgrind-ubuntu:v1.8
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
language: [ 'cpp' ]
34+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
35+
# Learn more...
36+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
37+
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v2
41+
with:
42+
submodules: recursive
43+
44+
# Initializes the CodeQL tools for scanning.
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v1
47+
with:
48+
languages: ${{ matrix.language }}
49+
# If you wish to specify custom queries, you can do so here or in a config file.
50+
# By default, queries listed here will override any specified in a config file.
51+
# Prefix the list here with "+" to use these queries and those in the config file.
52+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
53+
54+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55+
# If this step fails, then you should remove it and run the build manually (see below)
56+
- name: Autobuild
57+
uses: github/codeql-action/autobuild@v1
58+
59+
# ℹ️ Command-line programs to run using the OS shell.
60+
# 📚 https://git.io/JvXDl
61+
62+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63+
# and modify them (or add more) to build your code if your project
64+
# uses a compiled language
65+
66+
#- run: |
67+
# make bootstrap
68+
# make release
69+
70+
- name: Perform CodeQL Analysis
71+
uses: github/codeql-action/analyze@v1

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.swp
2+
tags
3+
build/
4+
.vscode/
5+
*.user

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "lib/libpcsc-cpp"]
2+
path = lib/libpcsc-cpp
3+
url = ../libpcsc-cpp

0 commit comments

Comments
 (0)