Implement CAPKs for EMV XML configuration #543
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################################################################## | |
| # Copyright 2022-2026 Leon Lynch | |
| # | |
| # This file is licensed under the terms of the LGPL v2.1 license. | |
| # See LICENSE file. | |
| ############################################################################## | |
| name: Ubuntu build | |
| on: [push] | |
| jobs: | |
| build-ubuntu-debug: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "none", iso8859: "simple", build_emv_tool: NO, build_emv_viewer: NO } | |
| - { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "boost/pcsclite", iso8859: "boost", build_emv_tool: YES, build_emv_viewer: NO } | |
| - { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "boost/qt", iso8859: "boost", build_emv_tool: NO, build_emv_viewer: YES } | |
| - { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "iconv/pcsclite", iso8859: "iconv", build_emv_tool: YES, build_emv_viewer: NO } | |
| - { name: "Ubuntu 22.04", os: ubuntu-22.04, deps: "iconv/qt", iso8859: "iconv", build_emv_tool: NO, build_emv_viewer: YES } | |
| - { name: "Ubuntu 24.04", os: ubuntu-24.04, deps: "iconv/pcsclite/qt", iso8859: "iconv", build_emv_tool: YES, build_emv_viewer: YES } | |
| name: ${{ matrix.name }} build (static/debug/${{ matrix.deps }}) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libmbedtls-dev libxml2-dev libboost-locale-dev iso-codes libjson-c-dev | |
| - name: Install PCSCLite | |
| if: contains(matrix.deps, 'pcsclite') | |
| run: sudo apt-get install -y libpcsclite-dev | |
| - name: Install Qt5 | |
| if: contains(matrix.deps, 'qt') | |
| run: sudo apt-get install -y qtbase5-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - run: git describe --always --dirty | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE="Debug" \ | |
| -DISO8859_IMPL=${{ matrix.iso8859 }} \ | |
| -DBUILD_EMV_DECODE=YES \ | |
| -DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }} \ | |
| -DBUILD_EMV_VIEWER=${{ matrix.build_emv_viewer }} | |
| - name: Build | |
| run: cmake --build build -j 4 | |
| - name: Test | |
| run: ctest --test-dir build -j 4 --output-on-failure | |
| build-ubuntu-sanitizers: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { name: "Ubuntu (debug/sanitizers)", build_type: "Debug" } | |
| - { name: "Ubuntu (release/sanitizers)", build_type: "RelWithDebInfo" } | |
| name: ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libmbedtls-dev libxml2-dev libboost-locale-dev iso-codes libjson-c-dev libpcsclite-dev qtbase5-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Configure CMake with sanitizers | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" \ | |
| -DEMV_UTILS_ENABLE_SANITIZERS=YES \ | |
| -DBUILD_EMV_DECODE=YES \ | |
| -DBUILD_EMV_TOOL=YES \ | |
| -DBUILD_EMV_VIEWER=YES | |
| - name: Build | |
| run: cmake --build build -j 4 | |
| - name: Test with sanitizers | |
| run: ctest --test-dir build -j 4 --output-on-failure | |
| build-ubuntu-hardening: | |
| name: Ubuntu (hardening) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libmbedtls-dev libxml2-dev libboost-locale-dev iso-codes libjson-c-dev libpcsclite-dev qtbase5-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Configure CMake with hardening | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ | |
| -DBUILD_SHARED_LIBS=YES \ | |
| -DEMV_UTILS_ENABLE_HARDENING=YES \ | |
| -DBUILD_EMV_DECODE=YES \ | |
| -DBUILD_EMV_TOOL=YES \ | |
| -DBUILD_EMV_VIEWER=YES | |
| - name: Build | |
| run: cmake --build build -j 4 | |
| - name: Test with hardening | |
| run: ctest --test-dir build -j 4 --output-on-failure | |
| build-ubuntu-release: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { name: "Ubuntu 22.04", os: ubuntu-22.04, ubuntu_release_name: "jammy" } | |
| - { name: "Ubuntu 24.04", os: ubuntu-24.04, ubuntu_release_name: "noble" } | |
| name: ${{ matrix.name }} build (release) | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libmbedtls-dev libxml2-dev libxml2-utils libboost-locale-dev iso-codes libjson-c-dev libpcsclite-dev doxygen qtbase5-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Get version from git tag | |
| run: echo "GIT_DESCRIBE=$(git describe --always --dirty)" >> $GITHUB_ENV | |
| - name: Configure CMake | |
| # CPACK_DEBIAN_PACKAGE_RELEASE augments the package version for the | |
| # intended Ubuntu release. The ppa1 component indicates that this is not | |
| # an official Ubuntu package. The release name component indicates that | |
| # this is for the specific Ubuntu release that has that name. | |
| run: | | |
| cmake -B build \ | |
| -DCMAKE_BUILD_TYPE="RelWithDebInfo" \ | |
| -DCMAKE_INSTALL_PREFIX=/usr \ | |
| -DBUILD_SHARED_LIBS=YES \ | |
| -DBUILD_DOCS=YES \ | |
| -DBUILD_EMV_DECODE=YES \ | |
| -DBUILD_EMV_TOOL=YES \ | |
| -DBUILD_EMV_VIEWER=YES \ | |
| -DCPACK_COMPONENTS_GROUPING=ALL_COMPONENTS_IN_ONE \ | |
| -DCPACK_DEBIAN_PACKAGE_RELEASE="0ubuntu1~ppa1~${{ matrix.ubuntu_release_name }}1" | |
| - name: Build | |
| run: cmake --build build -j 4 | |
| - name: Test | |
| run: ctest --test-dir build -j 4 --output-on-failure | |
| - name: Package | |
| run: cmake --build build --target package | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: emv-utils-${{ env.GIT_DESCRIBE }}-${{ matrix.os }} | |
| path: build/emv-utils_*.deb | |
| if-no-files-found: error |