mirror of
https://github.com/fmtlib/fmt.git
synced 2026-10-29 18:39:03 +08:00
GitHub is retiring the macOS 14 runner image on November 2nd, 2026, with brownouts starting October 5th. Switch to macos-15, which is also arm64, and pin it explicitly to match how the other workflows pin their images. Also drop the Xcode 14.3 selection step: it was gated on macos-13, which is no longer in the matrix and has already been retired.
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: macos
|
|
|
|
on: [push, pull_request]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: >-
|
|
c++${{matrix.std }} ${{ matrix.build_type}}
|
|
${{matrix.shared && 'Shared' || ''}}
|
|
strategy:
|
|
matrix:
|
|
os: [macos-15]
|
|
build_type: [Debug, Release]
|
|
std: [11, 17, 20, 23]
|
|
shared: [""]
|
|
include:
|
|
- os: macos-15
|
|
std: 23
|
|
build_type: Release
|
|
shared: -DBUILD_SHARED_LIBS=ON
|
|
|
|
runs-on: '${{ matrix.os }}'
|
|
|
|
steps:
|
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Set timezone
|
|
run: sudo systemsetup -settimezone 'Europe/Minsk'
|
|
|
|
- name: Create Build Environment
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
- name: Configure
|
|
working-directory: ${{runner.workspace}}/build
|
|
run: |
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.shared}} \
|
|
-DCMAKE_CXX_STANDARD=${{matrix.std}} \
|
|
-DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
|
|
-DFMT_DOC=OFF -DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
|
|
|
|
- name: Build
|
|
working-directory: ${{runner.workspace}}/build
|
|
run: |
|
|
threads=`sysctl -n hw.logicalcpu`
|
|
cmake --build . --config ${{matrix.build_type}} --parallel $threads
|
|
|
|
- name: Test
|
|
working-directory: ${{runner.workspace}}/build
|
|
run: ctest -C ${{matrix.build_type}}
|
|
env:
|
|
CTEST_OUTPUT_ON_FAILURE: True
|