Skip to content

Commit

Permalink
Merge develop to master
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamefire committed Feb 13, 2024
2 parents dece8c6 + 299381b commit 4fa93a9
Show file tree
Hide file tree
Showing 26 changed files with 673 additions and 305 deletions.
8 changes: 4 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ environment:
B2_CXXSTD: 11,1z
B2_TOOLSET: gcc

- FLAVOR: mingw32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- FLAVOR: mingw64 (32-bit)
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
ADDPATH: C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin;
B2_ADDRESS_MODEL: 32
ADDPATH: C:\mingw\bin;
B2_CXXSTD: 11,14,1z
B2_CXXSTD: 03,11,14,17,2a
B2_TOOLSET: gcc

- FLAVOR: mingw64
Expand Down
67 changes: 67 additions & 0 deletions .drone.star
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright 2020 Rene Rivera
# Copyright 2022-2023 Alexander Grund
#
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt

# For Drone CI we use the Starlark scripting language to reduce duplication.
# As the yaml syntax for Drone CI is rather limited.

# Base environment for all jobs
globalenv={'B2_CI_VERSION': '1', 'B2_VARIANT': 'debug,release'}

# Wrapper function to apply the globalenv to all jobs
def job(
# job specific environment options
env={},
**kwargs):
real_env = dict(globalenv)
real_env.update(env)
return job_impl(env=real_env, **kwargs)

def main(ctx):
return [
job(compiler='clang-13', cxxstd='11,14,17,20,2b', os='ubuntu-22.04', install='libicu-dev'),
job(compiler='clang-14', cxxstd='11,14,17,20,2b', os='ubuntu-22.04', install='libicu-dev'),
job(compiler='clang-15', cxxstd='11,14,17,20,2b', os='ubuntu-22.04', install='libicu-dev', add_llvm=True),

job(compiler='gcc-11', cxxstd='11,14,17,20,2b', os='ubuntu-22.04', install='libicu-dev'),
job(compiler='gcc-12', cxxstd='11,14,17,20,2b', os='ubuntu-22.04', install='libicu-dev'),

# Sanitizers
job(name='ASAN', asan=True,
compiler='gcc-12', cxxstd='11,14,17,20', os='ubuntu-22.04', install='libicu-dev'),
job(name='UBSAN', ubsan=True,
compiler='gcc-12', cxxstd='11,14,17,20', os='ubuntu-22.04', install='libicu-dev'),
job(name='Clang 14 w/ sanitizers', asan=True, ubsan=True,
compiler='clang-14', cxxstd='11,14,17,20', os='ubuntu-22.04', install='libicu-dev'),

# libc++
job(compiler='clang-15', cxxstd='11,14,17,20', os='ubuntu-22.04', stdlib='libc++', install='libicu-dev libc++-15-dev libc++abi-15-dev', add_llvm=True),

# FreeBSD
job(compiler='clang-10', cxxstd='11,14,17,20', os='freebsd-13.1'),
job(compiler='clang-15', cxxstd='11,14,17,20', os='freebsd-13.1'),
# ICU is linked against libc++, so either don't use ICU or use libc++. The latter doesn't seem to work well (segfaults)
job(compiler='gcc-11', cxxstd='11,14,17,20', os='freebsd-13.1', testflags='boost.locale.icu=off', linkflags='-Wl,-rpath=/usr/local/lib/gcc11'),
# OSX
job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-10.1'),
job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-10.3'),
job(compiler='clang', cxxstd='11,14,17,2a', os='osx-xcode-12'),
job(compiler='clang', cxxstd='11,14,17,20', os='osx-xcode-12.5.1'),
job(compiler='clang', cxxstd='11,14,17,20', os='osx-xcode-13.4.1'),
# Don't work yet -> #206 ?
# job(compiler='clang', cxxstd='11,14,17,20,2b', os='osx-xcode-14.3.1'),
# job(compiler='clang', cxxstd='11,14,17,20,2b', os='osx-xcode-15.0.1'),
# ARM64
job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='arm64', add_llvm=True),
job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='arm64'),
# S390x
job(compiler='clang-12', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='s390x', add_llvm=True),
job(compiler='gcc-11', cxxstd='11,14,17,20', os='ubuntu-20.04', arch='s390x'),
# Windows
job(compiler='msvc-14.3', cxxstd='14,17,20,latest', os='windows'),
]

