Skip to content

Fix Qt6 QByteArray to QString conversion for emv-viewer #185

Fix Qt6 QByteArray to QString conversion for emv-viewer

Fix Qt6 QByteArray to QString conversion for emv-viewer #185

Workflow file for this run

##############################################################################
# Copyright 2022-2024 Leon Lynch
#
# This file is licensed under the terms of the LGPL v2.1 license.
# See LICENSE file.
##############################################################################
name: MacOS build
on: [push]
jobs:
build-macos-debug:
strategy:
fail-fast: false
matrix:
include:
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Debug", lib_type: "static", shared_libs: "NO", deps: "none", fetch_deps: YES, build_emv_tool: NO, build_emv_viewer: NO }
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Debug", lib_type: "shared", shared_libs: "YES", deps: "pcsclite/qt5", fetch_deps: NO, build_emv_tool: YES, build_emv_viewer: YES }
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Release", lib_type: "shared", shared_libs: "YES", deps: "pcsclite/qt6", fetch_deps: YES, build_emv_tool: YES, build_emv_viewer: YES }
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Release", lib_type: "static", shared_libs: "NO", deps: "none", fetch_deps: NO, build_emv_tool: NO, build_emv_viewer: NO }
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Release", lib_type: "shared", shared_libs: "YES", deps: "pcsclite/qt5", fetch_deps: NO, build_emv_tool: YES, build_emv_viewer: YES }
- { name: "MacOS 14", os: macos-14, osx_arch: "arm64", build_type: "Debug", lib_type: "static", shared_libs: "NO", deps: "pcsclite/qt6", fetch_deps: YES, build_emv_tool: YES, build_emv_viewer: YES }
name: ${{ matrix.name }} (${{ matrix.osx_arch }}) build (${{ matrix.lib_type}}/${{ matrix.build_type }}/${{ matrix.deps }})
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
brew install boost
brew install iso-codes
brew install json-c
- name: Install argp-standalone using brew
if: ${{ matrix.fetch_deps == 'NO' }}
run: brew install argp-standalone
- name: Install PCSCLite using brew
if: contains(matrix.deps, 'pcsclite')
run: |
brew install pcsc-lite
echo "PKG_CONFIG_PATH=$(brew --prefix pcsc-lite)/lib/pkgconfig" >> $GITHUB_ENV
- name: Install Qt5 using brew
# Homebrew doesn't support universal binaries so only install Qt for arch-specific builds
if: contains(matrix.deps, 'qt5')
run: |
brew install qt@5
echo "QT_DIR=$(brew --prefix qt@5)/lib/cmake/Qt5" >> $GITHUB_ENV
- name: Install Qt6 using brew
# Homebrew doesn't support universal binaries so only install Qt for arch-specific builds
if: contains(matrix.deps, 'qt6')
run: |
brew install qt@6
echo "QT_DIR=$(brew --prefix qt@6)/lib/cmake/Qt6" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure CMake
run: cmake -B build -DCMAKE_OSX_ARCHITECTURES="${{ matrix.osx_arch }}" -DCMAKE_BUILD_TYPE="${{ matrix.build_type }}" -DBUILD_SHARED_LIBS=${{ matrix.shared_libs }} -DFETCH_ARGP=${{ matrix.fetch_deps }} -DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }} -DBUILD_EMV_VIEWER=${{ matrix.build_emv_viewer }}
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure