Closed SSoelvsten closed 2 years ago
I got to the point where, while it still should be considered WIP, I need feedback as per the feature requirements.
I also tried to recreate the build and unit testing on Windows, but I end up with the same error messages as on Travis CI.
Do you still have the configuration you tried out? The error message in Travis CI appears on Stack Overflow so I wonder if we can get it working by fiddling with the right flags.
Thanks for the link to Stack Overflow, I think there are some settings that are missing on CMake or MSBuild. I'll look further into it and let you know.
Here is the minimal example of just trying to build on Windows. Based on the Stack Overflow you linked, I thought it would have been related to Boost, but the version I was installing is 1.74.0
name: build (windows)
on: [push]
jobs:
build:
name: 'Build (Windows, ${{matrix.build_type}})'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
build_type: [Release] #, Debug, ExtraDebug]
steps:
# Git repo set up
- name: Checkout commit
uses: actions/checkout@v2
# Install dependencies
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Install dependencies
run: |
echo "================================"
echo "Boost"
choco install boost-msvc-14.2
- name: CMake build
working-directory: ${{runner.workspace}}
run: |
cmake -E make_directory ${{github.workspace}}/build
cd ${{github.workspace}}/build
SET CXXFLAGS="%CXXFLAGS% -D_HAS_AUTO_PTR_ETC=1"
cmake -G "Visual Studio 16 2019" -A x64 -D CMAKE_BUILD_TYPE="${{matrix.build_type}}" -D CMAKE_CXX_STANDARD=17 ..
msbuild ALL_BUILD.vcxproj
EDIT: Update to latest attempt
After setting CXXFLAGS with _HAS_AUTO_PTR_ETC=1
quite a few of the C++14 deprecations are dealt with. I have updated the comment above with a newer version of the script. But, there are still two problems left.
random_shuffle
does not exist anymore in std
.std::binary_function
is removed and so one gets the C2143: syntax error: missing ',' before '<' error in test/unit/common.h due to _error C2504: 'binaryfunction': base class undefined .Based on what I can read this may be a sign that my _HAS_AUTO_PTR_ETC
flag may not truly work? I tried to set it with CMAKE_CXX_FLAGS
instead, but that just broke completely...
Otherwise there seems not to be any errors in the output. Whether more will show up when the above is fixed, I of course cannot guarantee.
I fixed the mistake of writing that TPIE was under the GPL v3 license rather than the LGPL v3 license.
With regards to the Windows build: Do we know whether TPIE actually does work with Microsoft's compiler out-of-the-box? If not, maybe I should just add the Windows action that fails and then maybe investigate getting a Windows build to work inside of another pull request.
EDIT: I just saw that @antialize pushed commit a1c260d431d4125db1eba6edf46c1a0cf135274e that might fix Microsoft's compiler from failing. I'll try once more doing this when that one has been merged into master.
I have rebased this pull request on master and added the Windows Build as requested. But still, note that it throws the same errors as with Travis. To fix this, someone needs to tell me what CMake or VSCode configuration to use. If so, then I'll move the build_windows.yml action into the test.yml. Alternatively, I can also have a test_linux.yml, test_macos.yml, and test_windows.yml assuming you are not too worried about some code duplication.
Still, this is a huge improvement on the current status of CI not working at all.
The Mac OS builds are failing because std::random_shuffle
do not exist in the standard library. This is to be expected since it was deprecated with the 14-standard and removed in the 17-standard - yet the CMake configuration in tpie/CMakeLists.txt is set to 17.
Thanks @SSoelvsten ! As you noted, @antialize frequently works on getting TPIE to build on Windows, so he probably knows what CMake settings work/don't work on Windows.
This is how to host the newest documentation on GitHub pages
Closes #246
Except for the more important changes below, I also took the liberty to update the README.md with new badges and some basic information. The latter hopefully makes for a better first impression for anyone stumbling upon the repository page.
GitHub Action: Unit Tests
Recreates the Travis CI unit tests on Ubuntu and MacOS. The job runs on all pushes or pull requests to the master branch. Furthermore, they are only run if anything has been changed in the tpie/ and/or the test/ folder. The job installs all dependencies (compiler of choice, Boost, Snappy, LZ4, ZSTD), runs CMake and the compiler, then CTest to run all tests, and finally the
scripts/check_missing_ctests.py
script to verify no tests were missed.All unit tests are run based on a matrix with the following combinations.
Ubuntu (Latest, i.e. 20.04)
MacOS (Latest)
TODO
scripts/generate_travis.py
scripts/travis_header.yml
.travis.yml
appveyor.yml
144 - merge_sort_small_final_fanout
fails due to a timeout. This happens primarily on the MacOS machines.GitHub Action: Documentation
Adds a job to compile the entire documentation on changes to the tpie/ and/or the doc/ folder.
gh-pages
branch such that the newest documentation is automatically hosted atthomasmoelhave.github.io/tpie
(after having set it to be hosted in the settings. For an example, seessoelvsten.github.io/tpie
).Furthermore, I have fixed some issues with the documentation.
navtreedata.js
was not loaded in the header_formulas
, so MathJX is used to compile the formulas at runtime. Really, this does not "fix" the problem, but it ensures that the entire compilation process finishes.