# from https://github.com/boostorg/boost-ci
load("@boost_ci//ci/drone/:functions.star", "linux_cxx", "windows_cxx", "osx_cxx", "freebsd_cxx", "job_impl")
44 changes: 30 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
CheckFormatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: DoozyX/clang-format-lint-action@v0.14
with:
exclude: './doc'
Expand All @@ -59,9 +59,9 @@ jobs:
Create_Boost_Documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch Boost.CI
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: boostorg/boost-ci
ref: master
Expand Down Expand Up @@ -305,9 +305,21 @@ jobs:
run: ci/build.sh
env: {B2_FLAGS: -a boost.locale.icu=on boost.locale.iconv=off}

- name: Upload coverage
- name: Collect coverage
if: matrix.coverage
run: ci/codecov.sh "upload"
env:
BOOST_CI_CODECOV_IO_UPLOAD: skip

- name: Upload coverage
if: matrix.coverage
uses: codecov/codecov-action@v4
with:
disable_search: true
file: coverage.info
name: Github Actions
token: ${{secrets.CODECOV_TOKEN}}
verbose: true

- name: Run coverity
if: matrix.coverity && github.event_name == 'push' && (github.ref_name == 'develop' || github.ref_name == 'master')
Expand All @@ -333,10 +345,10 @@ jobs:
env: {ICU_VERSION: '71.1'}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Fetch Boost.CI
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: boostorg/boost-ci
ref: master
Expand All @@ -351,7 +363,7 @@ jobs:
run: ci\github\install.bat

- name: Get cached ICU
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-icu
with:
path: ICU
Expand Down Expand Up @@ -421,9 +433,13 @@ jobs:

- name: Upload coverage
if: matrix.coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: __out/cobertura.xml
disable_search: true
file: __out/cobertura.xml
name: Github Actions
token: ${{secrets.CODECOV_TOKEN}}
verbose: true

MSYS2:
defaults:
Expand All @@ -439,7 +455,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup MSYS2 environment
uses: msys2/setup-msys2@v2
Expand All @@ -450,7 +466,7 @@ jobs:
pacboy: gcc:p cmake:p ninja:p

