Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/sh-catch-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot authored Dec 13, 2023
2 parents 12a07c9 + 5dca296 commit e5cfe29
Show file tree
Hide file tree
Showing 429 changed files with 15,435 additions and 8,747 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ steps:
./build.sh ${TOOLSET}
./b2 -v
cd ../..
./src/engine/b2 -a address-sanitizer=on toolset=${TOOLSET} b2
./src/engine/b2 -a ${SANITIZER}=on optimization=debug toolset=${TOOLSET} b2
displayName: Build
- bash: |
set -e
export B2=`ls -1 ${PWD}/.build/*/debug/address-sanitizer-on/cxxstd-11-iso/b2`
export B2=`find ${PWD}/.build -name b2b2`
cd test
python test_all.py ${TOOLSET}
./test_all.py ${TOOLSET}
cd ..
displayName: Test
2 changes: 1 addition & 1 deletion .ci/azp-linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
- bash: |
set -e
cd test
python test_all.py ${TOOLSET}
./test_all.py ${TOOLSET}
cd ..
displayName: Test
- bash: |
Expand Down
6 changes: 2 additions & 4 deletions .ci/azp-macos-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ steps:
displayName: Install
- bash: |
set -e
CXX_PATH=`which ${CXX}`
echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
./bootstrap.sh ${TOOLSET}
./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET}
./b2 --prefix=$HOME/temp/.b2 install ${TOOLSET:+toolset=$TOOLSET}
rm ./b2
export PATH=$HOME/temp/.b2/bin:$PATH
cd $HOME
touch build.jam
b2 -v
b2 -n --debug-configuration
b2 -n --debug-configuration ${TOOLSET:+toolset=$TOOLSET}
displayName: Bootstrap
- { bash: "./.ci/b2_example.sh example/hello", displayName: "example/hello" }
- { bash: "./.ci/b2_example.sh example/libraries", displayName: "example/libraries" }
Expand Down
16 changes: 5 additions & 11 deletions .ci/azp-macos-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,28 @@ steps:
- bash: |
set -e
cd src/engine
./build.sh ${TOOLSET} --cxx=${CXX}
./build.sh ${TOOLSET}
./b2 -v
cd ../..
displayName: Build
- bash: |
set -e
CXX_PATH=`which ${CXX}`
cd test
echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
python test_all.py ${TEST_TOOLSET}
./test_all.py ${TOOLSET}
cd ..
displayName: Test
- bash: |
set -e
CXX_PATH=`which ${CXX}`
echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
./src/engine/b2 b2 warnings-as-errors=on variant=debug,release address-model=32,64 toolset=${TEST_TOOLSET}
./src/engine/b2 b2 warnings-as-errors=on variant=debug,release address-model=32,64 ${TOOLSET:+toolset=$TOOLSET}
displayName: "No Warnings"
- bash: |
set -e
CXX_PATH=`which ${CXX}`
echo "using ${TEST_TOOLSET} : : ${CXX_PATH} ;" > ${HOME}/user-config.jam
./bootstrap.sh ${TOOLSET}
./b2 --prefix=$HOME/temp/.b2 install ${TEST_TOOLSET}
./b2 --prefix=$HOME/temp/.b2 install ${TOOLSET:+toolset=$TOOLSET}
rm ./b2
export PATH=$HOME/temp/.b2/bin:$PATH
cd $HOME
touch build.jam
b2 -v
b2 -n --debug-configuration
b2 -n --debug-configuration ${TOOLSET:+toolset=$TOOLSET}
displayName: Bootstrap
8 changes: 7 additions & 1 deletion .ci/azp-windows-test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
steps:
- powershell: |
Set-PSDebug -Trace 1
cd src/engine
$env:HOME = $env:HOMEDRIVE + $env:HOMEPATH
$env:path += ';' + $env:CXX_PATH
cmd /c build.bat $env:TOOLSET
./b2.exe -v
cd ../..
displayName: Build
- powershell: |
Set-PSDebug -Trace 1
$env:HOME = $env:HOMEDRIVE + $env:HOMEPATH
$env:path += ';' + $env:CXX_PATH
cd test
echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > ${env:HOME}/user-config.jam
python test_all.py $env:TEST_TOOLSET
py -X utf8 test_all.py $env:TEST_TOOLSET
cd ..
displayName: Test
- powershell: |
Set-PSDebug -Trace 1
$env:HOME = $env:HOMEDRIVE + $env:HOMEPATH
$env:path += ';' + $env:CXX_PATH
echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > ${env:HOME}/user-config.jam
./src/engine/b2.exe --debug-configuration b2 warnings-as-errors=on variant=debug,release toolset=$env:TEST_TOOLSET
displayName: "No Warnings"
- powershell: |
Set-PSDebug -Trace 1
$env:HOME = $env:HOMEDRIVE + $env:HOMEPATH
$env:path += ';' + $env:CXX_PATH
echo "using" $env:TEST_TOOLSET ":" ":" $env:CXX ";" > ${env:HOME}/user-config.jam
Expand Down
30 changes: 16 additions & 14 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@
# Copyright René Ferdinand Rivera Morell 2020-2021.

