From e5cfe92d1ab5a6d16ae959687f84118d1469e88a Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 18 Apr 2021 10:22:48 +0300 Subject: add README --- README.md | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..a5329f7 --- /dev/null +++ b/README.md @@ -0,0 +1,79 @@ +Build Boost +=========== + +This GitHub action downloads & builds Boost libraries in your workflow run. + +* Downloads a distribution of the specified Boost version and unpacks it. +* Builds the required libraries using the specified toolset. + +Use it in your workflow like this: + + - name: Build Boost + uses: egor-tensin/build-boost@v1 + with: + version: 1.71.0 + libraries: filesystem program_options system + platform: x64 + configuration: Release + +* This action uses my other project [cmake-common] to actually download and +build Boost. +* GCC is used by default on Linux; on Windows, it's MSVC. +Specify the `toolset` parameter to use a different toolset. +* `x64` is the default value for the `platform` parameter and can be omitted. +Use `x86` if you want to build 32-bit binaries. +* `Release` is the default value for the `configuration` parameter and can be +omitted. +Use `Debug` if you want to build debug binaries. +* Set `static` to `1` if you want to build static libraries. +* Set `static-runtime` to `1` if you want to link to the static runtime. + +[cmake-common]: https://github.com/egor-tensin/cmake-common + +API +--- + +| Input | Value | Default | Description +| -------------- | ------------ | ------- | ----------- +| version | **required** | | Boost version to build, e.g. `1.71.0`. +| libraries | **required** | | Space-separated list of libraries to build, e.g. `filesystem program_options system`. +| toolset | auto | ✓ | Use GCC on Linux and MSVC on Windows. +| | msvc | | Use MSVC. +| | gcc | | Use GCC. +| | mingw | | Use MinGW-w64. +| | clang | | Use Clang. +| platform | x64 | ✓ | Build 64-bit binaries. +| | x86 | | Build 32-bit binaries. +| configuration | Release | ✓ | Build Release binaries. +| | Debug | | Build Debug binaries. +| static | *other* | ✓ | Shared libraries. +| | 1 | | Static libraries. +| static-runtime | *other* | ✓ | Link to the shared runtime. +| | 1 | | Link to the static runtime. +| directory | *empty* | ✓ | Build in `${{ runner.workspace }}/boost`. +| | *other* | | Build in a custom directory. + +| Output | Example | CMake name | Description +| ---------- | -------------------------------------- | ---------------- | ----------- +| root | D:\a\project\boost | BOOST_ROOT | Root Boost directory. +| librarydir | D:\a\project\boost\stage\x64\Debug\lib | BOOST_LIBRARYDIR | Directory that contains the built libraries. + +Notes +----- + +* [cmake-common] sees *a lot* more testing than this action, while this action +delegates almost everything to it. +* You can use my other actions [setup-gcc], [setup-mingw], [setup-clang] to set +up different toolsets targetting both x86 and x64. + +[setup-gcc]: https://github.com/egor-tensin/setup-gcc +[setup-mingw]: https://github.com/egor-tensin/setup-mingw +[setup-clang]: https://github.com/egor-tensin/setup-clang + +License +------- + +Distributed under the MIT License. +See [LICENSE.txt] for details. + +[LICENSE.txt]: LICENSE.txt -- cgit v1.2.3