Skip to content

Commit 01888d6

Browse files
committed
Merge branch 'develop'
2 parents dc8653d + ba092ab commit 01888d6

File tree

9 files changed

+132
-29
lines changed

9 files changed

+132
-29
lines changed

.appveyor.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ environment:
102102
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
103103
GENERATOR: Visual Studio 16 2019
104104
configuration: Debug
105-
BOOST_ROOT: C:\Libraries\boost_1_71_0
105+
BOOST_ROOT: C:\Libraries\boost_1_73_0
106106
COVERAGE: true
107107
# Work around for https://community.codecov.io/t/bash-script-does-not-detect-appveyor/1094
108108
APPVEYOR: true
@@ -137,6 +137,7 @@ for:
137137
only: [CMAKE: true]
138138
install: true
139139
before_build:
140+
- dir C:\Libraries
140141
- if exist build\ (rmdir /S /Q build)
141142
- set "INSTALL_DIR=%APPVEYOR_BUILD_FOLDER%\installed"
142143
- if exist %INSTALL_DIR%\ (rmdir /S /Q %INSTALL_DIR%)

.azure-pipelines.yml

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,93 +45,128 @@ stages:
4545
jobs:
4646

4747
- job: 'Linux'
48-
pool:
49-
vmImage: 'ubuntu-16.04'
5048
strategy:
5149
matrix:
50+
GCC_10:
51+
B2_TOOLSET: gcc
52+
B2_CXXSTD: 14,17,20
53+
CXX: g++-10
54+
PACKAGES: g++-10
55+
VM_IMAGE: ubuntu-20.04
56+
GCC_9:
57+
B2_TOOLSET: gcc
58+
B2_CXXSTD: 14,17,2a
59+
CXX: g++-9
60+
PACKAGES: g++-9
61+
VM_IMAGE: ubuntu-20.04
5262
GCC_8:
5363
B2_TOOLSET: gcc
5464
B2_CXXSTD: 14,17,2a
5565
CXX: g++-8
5666
PACKAGES: g++-8
67+
VM_IMAGE: ubuntu-20.04
5768
GCC_7:
5869
B2_TOOLSET: gcc
5970
B2_CXXSTD: 11,14,17
6071
CXX: g++-7
6172
PACKAGES: g++-7
73+
VM_IMAGE: ubuntu-18.04
6274
GCC_6:
6375
B2_TOOLSET: gcc
6476
B2_CXXSTD: 11,14
6577
CXX: g++-6
6678
PACKAGES: g++-6
79+
VM_IMAGE: ubuntu-18.04
6780
GCC_5:
6881
B2_TOOLSET: gcc
6982
B2_CXXSTD: 11
7083
CXX: g++-5
7184
PACKAGES: g++-5
72-
GCC_4_9:
73-
B2_TOOLSET: gcc
74-
B2_CXXSTD: 03,11
75-
CXX: g++-4.9
76-
PACKAGES: g++-4.9
85+
VM_IMAGE: ubuntu-18.04
7786
GCC_4_8:
7887
B2_TOOLSET: gcc
7988
B2_CXXSTD: 03,11
8089
CXX: g++-4.8
8190
PACKAGES: g++-4.8
91+
VM_IMAGE: ubuntu-18.04
8292
Clang_12:
8393
B2_TOOLSET: clang
8494
B2_CXXSTD: 14,17,20
8595
CXX: clang++-12
8696
PACKAGES: clang-12
87-
LLVM_REPO: llvm-toolchain-xenial-12
97+
VM_IMAGE: ubuntu-20.04
98+
Clang_11:
99+
B2_TOOLSET: clang
100+
B2_CXXSTD: 14,17,20
101+
CXX: clang++-11
102+
PACKAGES: clang-11
103+
VM_IMAGE: ubuntu-20.04
104+
Clang_10:
105+
B2_TOOLSET: clang
106+
B2_CXXSTD: 14,17,20
107+
CXX: clang++-10
108+
PACKAGES: clang-10
109+
VM_IMAGE: ubuntu-20.04
88110
Clang_9:
89111
B2_TOOLSET: clang
90112
B2_CXXSTD: 14,17,2a
91113
CXX: clang++-9
92114
PACKAGES: clang-9
93-
LLVM_REPO: llvm-toolchain-xenial-9
115+
VM_IMAGE: ubuntu-20.04
116+
Clang_8:
117+
B2_TOOLSET: clang
118+
B2_CXXSTD: 14,17
119+
CXX: clang++-8
120+
PACKAGES: clang-8 libc6-dbg libc++-dev libstdc++-8-dev
121+
LLVM_OS: bionic
122+
LLVM_REPO: llvm-toolchain-bionic-8
123+
VM_IMAGE: ubuntu-18.04
94124
Clang_7:
95125
B2_TOOLSET: clang
96126
B2_CXXSTD: 14,17
97127
CXX: clang++-7
98128
PACKAGES: clang-7
99129
LLVM_REPO: llvm-toolchain-xenial-7
130+
VM_IMAGE: ubuntu-18.04
100131
Clang_6_libcxx:
101132
B2_TOOLSET: clang
102133
B2_CXXSTD: 03,11,14,17
103134
B2_STDLIB: libc++
104135
CXX: clang++-6.0
105136
PACKAGES: clang-6.0
106137
LLVM_REPO: llvm-toolchain-xenial-6.0
138+
VM_IMAGE: ubuntu-18.04
107139
Clang_6:
108140
B2_TOOLSET: clang
109141
B2_CXXSTD: 14,17
110142
CXX: clang++-6.0
111143
PACKAGES: clang-6.0
112144
LLVM_REPO: llvm-toolchain-xenial-6.0
145+
VM_IMAGE: ubuntu-18.04
113146
Clang_5:
114147
B2_TOOLSET: clang
115148
B2_CXXSTD: 11,14,17
116149
PACKAGES: clang-5.0
117150
CXX: clang++-5.0
118151
LLVM_REPO: llvm-toolchain-xenial-5.0
152+
VM_IMAGE: ubuntu-18.04
119153
Clang_4:
120154
B2_TOOLSET: clang
121155
B2_CXXSTD: 11,14
122156
CXX: clang++-4.0
123157
PACKAGES: clang-4.0
124158
LLVM_REPO: llvm-toolchain-xenial-4.0
159+
VM_IMAGE: ubuntu-18.04
125160
Clang_3_9:
126161
B2_TOOLSET: clang
127162
B2_CXXSTD: 03,11,14
128163
CXX: clang++-3.9
129164
PACKAGES: clang-3.9
130-
Clang_3_5:
131-
B2_TOOLSET: clang
132-
B2_CXXSTD: 03,11
133-
CXX: clang++-3.5
134-
PACKAGES: clang-3.5
165+
VM_IMAGE: ubuntu-18.04
166+
167+
pool:
168+
vmImage: $(VM_IMAGE)
169+
135170
steps:
136171
- bash: |
137172
set -e

