egor-tensin / build-boost Goto Github PK
View Code? Open in Web Editor NEWGitHub action to download & build Boost
License: MIT License
GitHub action to download & build Boost
License: MIT License
Is this a planned addition? If I specify windows-2022 and use MSVC 14.3 I just get this error:
boost-build: error: argument --toolset: invalid Visual Studio version: 2022
I want to use Boost Libraries in C#. Is it possible and how can I achieve that?
Great action. Already saved me a lot of hassle with the yml files.
I might have a little corner case(?), where it seems I need to invoke b2 with "cxxstd=20" argument.
Is this in any way possible already or would it make sense to make it possible in your opinion?
Background:
I'm experimenting with the new boost::cobalt library, which reqiures C++20 to be build.
This library-binaries doesn't seem to be build on a standard setup, either on github actions, my local environment or by downloading the pre-build windows releases.
The only way I was able to actually build it, was to invoke b2 with an explicit "cxxstd=20" argument. After that it was available inside the boost staging area. My assumption is, this is not the default value(?).
Github action:
- name: Build Boost
uses: egor-tensin/build-boost@v1
id: boost
with:
version: 1.73.0
toolset: msvc142
libraries: atomic chrono context coroutine container date_time exception filesystem graph graph_parallel iostreams locale log math mpi program_options python random regex serialization signals system test thread timer wave
Produces the following error:
2022-03-22 18:09:55 | INFO | Trying URL: https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.gz
2022-03-22 18:10:00 | INFO | Writing Boost archive: D:\a\hyprdsp\boost_1_73_0.tar.gz
2022-03-22 18:10:00 | INFO | Unpacking Boost to: D:\a\hyprdsp\boost_1_73_0
2022-03-22 18:10:41 | INFO | Running executable: ['.\\bootstrap.bat']
Building Boost.Build engine
Failed to build Boost.Build engine.
Please consult bootstrap.log for further diagnostics.
2022-03-22 18:10:42 | ERROR | Command '['.\\bootstrap.bat']' returned non-zero exit status 1.
Traceback (most recent call last):
File "C:\Users\runneradmin\AppData\Roaming\Python\Python39\site-packages\project\utils.py", line 64, in setup_logging
yield
File "C:\Users\runneradmin\AppData\Roaming\Python\Python39\site-packages\project\boost\build.py", line 202, in _main
build(BuildParameters.from_cmd_args(args))
File "C:\Users\runneradmin\AppData\Roaming\Python\Python39\site-packages\project\boost\build.py", line 138, in build
boost_dir.build(params)
File "C:\Users\runneradmin\AppData\Roaming\Python\Python39\site-packages\project\boost\directory.py", line 25, in build
self._bootstrap_if_required(params)
File "C:\Users\runneradmin\AppData\Roaming\Python\Python39\site-packages\project\boost\directory.py", line 32, in _bootstrap_if_required
self.bootstrap(params)
File "C:\Users\runneradmin\AppData\Roaming\Python\Python39\site-packages\project\boost\directory.py", line 36, in bootstrap
run([self._bootstrap_path()] + self._bootstrap_args(params.toolset_version))
File "C:\Users\runneradmin\AppData\Roaming\Python\Python39\site-packages\project\utils.py", line 82, in run
return subprocess.run(cmd_line, check=True, **kwargs)
File "C:\hostedtoolcache\windows\Python\3.9.10\x64\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['.\\bootstrap.bat']' returned non-zero exit status 1.
under the windows-latest github runner
Per their messages to the boost mailing list, the bintray mirror for downloading boost source has been shutdown as of yesterday. The URLs on the boost website now go to https://boostorg.jfrog.io/ (e.g. https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.7z)
Toolset options are listed in the README for Windows and Linux but not MacOS. Does that mean there's no MacOS support?
If there isn't, maybe I could make a PR.
Hi,
thanks a lot for your great action!
So, it seems that CMake cannot really use this with find_package. The output dir has nice libs with clear names, but find_package creates different output lib file names... Is this known? I could just hard-code the filenames, of course, but it's not just as nice and would not work outside of GitHub Actions.
It does not seem to work on macOS or am I doing something wrong here?
I'm getting
shell: /usr/local/bin/pwsh -command ". '{0}'"
110
env:
111
BUILD_TYPE: Release
113
boost-download: /Users/runner/work/_temp/c0677176-fc7f-4b75-9376-a283096882c9.ps1:38
114
Line |
115
38 | boost-download --cache $base_dir -- $version $boost_dir
116
| ~~~~~~~~~~~~~~
117
| The term 'boost-download' is not recognized as a name of a
118
| cmdlet, function, script file, or executable program. Check
119
| the spelling of the name, or if a path was included, verify
120
| that the path is correct and try again.
Using this action to build python boost library i get the following error when running a cmake file with:
# boost
set(Boost_NO_SYSTEM_PATHS true)
set (Boost_USE_STATIC_LIBS OFF CACHE BOOL "use static libraries from Boost")
set (Boost_USE_MULTITHREADED ON)
set (BUILD_SHARED_LIBS ON)
find_package(Boost REQUIRED COMPONENTS python REQUIRED)
Action Setup:
jobs:
build:
name: Build and Test
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.9"]
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get cmake
uses: lukka/get-cmake@latest
- name: Build Boost
id: boost
uses: egor-tensin/build-boost@v1
with:
version: 1.78.0
libraries: headers system python
platform: x64
configuration: Release
toolset: vs2022
- name: Configure
run: |
mkdir build
cd build
cmake .. -D "BOOST_ROOT=${{ steps.boost.outputs.root }}" -D "BOOST_LIBRARYDIR=${{ steps.boost.outputs.librarydir }}"
env:
BOOST_ROOT: ${{ steps.boost.outputs.root }}
CMake can't find libraries: Could NOT find Boost (missing: python) (found version "1.78.0")
Is there anything i do wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.