Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .DS_Store
Binary file not shown.
2,736 changes: 0 additions & 2,736 deletions .github/doxygen/Doxyfile

This file was deleted.

95 changes: 0 additions & 95 deletions .github/doxygen/logo.svg

This file was deleted.

23 changes: 0 additions & 23 deletions .github/scripts/check_version.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .github/scripts/patch_doxyfile.sh

This file was deleted.

41 changes: 0 additions & 41 deletions .github/scripts/prepare_doxygen.sh

This file was deleted.

48 changes: 6 additions & 42 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,14 @@
name: Build and test code
name: Build and Test code

on:
push:
branches:
- main
pull_request:

jobs:
build:

strategy:
matrix:
env:
- toolchain: "toolchain/gcc-linux.cmake"
runner: ubuntu-latest
generator: ""
- toolchain: "toolchain/clang-macos.cmake"
runner: macos-latest
generator: ""
- toolchain: "\"toolchain/clang-windows.cmake\""
runner: windows-latest
generator: "-G \"Visual Studio 17 2022\""

runs-on: ${{ matrix.env.runner }}

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Linux reqs
if: ${{ matrix.env.runner == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y clang cmake cppcheck clang-format clang-tidy gcc pre-commit

- name: Install macOS reqs
if: ${{ matrix.env.runner == 'macos-latest' }}
run: |
brew install llvm cppcheck clang-format gcc pre-commit

- name: Build
run: |
cmake ${{ matrix.env.generator }} -B build -S . -DCMAKE_TOOLCHAIN_FILE=${{ matrix.env.toolchain }}
cmake --build build -j8

- name: Run Linux/macOS tests
if: ${{ matrix.env.runner == 'ubuntu-latest' || matrix.env.runner == 'macos-latest' }}
run: |
./build/bin/keypopcard_ut
jobs:
call-reusable-workflow:
uses: eclipse-keypop/keypop-actions/.github/workflows/reusable-cpp-build-and-test.yml@main # NOSONAR - Same organization, trusted source
with:
test_executable_name: './build/bin/keypopcard_ut'
38 changes: 7 additions & 31 deletions .github/workflows/publish-doc-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,13 @@ name: Publish API documentation (release)
on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version tag (ex: 1.0.0)'
required: true

permissions:
checks: write

jobs:
publish-doc-release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate and prepare documentation
uses: eclipse-keypop/keypop-actions/doxygen@v2
with:
repo-name: ${{ github.event.repository.name }}
version: ${{ github.event.inputs.version || github.ref_name }}

- name: Deploy to doc branch
run: |
git config --global user.name "Eclipse Keypop Bot"
git config --global user.email "${{ github.repository }}-bot@eclipse.org"
cd ${{ github.event.repository.name }}
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git add .
git commit -m "docs: update ${{ github.event.inputs.version || github.ref_name }} documentation"
git push origin doc --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: eclipse-keypop/keypop-actions/.github/workflows/reusable-publish-doxygen.yml@main # NOSONAR - Same organization, trusted source
with:
version: ${{ github.event.inputs.version || github.ref_name }}
secrets: inherit # NOSONAR - Same organization, trusted source
30 changes: 5 additions & 25 deletions .github/workflows/publish-doc-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,10 @@ on:
- main
workflow_dispatch:

permissions:
checks: write

jobs:
publish-doc-snapshot:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Generate and prepare documentation
uses: eclipse-keypop/keypop-actions/doxygen@v2
with:
repo-name: ${{ github.event.repository.name }}

- name: Deploy to doc branch
run: |
git config --global user.name "Eclipse Keypop Bot"
git config --global user.email "${{ github.repository }}-bot@eclipse.org"
cd ${{ github.event.repository.name }}
git remote set-url origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git add .
git diff --quiet && git diff --staged --quiet || git commit -m "docs: update snapshot documentation"
git push origin doc --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: eclipse-keypop/keypop-actions/.github/workflows/reusable-publish-doxygen.yml@main # NOSONAR - Same organization, trusted source
secrets: inherit # NOSONAR - Same organization, trusted source
38 changes: 0 additions & 38 deletions .github/workflows/publish-to-keypop-doc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(KeypopCardCppApi
VERSION 2.0.0
VERSION 2.0.1
LANGUAGES C CXX)

SET(CMAKE_PROJECT_VERSION_MAJOR "2")
SET(CMAKE_PROJECT_VERSION_MINOR "0")
SET(CMAKE_PROJECT_VERSION_PATCH "0")
SET(CMAKE_PROJECT_VERSION_PATCH "1")

SET(CMAKE_PROJECT_VERSION "${CMAKE_PROJECT_VERSION_MAJOR}.
${CMAKE_PROJECT_VERSION_MINOR}.
Expand Down
9 changes: 7 additions & 2 deletions include/keypop/card/ApduResponseApi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,19 @@ class ApduResponseApi {
*/
virtual const std::vector<uint8_t>& getApdu() const = 0;

/**
* C++
*/
virtual void setApdu(const std::vector<std::uint8_t>& apdu) = 0;

/**
* Gets the data part of the response received from the card (excluding the
* status word).
*
* @return A not null byte array.
* @since 1.0.0
*/
virtual const std::vector<uint8_t> getDataOut() const = 0;
virtual std::vector<uint8_t> getDataOut() const = 0;

/**
* Gets the status word of the APDU as an int.
Expand All @@ -61,7 +66,7 @@ class ApduResponseApi {
*/
friend std::ostream&
operator<<(std::ostream& os, const ApduResponseApi& ara) {
const std::vector<uint8_t> apdu = ara.getApdu();
const std::vector<uint8_t>& apdu = ara.getApdu();
const std::vector<uint8_t> dataOut = ara.getDataOut();

std::stringstream ssApdu;
Expand Down
Loading
Loading