.github/workflows/ci_tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
UnitTests:
1313
strategy:
1414
matrix:
15-
os: [ubuntu-16.04, windows-latest]
15+
os: [ubuntu-18.04, windows-latest]
1616
buildType: [Debug, Release]
1717
standalone: [Boost, Standalone]
1818
shared_lib: [ON, OFF]
1919
generator: ['Visual Studio 16 2019', 'MinGW Makefiles', 'Unix Makefiles']
2020
exclude:
21-
- os: ubuntu-16.04
21+
- os: ubuntu-18.04
2222
generator: MinGW Makefiles
23-
- os: ubuntu-16.04
23+
- os: ubuntu-18.04
2424
generator: Visual Studio 16 2019
25-
- os: ubuntu-16.04
25+
- os: ubuntu-18.04
2626
buildType: Debug
2727
runs-on: ${{matrix.os}}
2828
env:
@@ -103,7 +103,7 @@ jobs:
103103
ctest --output-on-failure -C ${{matrix.buildType}}
104104
105105
BoostCMakeBuild:
106-
runs-on: ubuntu-16.04
106+
runs-on: ubuntu-18.04
107107
# Doesn't work on master yet
108108
if: "! endsWith(github.ref, '/master') && ! endsWith(github.base_ref, '/master')"
109109
steps:

