mirror of
https://github.com/nlohmann/json.git
synced 2026-10-06 22:47:13 +00:00
Squashed onto develop from: - Make the json.tar.xz release archive configure standalone - Update the supported compiler list and the CITATION.cff repository link - Add json_fwd.hpp to the Bazel singleheader-json target - Document SwiftPM's #include <json.hpp> form and add CI coverage - Migrate REUSE metadata from deprecated .reuse/dep5 to REUSE.toml Signed-off-by: Niels Lohmann <mail@nlohmann.me>
109 lines
3.5 KiB
YAML
109 lines
3.5 KiB
YAML
name: macOS
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- develop
|
|
- master
|
|
- release/*
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
macos-15:
|
|
runs-on: macos-15 # https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
|
|
strategy:
|
|
matrix:
|
|
xcode: ['16.0', '16.1', '16.2', '16.3', '16.4', '26.0.1', '26.1.1', '26.2', '26.3']
|
|
env:
|
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Run CMake
|
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
|
- name: Build
|
|
run: cmake --build build --parallel 10
|
|
- name: Test
|
|
run: cd build ; ctest -j 10 --output-on-failure
|
|
|
|
macos-26:
|
|
runs-on: macos-26 # https://github.com/actions/runner-images/blob/main/images/macos/macos-26-arm64-Readme.md
|
|
strategy:
|
|
matrix:
|
|
xcode: ['26.4.1', '26.5', '26.6']
|
|
env:
|
|
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Run CMake
|
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_FastTests=ON
|
|
- name: Build
|
|
run: cmake --build build --parallel 10
|
|
- name: Test
|
|
run: cd build ; ctest -j 10 --output-on-failure
|
|
|
|
xcode_standards:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
standard: [11, 14, 17, 20, 23, 26]
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Run CMake
|
|
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Debug -DJSON_BuildTests=On -DJSON_TestStandards=${{ matrix.standard }}
|
|
- name: Build
|
|
run: cmake --build build --parallel 10
|
|
- name: Test
|
|
run: cd build ; ctest -j 10 --output-on-failure
|
|
|
|
swiftpm:
|
|
runs-on: macos-15
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
- name: Check that Package.swift resolves without a deprecation warning
|
|
run: swift package dump-package
|
|
- name: Build the SwiftPM documentation example against this checkout
|
|
run: |
|
|
mkdir -p /tmp/json-swiftpm-consumer/Sources/MyLibrary
|
|
cp docs/mkdocs/docs/integration/swift/example.cpp /tmp/json-swiftpm-consumer/Sources/MyLibrary/example.cpp
|
|
cat > /tmp/json-swiftpm-consumer/Package.swift << EOF
|
|
// swift-tools-version: 5.9
|
|
import PackageDescription
|
|
|
|
let package = Package(
|
|
name: "MyPackage",
|
|
dependencies: [
|
|
.package(path: "${{ github.workspace }}")
|
|
],
|
|
targets: [
|
|
.target(
|
|
name: "MyLibrary",
|
|
dependencies: [
|
|
.product(name: "json", package: "json")
|
|
],
|
|
publicHeadersPath: "."
|
|
)
|
|
]
|
|
)
|
|
EOF
|
|
cd /tmp/json-swiftpm-consumer
|
|
swift build
|