mirror of
https://github.com/boostorg/regex.git
synced 2026-07-05 07:51:00 +02:00
511 lines
19 KiB
YAML
511 lines
19 KiB
YAML
# Copyright 2020 Evan Miller
|
|
# Copyright 2020 Matt Borland
|
|
# Distributed under the Boost Software License, Version 1.0.
|
|
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
|
|
|
|
name: CI
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
- feature/**
|
|
- cve-*
|
|
pull_request:
|
|
release:
|
|
types: [published, created, edited]
|
|
|
|
env:
|
|
UBSAN_OPTIONS: print_stacktrace=1
|
|
|
|
jobs:
|
|
ubuntu-jammy:
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [ g++-11, g++-12, g++-13 ]
|
|
standard: [ c++11, c++14, c++17, c++2a ]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Set TOOLSET
|
|
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
|
|
- name: Add repository
|
|
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
|
- name: Install packages
|
|
run: sudo apt install g++-11 g++-12 g++-13
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: cp -r $GITHUB_WORKSPACE/* libs/regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: ./bootstrap.sh
|
|
working-directory: ../boost-root
|
|
- name: Generate headers
|
|
run: ./b2 headers
|
|
working-directory: ../boost-root
|
|
- name: Generate user config
|
|
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
|
|
working-directory: ../boost-root
|
|
- name: Config info
|
|
run: ../../../b2 print_config_info toolset=$TOOLSET
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Test
|
|
run: ../../../b2 toolset=$TOOLSET variant=debug,release ${{ startsWith(matrix.compiler, 'g++-13') && 'address-sanitizer=norecover undefined-sanitizer=norecover' || '' }}
|
|
working-directory: ../boost-root/libs/regex/test
|
|
ubuntu-jammy-standalone:
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [ g++ ]
|
|
standard: [ c++11, c++14, c++17, c++2a ]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Set TOOLSET
|
|
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
|
|
- name: Add repository
|
|
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
|
- name: Install packages
|
|
run: sudo apt install libicu-dev
|
|
- name: Test
|
|
run: ${{ matrix.compiler }} -std=${{ matrix.standard }} -I../../include *.cpp ../../src/*.cpp -o regress && ./regress
|
|
working-directory: ./test/regress
|
|
ubuntu-jammy-clang:
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [ clang++-15 ]
|
|
standard: [ c++11, c++14, c++17 ]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Set TOOLSET
|
|
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
|
|
- name: Add repository
|
|
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
|
- name: Install packages
|
|
run: sudo apt install clang-15
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: cp -r $GITHUB_WORKSPACE/* libs/regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: ./bootstrap.sh
|
|
working-directory: ../boost-root
|
|
- name: Generate headers
|
|
run: ./b2 headers
|
|
working-directory: ../boost-root
|
|
- name: Generate user config
|
|
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
|
|
working-directory: ../boost-root
|
|
- name: Config info
|
|
run: ../../../b2 print_config_info toolset=$TOOLSET
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Test
|
|
run: ../../../b2 toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER
|
|
working-directory: ../boost-root/libs/regex/test
|
|
ubuntu-jammy-clang-18-modules:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Grab install script
|
|
run: wget https://apt.llvm.org/llvm.sh && chmod u+x llvm.sh
|
|
- name: Install clang 18 packages
|
|
run: sudo ./llvm.sh 18 && clang++-18 --version
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: cp -r $GITHUB_WORKSPACE/* libs/regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: ./bootstrap.sh
|
|
working-directory: ../boost-root
|
|
- name: Generate headers
|
|
run: ./b2 headers
|
|
working-directory: ../boost-root
|
|
- name: Test
|
|
run: CXX=clang++-18 LIBRARIES="-licuuc -licudata -licui18n" ./test_clang.sh
|
|
working-directory: ../boost-root/libs/regex/test/module
|
|
ubuntu-noble-clang:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
compiler: [ clang++-16, clang++-17, clang++-18 ]
|
|
standard: [ c++11, c++14, c++17, c++20 ]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Set TOOLSET
|
|
run: echo ${{ matrix.compiler }} | awk '/^g/ { print "TOOLSET=gcc" } /^clang/ { print "TOOLSET=clang" }' >> $GITHUB_ENV
|
|
- name: Add repository
|
|
run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
|
|
- name: Install packages
|
|
run: sudo apt install clang-16 clang-17 clang-18
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: cp -r $GITHUB_WORKSPACE/* libs/regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: ./bootstrap.sh
|
|
working-directory: ../boost-root
|
|
- name: Generate headers
|
|
run: ./b2 headers
|
|
working-directory: ../boost-root
|
|
- name: Generate user config
|
|
run: 'echo "using $TOOLSET : : ${{ matrix.compiler }} : <cxxflags>-std=${{ matrix.standard }} ;" > ~/user-config.jam'
|
|
working-directory: ../boost-root
|
|
- name: Config info
|
|
run: ../../../b2 print_config_info toolset=$TOOLSET
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Test
|
|
run: ../../../b2 toolset=$TOOLSET define=CI_SUPPRESS_KNOWN_ISSUES define=SLOW_COMPILER variant=debug,release ${{ startsWith(matrix.compiler, 'clang++-18') && 'address-sanitizer=norecover undefined-sanitizer=norecover' || '' }}
|
|
working-directory: ../boost-root/libs/regex/test
|
|
macos:
|
|
runs-on: macos-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
toolset: [ clang ]
|
|
standard: [ 11, 14, 17, 2a ]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: cp -r $GITHUB_WORKSPACE/* libs/regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: ./bootstrap.sh
|
|
working-directory: ../boost-root
|
|
- name: Generate headers
|
|
run: ./b2 headers
|
|
working-directory: ../boost-root
|
|
- name: Config info install
|
|
run: ../../../b2 config_info_travis_install toolset=${{ matrix.toolset }} cxxstd=${{ matrix.standard }}
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Config info
|
|
run: ./config_info_travis
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Test
|
|
run: ../../../b2 toolset=${{ matrix.toolset }} cxxstd=${{ matrix.standard }}
|
|
working-directory: ../boost-root/libs/regex/test
|
|
windows_gcc:
|
|
runs-on: windows-latest
|
|
defaults:
|
|
run:
|
|
shell: cmd
|
|
env:
|
|
ARGS: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
toolset: [ gcc ]
|
|
standard: [ 11, 14, 17, 2a ]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: bootstrap
|
|
working-directory: ../boost-root
|
|
- name: Generate headers
|
|
run: b2 headers
|
|
working-directory: ../boost-root
|
|
- name: Config info install
|
|
run: ..\..\..\b2 config_info_travis_install %ARGS%
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Config info
|
|
run: config_info_travis
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Test
|
|
run: ..\..\..\b2 --hash %ARGS%
|
|
working-directory: ../boost-root/libs/regex/test
|
|
windows_msvc_14_3:
|
|
runs-on: windows-2025
|
|
defaults:
|
|
run:
|
|
shell: cmd
|
|
env:
|
|
ARGS: toolset=${{ matrix.toolset }} address-model=64 cxxstd=${{ matrix.standard }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
toolset: [ msvc-14.3 ]
|
|
standard: [ 14, 17, 20, latest ]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- uses: TheMrMilchmann/setup-msvc-dev@v3
|
|
with:
|
|
arch: x64
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: xcopy /s /e /q %GITHUB_WORKSPACE% libs\regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: bootstrap
|
|
working-directory: ../boost-root
|
|
- name: Generate headers
|
|
run: b2 headers
|
|
working-directory: ../boost-root
|
|
- name: Config info install
|
|
run: ..\..\..\b2 config_info_travis_install %ARGS%
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Config info
|
|
run: config_info_travis
|
|
working-directory: ../boost-root/libs/config/test
|
|
- name: Test
|
|
run: ..\..\..\b2 --hash %ARGS%
|
|
working-directory: ../boost-root/libs/regex/test
|
|
- name: Module Test
|
|
run: msvc_test.bat
|
|
working-directory: ../boost-root/libs/regex/test/module
|
|
ubuntu-cmake-install:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: cp -r $GITHUB_WORKSPACE/* libs/regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: ./bootstrap.sh
|
|
working-directory: ../boost-root
|
|
- name: CMake Test
|
|
working-directory: ../boost-root
|
|
run: |
|
|
mkdir __build__ && cd __build__
|
|
cmake -DBOOST_ENABLE_CMAKE=1 -DBoost_VERBOSE=1 -DBOOST_INCLUDE_LIBRARIES="regex;core" -DBUILD_TESTING=OFF -DCMAKE_INSTALL_PREFIX=~/.local ..
|
|
cmake --build . --target install
|
|
cd ../libs/regex/test/cmake_install_test && mkdir __build__ && cd __build__
|
|
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
|
|
cmake --build .
|
|
cmake --build . --target check
|
|
ubuntu-cmake-check:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: '0'
|
|
- name: Install packages
|
|
run: sudo apt install libicu-dev
|
|
- name: Checkout main boost
|
|
run: git clone -b develop --depth 1 https://github.com/boostorg/boost.git ../boost-root
|
|
- name: Update tools/boostdep
|
|
run: git submodule update --init tools/boostdep
|
|
working-directory: ../boost-root
|
|
- name: Copy files
|
|
run: cp -r $GITHUB_WORKSPACE/* libs/regex
|
|
working-directory: ../boost-root
|
|
- name: Install deps
|
|
run: python tools/boostdep/depinst/depinst.py -I example -g "--jobs 3" regex
|
|
working-directory: ../boost-root
|
|
- name: Bootstrap
|
|
run: ./bootstrap.sh
|
|
working-directory: ../boost-root
|
|
- name: CMake Test
|
|
working-directory: ../boost-root/libs/regex/test
|
|
run: |
|
|
cd cmake_subdir_test && mkdir __build__ && cd __build__
|
|
cmake ..
|
|
cmake --build .
|
|
cmake --build . --target check
|
|
rm -rf *
|
|
echo Standalone configuration
|
|
cmake -DBOOST_REGEX_STANDALONE=on ..
|
|
cmake --build .
|
|
cmake --build . --target check
|
|
cd ../../cmake_subdir_test_icu && mkdir __build__ && cd __build__
|
|
cmake ..
|
|
cmake --build .
|
|
cmake --build . --target check
|
|
rm -rf *
|
|
echo Standalone configuration
|
|
cmake -DBOOST_REGEX_STANDALONE=on ..
|
|
cmake --build .
|
|
cmake --build . --target check
|
|
|
|
posix-cmake-use:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
- os: macos-latest
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install packages
|
|
if: matrix.install
|
|
run: sudo apt-get -y install ${{matrix.install}}
|
|
|
|
- name: Setup Boost
|
|
run: |
|
|
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
|
|
LIBRARY=${GITHUB_REPOSITORY#*/}
|
|
echo LIBRARY: $LIBRARY
|
|
echo "LIBRARY=$LIBRARY" >> $GITHUB_ENV
|
|
echo GITHUB_BASE_REF: $GITHUB_BASE_REF
|
|
echo GITHUB_REF: $GITHUB_REF
|
|
REF=${GITHUB_BASE_REF:-$GITHUB_REF}
|
|
REF=${REF#refs/heads/}
|
|
echo REF: $REF
|
|
BOOST_BRANCH=develop && [ "$REF" == "master" ] && BOOST_BRANCH=master || true
|
|
echo BOOST_BRANCH: $BOOST_BRANCH
|
|
cd ..
|
|
git clone -b $BOOST_BRANCH --depth 1 https://github.com/boostorg/boost.git boost-root
|
|
cd boost-root
|
|
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
|
|
git submodule update --init tools/boostdep
|
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" $LIBRARY
|
|
./bootstrap.sh
|
|
./b2 -d0 headers
|
|
|
|
- name: Install Boost --with-library
|
|
run: |
|
|
cd ../boost-root
|
|
./b2 -j3 --with-$LIBRARY --prefix=$HOME/.local install
|
|
|
|
- name: Use the installed library
|
|
run: |
|
|
cd ../boost-root/libs/$LIBRARY/test/cmake_install_test && mkdir __build__ && cd __build__
|
|
cmake -DCMAKE_INSTALL_PREFIX=~/.local ..
|
|
cmake --build .
|
|
ctest --output-on-failure --no-tests=error
|
|
|
|
windows-cmake-use:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Setup Boost
|
|
shell: cmd
|
|
run: |
|
|
echo GITHUB_REPOSITORY: %GITHUB_REPOSITORY%
|
|
for /f %%i in ("%GITHUB_REPOSITORY%") do set LIBRARY=%%~nxi
|
|
echo LIBRARY: %LIBRARY%
|
|
echo LIBRARY=%LIBRARY%>>%GITHUB_ENV%
|
|
echo GITHUB_BASE_REF: %GITHUB_BASE_REF%
|
|
echo GITHUB_REF: %GITHUB_REF%
|
|
if "%GITHUB_BASE_REF%" == "" set GITHUB_BASE_REF=%GITHUB_REF%
|
|
set BOOST_BRANCH=develop
|
|
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
|
|
echo BOOST_BRANCH: %BOOST_BRANCH%
|
|
cd ..
|
|
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
|
|
cd boost-root
|
|
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
|
|
git submodule update --init tools/boostdep
|
|
python tools/boostdep/depinst/depinst.py --git_args "--jobs 3" %LIBRARY%
|
|
cmd /c bootstrap
|
|
b2 -d0 headers
|
|
|
|
- name: Install Boost --with-library
|
|
shell: cmd
|
|
run: |
|
|
cd ../boost-root
|
|
b2 -j3 --with-%LIBRARY% install
|
|
|
|
- name: Use the installed library (Debug)
|
|
shell: cmd
|
|
run: |
|
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test && mkdir __build__ && cd __build__
|
|
cmake -DBoost_ROOT=C:/Boost ..
|
|
cmake --build . --config Debug
|
|
ctest --output-on-failure --no-tests=error -C Debug
|
|
|
|
- name: Use the installed library (Release)
|
|
shell: cmd
|
|
run: |
|
|
cd ../boost-root/libs/%LIBRARY%/test/cmake_install_test/__build__
|
|
cmake --build . --config Release
|
|
ctest --output-on-failure --no-tests=error -C Release
|