- name: Fetch Boost.CI
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: boostorg/boost-ci
ref: master
Expand Down Expand Up @@ -503,9 +519,9 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Fetch Boost.CI
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: boostorg/boost-ci
ref: master
Expand Down Expand Up @@ -536,7 +552,7 @@ jobs:
echo "LD_LIBRARY_PATH=$ICU_ROOT/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Get cached ICU
if: matrix.icu
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-icu
with:
path: ICU
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ add_library(boost_locale
src/boost/locale/shared/localization_backend.cpp
src/boost/locale/shared/message.cpp
src/boost/locale/shared/mo_lambda.cpp
src/boost/locale/shared/std_collate_adapter.hpp
src/boost/locale/util/codecvt_converter.cpp
src/boost/locale/util/default_locale.cpp
src/boost/locale/util/encoding.cpp
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ Distributed under the [Boost Software License, Version 1.0](https://www.boost.or

### Build Status

Branch | GH Actions | Appveyor | codecov.io | Deps | Docs | Tests |
:-------------: | ---------- | -------- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/locale/tree/master) | [![CI](https://github.com/boostorg/locale/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/locale/actions/workflows/ci.yml) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/locale?branch=master&svg=true)](https://ci.appveyor.com/project/Flamefire/locale/branch/master) | [![codecov](https://codecov.io/gh/boostorg/locale/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/locale/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/locale.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/locale/doc/html/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/locale.html)
[`develop`](https://github.com/boostorg/locale/tree/develop) | [![CI](https://github.com/boostorg/locale/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/locale/actions/workflows/ci.yml) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/locale?branch=develop&svg=true)](https://ci.appveyor.com/project/Flamefire/locale/branch/develop) | [![codecov](https://codecov.io/gh/boostorg/locale/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/locale/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/locale.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/locale/doc/html/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/locale.html)
Branch | GH Actions | Appveyor | Drone | codecov.io | Deps | Docs | Tests |
:-------------: | ---------- | -------- | ----- | ---------- | ---- | ---- | ----- |
[`master`](https://github.com/boostorg/locale/tree/master) | [![CI](https://github.com/boostorg/locale/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/boostorg/locale/actions/workflows/ci.yml) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/locale?branch=master&svg=true)](https://ci.appveyor.com/project/Flamefire/locale/branch/master) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/locale/status.svg?ref=refs/heads/master)](https://drone.cpp.al/boostorg/locale) | [![codecov](https://codecov.io/gh/boostorg/locale/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/locale/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/locale.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](https://www.boost.org/doc/libs/master/libs/locale/doc/html/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/locale.html)
[`develop`](https://github.com/boostorg/locale/tree/develop) | [![CI](https://github.com/boostorg/locale/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/boostorg/locale/actions/workflows/ci.yml) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/locale?branch=develop&svg=true)](https://ci.appveyor.com/project/Flamefire/locale/branch/develop) | [![Build Status](https://drone.cpp.al/api/badges/boostorg/locale/status.svg?ref=refs/heads/develop)](https://drone.cpp.al/boostorg/locale) | [![codecov](https://codecov.io/gh/boostorg/locale/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/locale/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/locale.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](https://www.boost.org/doc/libs/develop/libs/locale/doc/html/index.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/locale.html)

### Directories

Expand Down
50 changes: 31 additions & 19 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ ICU_OPTS =
exe has_icu : $(TOP)/build/has_icu_test.cpp : $(ICU_OPTS) ;
explicit has_icu ;

# Separate pair of obj & exe rules so the CPP file is built with the changed include paths
obj has_iconv_with_icu_obj : $(TOP)/build/has_iconv.cpp : $(ICU_OPTS) ;
exe has_iconv_with_icu : has_external_iconv_with_icu_obj : $(ICU_OPTS) ;
explicit has_iconv_with_icu ;
obj has_external_iconv_with_icu_obj : $(TOP)/build/has_iconv.cpp iconv : $(ICU_OPTS) ;
exe has_external_iconv_with_icu : has_external_iconv_with_icu_obj iconv : $(ICU_OPTS) ;
explicit has_external_iconv_with_icu ;

# This function is called whenever the 'boost_locale' metatarget
# below is generated and figures out what external components we have,
Expand All @@ -212,25 +219,8 @@ rule configure-full ( properties * : flags-only )
}
}

local found-iconv ;

if ! <boost.locale.iconv>off in $(properties)
{
# See if iconv is bundled with standard library.
if [ configure.builds has_iconv : $(properties) : "iconv (libc)" ]
{
found-iconv = true ;
} else if [ configure.builds has_external_iconv : $(properties) : "iconv (separate)" ]
{
found-iconv = true ;
result += <library>iconv ;
}
}
if $(found-iconv)
{
flags-result += <define>BOOST_LOCALE_WITH_ICONV=1 ;
}

local internal_iconv_target = has_iconv ;
local external_iconv_target = has_external_iconv ;
local found-icu ;

if ! <boost.locale.icu>off in $(properties)
Expand All @@ -256,9 +246,31 @@ rule configure-full ( properties * : flags-only )
result += <source>icu/$(ICU_SOURCES).cpp
<library>/boost/thread//boost_thread
;
# ICU might introduce an own iconv, so check for that.
internal_iconv_target = has_iconv_with_icu ;
external_iconv_target = has_external_iconv_with_icu ;
}
}

local found-iconv ;

if ! <boost.locale.iconv>off in $(properties)
{
# See if iconv is bundled with standard library.
if [ configure.builds $(internal_iconv_target) : $(properties) : "iconv (libc)" ]
{
found-iconv = true ;
} else if [ configure.builds $(external_iconv_target) : $(properties) : "iconv (separate)" ]
{
found-iconv = true ;
result += <library>iconv ;
}
}
if $(found-iconv)
{
flags-result += <define>BOOST_LOCALE_WITH_ICONV=1 ;
}

if ! $(found-iconv) && ! $(found-icu) && ! <target-os>windows in $(properties) && ! <target-os>cygwin in $(properties)
{
ECHO "- Boost.Locale needs either iconv or ICU library to be built." ;
Expand Down
5 changes: 4 additions & 1 deletion doc/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
//
// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)
// Copyright (c) 2021-2023 Alexander Grund
// Copyright (c) 2021-2024 Alexander Grund
//
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

/*!
\page changelog Changelog

- 1.85.0
- Breaking changes
- `collator` does no longer derive from `std::collator` avoiding possible type confusion
- 1.84.0
- Breaking changes
- `to_title` for the WinAPI backend returns the string unchanged instead of an empty string
Expand Down

0 comments on commit 4fa93a9

Please sign in to comment.