fmt/.github/workflows/macos.yml

38 lines
1.0 KiB
YAML
Raw Normal View History

2020-11-03 21:46:03 +03:00
name: macos
2020-11-03 21:45:16 +03:00
2020-11-04 03:01:26 +03:00
on: [push, pull_request]
2020-11-03 21:45:16 +03:00
jobs:
build:
runs-on: macos-10.15
2020-11-03 23:16:15 +03:00
strategy:
matrix:
build_type: [Debug, Release]
include:
- shared: -DBUILD_SHARED_LIBS=ON
2020-11-03 21:45:16 +03:00
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
2020-11-04 01:02:07 +03:00
- name: Configure
2020-11-03 21:45:16 +03:00
working-directory: ${{runner.workspace}}/build
2020-11-04 01:02:07 +03:00
run: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.shared}} \
-DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
2020-11-04 01:02:07 +03:00
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
2020-11-03 21:45:16 +03:00
- name: Build
working-directory: ${{runner.workspace}}/build
run: |
threads=`sysctl -n hw.logicalcpu`
cmake --build . --config ${{matrix.build_type}} --parallel $threads
2020-11-03 21:45:16 +03:00
- name: Test
working-directory: ${{runner.workspace}}/build
2020-11-03 23:16:15 +03:00
run: ctest -C ${{matrix.build_type}}
env:
CTEST_OUTPUT_ON_FAILURE: True