.github/workflows/posix.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,30 @@ on:
99
- feature/**
1010

1111
env:
12+
NET_RETRY_COUNT: 5
1213
UBSAN_OPTIONS: print_stacktrace=1
1314
B2_VARIANT: debug,release
1415
B2_LINK: shared,static
1516

1617
jobs:
1718
CI:
19+
defaults:
20+
run:
21+
shell: bash
22+
1823
strategy:
24+
fail-fast: false
1925
matrix:
2026
include:
21-
- { compiler: g++-4.4, cxxstd: '98,0x', os: ubuntu-16.04, install: yes }
22-
- { compiler: g++-5, cxxstd: '03,11,14', os: ubuntu-16.04, install: yes }
23-
- { compiler: g++-6, cxxstd: '03,11,14,17', os: ubuntu-16.04, install: yes }
27+
- { compiler: g++-4.4, cxxstd: '98,0x', os: ubuntu-20.04, container: 'ubuntu:16.04', install: yes }
28+
- { compiler: g++-5, cxxstd: '03,11,14', os: ubuntu-18.04, install: yes }
29+
- { compiler: g++-6, cxxstd: '03,11,14,17', os: ubuntu-18.04, install: yes }
2430
- { compiler: g++-7, cxxstd: '03,11,14,17', os: ubuntu-20.04, install: yes }
2531
- { compiler: g++-8, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04, install: yes }
2632
- { compiler: g++-9, cxxstd: '03,11,14,17,2a', os: ubuntu-20.04, install: yes }
2733
- { compiler: g++-10, cxxstd: '03,11,14,17,2a', sanitize: yes, os: ubuntu-20.04, install: yes, linkflags: -fuse-ld=gold }
28-
- { compiler: clang++-3.5, cxxstd: '03,11', os: ubuntu-16.04, install: yes }
29-
- { compiler: clang++-6.0, cxxstd: '03,11', os: ubuntu-16.04, install: yes }
34+
- { compiler: clang++-3.5, cxxstd: '03,11', os: ubuntu-20.04, container: 'ubuntu:16.04', install: yes }
35+
- { compiler: clang++-6.0, cxxstd: '03,11', os: ubuntu-18.04, install: yes }
3036
- { compiler: clang++-7, cxxstd: '03,11', os: ubuntu-18.04, install: yes }
3137
- { compiler: clang++-8, cxxstd: '03,11,14', os: ubuntu-18.04, install: yes }
3238
- { compiler: clang++-9, cxxstd: '03,11,14', os: ubuntu-18.04, install: yes }
@@ -37,6 +43,7 @@ jobs:
3743
- { compiler: g++-8, cxxstd: '03,11', coverage: yes, os: ubuntu-20.04, install: yes }
3844

3945
runs-on: ${{matrix.os}}
46+
container: ${{matrix.container}}
4047

4148
steps:
4249
- uses: actions/checkout@v2
@@ -49,13 +56,27 @@ jobs:
4956
- name: Install packages
5057
if: matrix.install
5158
run: |
59+
if [ -f "/etc/debian_version" ]; then
60+
echo "DEBIAN_FRONTEND=noninteractive" >> $GITHUB_ENV
61+
export DEBIAN_FRONTEND=noninteractive
62+
fi
63+
# Install required stuff when using containers
64+
if [ -n "${{matrix.container}}" ]; then
65+
if [ -f "/etc/debian_version" ]; then
66+
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
67+
apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y sudo software-properties-common build-essential g++ python
68+
add-apt-repository ppa:git-core/ppa # Need newer git
69+
fi
70+
fi
5271
if [[ "${{matrix.install}}" == "yes" ]]; then
5372
pkgs="${{matrix.compiler}}"
5473
pkgs="${pkgs/clang++-/clang-}"
5574
else
5675
pkgs="${{matrix.install}}"
5776
fi
58-
sudo apt install $pkgs
77+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
78+
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
79+
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y git $pkgs
5980
6081
- name: Setup config vars
6182
run: |

.github/workflows/release.yml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,33 @@ on:
66
push:
77
tags:
88
- 'v*'
9+
pull_request:
910

1011
name: Create Release
1112

1213
jobs:
1314
release:
1415
name: Create Release
1516
runs-on: ubuntu-latest
17+
env:
18+
DEP_DIR: ${{github.workspace}}/dependencies
19+
BOOST_VERSION: 1.56.0
1620
steps:
1721
- uses: actions/checkout@v2
1822
- name: Extract tag name
1923
id: get_tag
20-
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
24+
run: |
25+
echo "Running for $GITHUB_EVENT_NAME event"
26+
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
27+
echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
28+
else
29+
version=$(grep "set(_version " CMakeLists.txt | head -n1 | sed 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/')
30+
echo "::set-output name=tag::v$version"
31+
fi
2132
- name: Sanity check version
2233
run: |
2334
version=${{steps.get_tag.outputs.tag}}
35+
echo "Expecting version $version"
2436
if ! grep -q "set(_version ${version#v})" CMakeLists.txt; then
2537
echo "Version mismatch."
2638
echo "Expected '${version#v}', found '$(grep -E 'set\(_version [0-9]' CMakeLists.txt)'"
@@ -39,9 +51,22 @@ jobs:
3951
run: |
4052
FOLDER="nowide_${{steps.get_tag.outputs.tag}}"
4153
mkdir "$FOLDER"
42-
cp -r build cmake include src test CMakeLists.txt Config.cmake.in "$FOLDER"
54+
cp -r build cmake config include src test CMakeLists.txt Config.cmake.in "$FOLDER"
4355
tar -czf nowide.tar.gz "$FOLDER"
56+
- name: Install boost
57+
run: sudo apt-get install -y libboost-all-dev
58+
- name: Test Boost release tarball
59+
run: |
60+
tmp_dir=$(mktemp -d -p "$RUNNER_TEMP")
61+
cd "$tmp_dir"
62+
tar -xf "${{github.workspace}}/nowide.tar.gz"
63+
src_dir="$PWD/nowide_${{steps.get_tag.outputs.tag}}"
64+
mkdir build && cd build
65+
cmake "$src_dir" -DBoost_DEBUG=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{runner.workspace}}/../install
66+
cmake --build . --config Debug --target install
67+
ctest --output-on-failure -C Debug --verbose
4468
- name: Create Release
69+
if: github.event_name == 'push'
4570
id: create_release
4671
uses: actions/create-release@v1
4772
env:
@@ -54,6 +79,7 @@ jobs:
5479
draft: false
5580
prerelease: false
5681
- name: Upload standalone version
82+
if: github.event_name == 'push'
5783
uses: actions/upload-release-asset@v1.0.1
5884
env:
5985
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -63,6 +89,7 @@ jobs:
6389
asset_name: nowide_standalone_${{steps.get_tag.outputs.tag}}.tar.gz
6490
asset_content_type: application/tar.gz
6591
- name: Upload Boost version
92+
if: github.event_name == 'push'
6693
uses: actions/upload-release-asset@v1.0.1
6794
env:
6895
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -72,6 +99,7 @@ jobs:
7299
asset_name: nowide_${{steps.get_tag.outputs.tag}}.tar.gz
73100
asset_content_type: application/tar.gz
74101
- name: Upload Documentation
102+
if: github.event_name == 'push'
75103
uses: actions/upload-release-asset@v1.0.1
76104
env:
77105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
cmake_minimum_required(VERSION 3.9)
1717
# Version number starts at 10 to avoid conflicts with Boost version
18-
set(_version 11.1.2)
18+
set(_version 11.1.3)
1919
if(BOOST_SUPERPROJECT_SOURCE_DIR)
2020
set(_version ${BOOST_SUPERPROJECT_VERSION})
2121
endif()

doc/changelog.dox

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010

1111
\section changelog Changelog
1212

13+
\subsection changelog_11_1_3 Nowide 11.1.3
14+
15+
- Fix missing config file in release
16+
- Known issues: Read performance for text files is degraded. Binary files and writing is unaffected.
17+
1318
\subsection changelog_11_1_2 Nowide 11.1.2 (Boost 1.76)
1419

1520
- Don't define `__MSVCRT_VERSION__` version to fix compatibility with ucrt

test/test_fs.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,24 @@
11
//
22
// Copyright (c) 2015 Artyom Beilis (Tonkikh)
3+
// Copyright (c) 2021 Alexander Grund
34
//
45
// Distributed under the Boost Software License, Version 1.0. (See
56
// accompanying file LICENSE or copy at
67
// http://www.boost.org/LICENSE_1_0.txt)
78
//
89

10+
#if defined(__GNUC__) && __GNUC__ >= 7
11+
#pragma GCC diagnostic ignored "-Wattributes"
12+
#endif
913
#include <boost/nowide/filesystem.hpp>
1014

1115
#include <boost/nowide/convert.hpp>
1216
#include <boost/nowide/cstdio.hpp>
1317
#include <boost/nowide/fstream.hpp>
1418
#include "test.hpp"
19+
#if defined(_MSC_VER)
20+
#pragma warning(disable : 4714) // function marked as __forceinline not inlined
21+
#endif
1522
#include <boost/filesystem/operations.hpp>
1623

1724
// coverity [root_function]

0 commit comments

Comments
 (0)