Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update github actions #69

Merged
merged 1 commit into from
Feb 16, 2024
Merged
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
Update github actions
Signed-off-by: Raul Metsma <[email protected]>
  • Loading branch information
metsma authored and mrts committed Feb 16, 2024
commit 107bd570ac818ef9ec5a52d074b7762f4bec1625
5 changes: 4 additions & 1 deletion .github/workflows/cmake-linux-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ on: [push, pull_request]

env:
BUILD_TYPE: RelWithDebInfo
CMAKE_BUILD_PARALLEL_LEVEL: 3

jobs:
build:
runs-on: ubuntu-latest
container: mrts/qt-cmake-gtest-valgrind-ubuntu:v1.8

steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libgtest-dev libpcsclite-dev

- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -S . -B build

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cmake-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request]

env:
BUILD_TYPE: RelWithDebInfo
CMAKE_BUILD_PARALLEL_LEVEL: 3
OPENSSL_ROOT_DIR: /usr/local/opt/openssl

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cmake-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: [push, pull_request]

env:
BUILD_TYPE: RelWithDebInfo
CMAKE_BUILD_PARALLEL_LEVEL: 3

jobs:
build:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
container: mrts/qt-cmake-gtest-valgrind-ubuntu:v1.8
permissions:
actions: read
contents: read
Expand All @@ -21,6 +20,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt update -qq && sudo apt install --no-install-recommends -y cmake libgtest-dev libpcsclite-dev

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.8.0)
cmake_minimum_required(VERSION 3.16.0)
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,22 @@ See more examples in [tests](tests).
## Building

apt install build-essential pkg-config cmake libgtest-dev valgrind libpcsclite-dev
sudo bash -c 'cd /usr/src/googletest && cmake . && cmake --build . --target install'

cd build
cmake .. # optionally with -DCMAKE_BUILD_TYPE=Debug
cmake --build . # optionally with VERBOSE=1
cmake -S . -B build # optionally with -DCMAKE_BUILD_TYPE=Debug
cmake --build build # optionally with VERBOSE=1

## Testing

Build as described above, then run inside `build` directory:

ctest # or 'valgrind --leak-check=full ctest'
ctest --test-dir build # or 'valgrind --leak-check=full ctest --test-dir build'

`ctest` runs tests that use the _libscard-mock_ library to mock PC/SC API calls.

There are also integration tests that use the real operating system PC/SC
service, run them inside `build` directory with:

./libpcsc-cpp-test-integration
./build/libpcsc-cpp-test-integration

## Development guidelines

Expand Down
Loading