freebsd_task:
skip: "changesIncludeOnly('.ci/azp-*', 'appveyor.yml', 'azure-pipelines.yml', '*.adoc')"
# All the GCC's and Clang's currently supported by FreeBSD ports.
matrix:
- { name: 'FreeBSD, GCC 12', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++12', PACKAGE: 'gcc12-devel' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, GCC 11', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++11', PACKAGE: 'gcc11-devel' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, GCC 10', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++10', PACKAGE: 'gcc10-devel' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, GCC 9', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++9', PACKAGE: 'gcc9-devel' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, GCC 8', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++8', PACKAGE: 'gcc8' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
# - { name: 'FreeBSD, GCC 7', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++7', PACKAGE: 'gcc7' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 14', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++14', PACKAGE: 'devel/llvm14' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 13', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++13', PACKAGE: 'devel/llvm13' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 12', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++12', PACKAGE: 'devel/llvm12' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 11', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++11', PACKAGE: 'devel/llvm11' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 10', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++10', PACKAGE: 'devel/llvm10' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 9', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++90', PACKAGE: 'devel/llvm90' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 8', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++80', PACKAGE: 'devel/llvm80' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, Clang 7', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++70', PACKAGE: 'devel/llvm70' }, freebsd_instance: { image_family: 'freebsd-13-0' } }
- { name: 'FreeBSD, GCC 13', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++13', PACKAGE: 'gcc13' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, GCC 12', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++12', PACKAGE: 'gcc12' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, GCC 11', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++11', PACKAGE: 'gcc11' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, GCC 10', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++10', PACKAGE: 'gcc10' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, GCC 9', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++9', PACKAGE: 'gcc9' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, GCC 8', env: { TOOLSET: gcc, TEST_TOOLSET: gcc, CXX: 'g++8', PACKAGE: 'gcc8' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 17', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++17', PACKAGE: 'devel/llvm17' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 16', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++16', PACKAGE: 'devel/llvm16' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 15', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++15', PACKAGE: 'devel/llvm15' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 14', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++14', PACKAGE: 'devel/llvm14' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 13', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++13', PACKAGE: 'devel/llvm13' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 12', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++12', PACKAGE: 'devel/llvm12' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 11', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++11', PACKAGE: 'devel/llvm11' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
- { name: 'FreeBSD, Clang 10', env: { TOOLSET: clang, TEST_TOOLSET: clang, CXX: 'clang++10', PACKAGE: 'devel/llvm10' }, freebsd_instance: { image_family: 'freebsd-13-1' } }
# To install with ports we need to initialize the package manager. To avoid
# confirmation prompts we need to set an env var.
install_script: [
Expand All @@ -43,6 +44,7 @@ freebsd_task:
"CXX_PATH=`which ${CXX}`",
"cd test",
"echo \"using ${TEST_TOOLSET} : : ${CXX_PATH} ;\" > ${HOME}/user-config.jam",
"python3 grep.py ${TEST_TOOLSET}",
"python3 test_all.py ${TEST_TOOLSET}",
"cd ..",
]
98 changes: 98 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
BasedOnStyle: WebKit
IndentWidth: 4
TabWidth: 4
UseTab: ForContinuationAndIndentation
---
Language: Cpp
AccessModifierOffset: 0
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: DontAlign
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: false
BitFieldColonSpacing: Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: false
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyNamespace: true
SplitEmptyRecord: false
BreakBeforeBinaryOperators: All
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: 'end::[a-zA-Z]\[\]'
CompactNamespaces: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentCaseLabels: true
IndentGotoLabels: true
IndentPPDirectives: AfterHash
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
PenaltyBreakBeforeFirstCallParameter: 0
PenaltyBreakFirstLessLess: 0
PenaltyReturnTypeOnItsOwnLine: 999999
PointerAlignment: Middle
PPIndentWidth: 0
ReflowComments: true
ShortNamespaceLines: 0
SortIncludes: CaseInsensitive
SortUsingDeclarations: false
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [grafikrobot]
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/.github/"
schedule:
interval: "daily"
36 changes: 36 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 2023 René Ferdinand Rivera Morell
# Use, modification, and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file LICENSE.txt)

name: "Backports"

on:
pull_request_target:
types: [closed]
branches: ["main"]
issue_comment:
types: [created]
branches: ["main"]
permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests

jobs:
backport:
runs-on: ubuntu-latest
name: "Backport"
if: >
(
github.event_name == 'pull_request' &&
github.event.pull_request.merged
) || (
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
github.event.comment.user.id != 97796249 &&
contains(github.event.comment.body, '/backport')
)
steps:
- name: "Checkout"
uses: actions/checkout@master
- name: "Backport PR"
uses: korthout/backport-action@main
72 changes: 72 additions & 0 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright 2023 Nikita Kniazev
#
# Use, modification, and distribution are subject to the
# Boost Software License, Version 1.0. (See accompanying file LICENSE.txt)

name: "Extra Tests"

on:
push:
paths-ignore: #&paths
- '.circleci/**'
- '.cirrus.yml'
- '.drone.star'
- '.semaphore/**'
- '.travis.yml'
- 'appveyor.yml'
- 'azure-pipelines.yml'
- '.ci/azp-*.yml'
pull_request:
paths-ignore: #*paths #https://github.com/actions/runner/issues/1182
- '.circleci/**'
- '.cirrus.yml'
- '.drone.star'
- '.semaphore/**'
- '.travis.yml'
- 'appveyor.yml'
- 'azure-pipelines.yml'
- '.ci/azp-*.yml'

concurrency:
# cancel test runners on force-push in pull requests
group: ${{ github.event_name == 'push' && github.event.forced && github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
msys2:
name: Windows msys2 ${{matrix.msys}} ${{matrix.toolset}}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
msys:
- mingw64
- mingw32
- ucrt64
- clang64
toolset:
- clang
- gcc
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@master

- name: Install Toolset
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.msys}}
pacboy: python:p ${{matrix.toolset}}:p

- name: Bootstrap
run: ./bootstrap.sh ${{matrix.toolset}}

- name: Test
working-directory: test
env: { PYTHONUTF8: 1 }
run: ./test_all.py ${{matrix.toolset}}

- name: 'No Warnings'
run: ./b2 warnings=all warnings-as-errors=on variant=debug,release debug-symbols=off toolset=${{matrix.toolset}} b2
Loading

0 comments on commit e5cfe29

Please sign in to comment.