diff --git a/.appveyor.yml b/.appveyor.yml index dc0f3669..abbe46d6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -151,9 +151,13 @@ for: choco install opencppcoverage Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh OpenCppCoverage.exe --quiet --export_type cobertura:cobertura.xml ` - --sources ${env:APPVEYOR_BUILD_FOLDER} --modules "$PWD" ` - --cover_children --working_dir "$PWD" -- ctest -C Debug - bash codecov.sh -f cobertura.xml -n Appveyor -e APPVEYOR_BUILD_WORKER_IMAGE -X gcov -X search -Z -U "-s" -A "-s" + --sources ${env:APPVEYOR_BUILD_FOLDER} --modules "$PWD" ` + --cover_children --working_dir "$PWD" -- ctest -C Debug + $commit = if ($env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT) { $env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT } else { $env:APPVEYOR_REPO_COMMIT } + bash codecov.sh -f cobertura.xml -n Appveyor -e APPVEYOR_BUILD_WORKER_IMAGE ` + -C $commit ` + -X gcov -X search -Z ` + -U "-s" -A "-s" } # Build consumer example test - cmake --build . --config %configuration% --target install diff --git a/.github/workflows/ci_tests.yml b/.github/workflows/ci_tests.yml index 21a0178d..28ce99a0 100644 --- a/.github/workflows/ci_tests.yml +++ b/.github/workflows/ci_tests.yml @@ -30,6 +30,8 @@ jobs: BOOST_VERSION: 1.56.0 steps: - uses: actions/checkout@v2 + - name: Sanity check version + run: grep -E 'set\(_version [0-9]' CMakeLists.txt - uses: actions/cache@v1 id: cache-boost with: diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 4ec122e4..c8eee115 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -41,6 +41,11 @@ jobs: steps: - uses: actions/checkout@v2 + if: '!matrix.coverage' + - uses: actions/checkout@v2 + if: 'matrix.coverage' + with: + fetch-depth: 0 - name: Install packages if: matrix.install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9cc39be..65c96515 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,14 @@ jobs: - name: Extract tag name id: get_tag run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" + - name: Sanity check version + run: | + version=${{steps.get_tag.outputs.tag}} + if ! grep -q "set(_version ${version#v})" CMakeLists.txt; then + echo "Version mismatch." + echo "Expected '${version#v}', found '$(grep -E 'set\(_version [0-9]' CMakeLists.txt)'" + exit 1 + fi - name: Create documentation run: | sudo apt-get install doxygen diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f120aea..fc3cfd0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ cmake_minimum_required(VERSION 3.9) # Version number starts at 10 to avoid conflicts with Boost version -set(_version 11.1.0) +set(_version 11.1.2) if(BOOST_SUPERPROJECT_SOURCE_DIR) set(_version ${BOOST_SUPERPROJECT_VERSION}) endif() diff --git a/doc/changelog.dox b/doc/changelog.dox index 44b55c56..61514d26 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -10,7 +10,12 @@ \section changelog Changelog -\subsection changelog_11_1_1 Nowide 11.1.1 (Boost 1.76) +\subsection changelog_11_1_2 Nowide 11.1.2 (Boost 1.76) + +- Don't define `__MSVCRT_VERSION__` version to fix compatibility with ucrt +- Known issues: Read performance for text files is degraded. Binary files and writing is unaffected. + +\subsection changelog_11_1_1 Nowide 11.1.1 - Fix discarding of characters for text file streams when seek or sync functions are used and newlines were converted (e.g. on Windows) - Fix potential use-after-free bug when reusing (via `open`) a file stream that has been closed diff --git a/include/boost/nowide/config.hpp b/include/boost/nowide/config.hpp index a2af3112..55027361 100644 --- a/include/boost/nowide/config.hpp +++ b/include/boost/nowide/config.hpp @@ -17,13 +17,6 @@ //! @cond Doxygen_Suppress -// MinGW32 requires a __MSVCRT_VERSION__ defined to make some functions available, e.g. _stat64 -// Hence define this here to target MSVC 7.0 which has the required functions and do it as early as possible -// as including a system header might default this to 0x0600 which is to low -#if defined(__MINGW32__) && !defined(__MSVCRT_VERSION__) -#define __MSVCRT_VERSION__ 0x0700 -#endif - #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_NOWIDE_DYN_LINK) #ifdef BOOST_NOWIDE_SOURCE #define BOOST_NOWIDE_DECL BOOST_SYMBOL_EXPORT diff --git a/standalone/config.hpp b/standalone/config.hpp index 1ab9bfdd..c2def428 100644 --- a/standalone/config.hpp +++ b/standalone/config.hpp @@ -11,13 +11,6 @@ #include -// MinGW32 requires a __MSVCRT_VERSION__ defined to make some functions available, e.g. _stat64 -// Hence define this here to target MSVC 7.0 which has the required functions and do it as early as possible -// as including a system header might default this to 0x0600 which is to low -#if defined(__MINGW32__) && !defined(__MSVCRT_VERSION__) -#define __MSVCRT_VERSION__ 0x0700 -#endif - #if(defined(__WIN32) || defined(_WIN32) || defined(WIN32)) && !defined(__CYGWIN__) #define NOWIDE_WINDOWS #endif