From 4564d9a1314e8dbd01ba769b94133b9eba4f36ad Mon Sep 17 00:00:00 2001 From: PhilipDeegan Date: Sun, 31 Oct 2021 17:59:40 +0100 Subject: [PATCH] github actions for mac/linux/windows (#1056) --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++ include/yaml-cpp/node/detail/node.h | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0565fe1 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Github PR +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + + - name: Build static + shell: bash + run: | + mkdir -p build && cd build + cmake .. + cmake --build . --parallel 4 + + - name: Test static + shell: bash + run: cd build && ctest --output-on-failure + + - name: Build shared + shell: bash + run: | + rm -rf build && mkdir -p build && cd build + cmake .. -DYAML_BUILD_SHARED_LIBS=ON + cmake --build . --parallel 4 + + # tests are failing for unknown reasons + - if: matrix.os == 'ubuntu-latest' + name: Test shared + shell: bash + run: cd build && ctest --output-on-failure + # test all ASAP diff --git a/include/yaml-cpp/node/detail/node.h b/include/yaml-cpp/node/detail/node.h index b881c2c..acf60ff 100644 --- a/include/yaml-cpp/node/detail/node.h +++ b/include/yaml-cpp/node/detail/node.h @@ -169,7 +169,7 @@ class node { using nodes = std::set; nodes m_dependencies; size_t m_index; - static std::atomic m_amount; + static YAML_CPP_API std::atomic m_amount; }; } // namespace detail } // namespace YAML