mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
50
.github/workflows/main.yml
vendored
50
.github/workflows/main.yml
vendored
@@ -138,6 +138,56 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd build && ctest --output-on-failure
|
cd build && ctest --output-on-failure
|
||||||
|
|
||||||
|
# build-osx-13-arm64:
|
||||||
|
# runs-on: macos-13-arm64
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# standard: ['11', '14', '17', '20']
|
||||||
|
# unreleased: ['ON', 'OFF']
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout
|
||||||
|
# uses: actions/checkout@v3
|
||||||
|
# with:
|
||||||
|
# submodules: true
|
||||||
|
# - name: Install
|
||||||
|
# run: |
|
||||||
|
# brew install boost
|
||||||
|
# - name: Configure
|
||||||
|
# run: |
|
||||||
|
# mkdir build && cd build
|
||||||
|
# cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_USE_UNRELEASED_TOML_FEATURES=${{ matrix.unreleased }}
|
||||||
|
# - name: Build
|
||||||
|
# run: |
|
||||||
|
# cd build && cmake --build .
|
||||||
|
# - name: Test
|
||||||
|
# run: |
|
||||||
|
# cd build && ctest --output-on-failure
|
||||||
|
|
||||||
|
build-osx-13:
|
||||||
|
runs-on: macos-13
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
standard: ['11', '14', '17', '20']
|
||||||
|
unreleased: ['ON', 'OFF']
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- name: Install
|
||||||
|
run: |
|
||||||
|
brew install boost
|
||||||
|
- name: Configure
|
||||||
|
run: |
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_USE_UNRELEASED_TOML_FEATURES=${{ matrix.unreleased }}
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd build && cmake --build .
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cd build && ctest --output-on-failure
|
||||||
|
|
||||||
build-osx-12:
|
build-osx-12:
|
||||||
runs-on: macos-12
|
runs-on: macos-12
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ inline std::string str_error(int errnum)
|
|||||||
{
|
{
|
||||||
return std::string(buf.data());
|
return std::string(buf.data());
|
||||||
}
|
}
|
||||||
#elif defined(_GNU_SOURCE)
|
#elif defined(_GNU_SOURCE) && !(defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200112L )
|
||||||
constexpr std::size_t bufsize = 256;
|
constexpr std::size_t bufsize = 256;
|
||||||
std::array<char, bufsize> buf;
|
std::array<char, bufsize> buf;
|
||||||
buf.fill('\0');
|
buf.fill('\0');
|
||||||
const char* result = strerror_r(errnum, buf.data(), bufsize);
|
const char* result = strerror_r(errnum, buf.data(), bufsize);
|
||||||
return std::string(result);
|
return std::string(result);
|
||||||
#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600)
|
#elif (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || ( defined(__DARWIN_C_LEVEL) && __DARWIN_C_LEVEL >= 200112L ) // macOS
|
||||||
constexpr std::size_t bufsize = 256;
|
constexpr std::size_t bufsize = 256;
|
||||||
std::array<char, bufsize> buf;
|
std::array<char, bufsize> buf;
|
||||||
buf.fill('\0');
|
buf.fill('\0');
|
||||||
|
|||||||
Reference in New Issue
Block a user