2020-11-03 18:46:03 +00:00
|
|
|
name: macos
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2020-11-04 00:01:26 +00:00
|
|
|
on: [push, pull_request]
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2022-05-30 00:58:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-11-03 18:45:16 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-03 20:16:15 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-05-27 17:58:57 +00:00
|
|
|
os: [macos-13, macos-14]
|
2020-11-03 20:16:15 +00:00
|
|
|
build_type: [Debug, Release]
|
2023-05-23 16:52:57 +00:00
|
|
|
std: [11, 17, 20]
|
|
|
|
exclude:
|
|
|
|
- { os: macos-13, std: 11 }
|
|
|
|
- { os: macos-13, std: 17 }
|
2021-05-18 12:38:55 +00:00
|
|
|
include:
|
|
|
|
- shared: -DBUILD_SHARED_LIBS=ON
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2023-05-23 16:52:57 +00:00
|
|
|
runs-on: '${{ matrix.os }}'
|
|
|
|
|
2020-11-03 18:45:16 +00:00
|
|
|
steps:
|
2024-06-02 13:22:27 +00:00
|
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2022-12-22 15:25:12 +00:00
|
|
|
- name: Set timezone
|
|
|
|
run: sudo systemsetup -settimezone 'Asia/Yekaterinburg'
|
|
|
|
|
2023-05-23 16:52:57 +00:00
|
|
|
- name: Select Xcode 14.3 (macOS 13)
|
|
|
|
run: sudo xcode-select -s "/Applications/Xcode_14.3.app"
|
|
|
|
if: ${{ matrix.os == 'macos-13' }}
|
|
|
|
|
2020-11-03 18:45:16 +00:00
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
2020-11-03 22:02:07 +00:00
|
|
|
- name: Configure
|
2020-11-03 18:45:16 +00:00
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 22:02:07 +00:00
|
|
|
run: |
|
2021-05-18 12:38:55 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.shared}} \
|
2022-11-13 10:18:57 +00:00
|
|
|
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
2021-05-18 12:38:55 +00:00
|
|
|
-DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
|
2020-11-03 22:02:07 +00:00
|
|
|
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2021-06-03 05:00:00 +00:00
|
|
|
run: |
|
|
|
|
threads=`sysctl -n hw.logicalcpu`
|
|
|
|
cmake --build . --config ${{matrix.build_type}} --parallel $threads
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 20:16:15 +00:00
|
|
|
run: ctest -C ${{matrix.build_type}}
|
2021-05-06 16:20:46 +00:00
|
|
|
env:
|
|
|
|
CTEST_OUTPUT_ON_FAILURE: True
|