-
Notifications
You must be signed in to change notification settings - Fork 5
57 lines (46 loc) · 2.08 KB
/
macos-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
##############################################################################
# Copyright (c) 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 12", os: macos-12, osx_arch: "x86_64", build_type: "Debug", deps: "none", fetch_deps: YES, build_emv_tool: NO }
- { name: "MacOS 12", os: macos-12, osx_arch: "x86_64", build_type: "Release", deps: "pcsclite", fetch_deps: NO, build_emv_tool: YES }
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Release", deps: "none", fetch_deps: NO, build_emv_tool: NO }
- { name: "MacOS 13", os: macos-13, osx_arch: "x86_64", build_type: "Debug", deps: "pcsclite", fetch_deps: YES, build_emv_tool: YES }
name: ${{ matrix.name }} (${{ matrix.osx_arch }}) build (static/${{ matrix.build_type }}/${{ matrix.deps }})
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: |
brew install pkg-config
brew install boost
brew install iso-codes
brew install json-c
brew install gettext
- 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: 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 }}" -DFETCH_ARGP=${{ matrix.fetch_deps }} -DBUILD_EMV_TOOL=${{ matrix.build_emv_tool }}
- name: Build
run: cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure