B2 Workflow

This action runs a complete B2 workflow from Boost source files.

It takes the Boost source directory and does whatever it needs to test the specified modules. This includes compiling b2 if needed and generating a proper user-config.jam file.

This action is particularly useful for Boost library proposals.

Examples

Example 1:

steps:
- name: Test Boost.Variant2
  uses: alandefreitas/cpp-actions/b2-workflow@master
  with:
    source-dir: boost-root
    modules: variant2
    toolset: gcc-13
    cxxstd: 17,20

Example 2 (cxx):

steps:
- name: Test Boost.Variant2
  uses: alandefreitas/cpp-actions/b2-workflow@master
  with:
    source-dir: boost-root
    modules: variant2
    toolset: clang
    cxx: clang++-12
    cxxstd: 17,20

Example 3 (address-model):

steps:
- name: Test Boost.Variant2
  uses: alandefreitas/cpp-actions/b2-workflow@master
  with:
    source-dir: boost-root
    modules: variant2
    toolset: msvc-14.3
    cxxstd: 17,20
    address-model: 32,64

Example 4 (ubsan):

steps:
- name: Test Boost.Variant2
  uses: alandefreitas/cpp-actions/b2-workflow@master
  with:
    source-dir: boost-root
    modules: variant2
    toolset: gcc-13
    cxxstd: 17,20
    ubsan: 'true'

Example 5 (cxxflags, linkflags):

steps:
- name: Test Boost.Variant2
  uses: alandefreitas/cpp-actions/b2-workflow@master
  with:
    source-dir: boost-root
    modules: variant2
    toolset: clang
    cxx: clang++-12
    cxxstd: 17,20
    cxxflags: -stdlib=libc++
    linkflags: -stdlib=libc++

Example 6 (gcc-toolchain):

steps:
- name: Test Boost.Variant2
  uses: alandefreitas/cpp-actions/b2-workflow@master
  with:
    source-dir: boost-root
    modules: variant2
    toolset: clang
    cxx: clang++-8
    cxxstd: '17'
    gcc-toolchain: '7'

Input Parameters

Parameter

Description

Default

source-dir

The boost source directory.

.

build-variant

Custom build variants.

modules

The list of modules we should test.

gcc-toolchain

Create a special GCC toolchain for this version of GCC and update user-config.jam.

toolset

Toolset name.

address-model

Valid b2 list of address models.

cxx

Path to C++ compiler.

cxxflags

Extra compiler flags.

linkflags

Extra linker flags.

cxxstd

List of standards with which b2 will build and test the program.

ubsan

Whether the undefined behavior sanitizer should be used.

false

threading

b2 threading option.

trace-commands

Trace commands executed by the workflow.

false