Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add cmake build scheme #3068

Draft
wants to merge 99 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
67921c3
start building out cmake to work with the tests. Now had batched test…
SteveBronder May 13, 2024
56ec5f4
update test
SteveBronder May 14, 2024
82dcd7a
update cmake
SteveBronder May 14, 2024
275ea24
add inline to a lot of test functions and comment out the dae tests
SteveBronder May 15, 2024
c2e298e
Merge remote-tracking branch 'origin/develop' into feature/cmake-tests
SteveBronder May 23, 2024
617ee47
update
SteveBronder May 29, 2024
0b95d16
newline error on jenkinsfile
SteveBronder May 29, 2024
211839c
newline error on jenkinsfile
SteveBronder May 29, 2024
2bda7e4
Merge commit 'e1fcbe8dca2bfa85b1e109b2bfb1cf65fe0363b7' into HEAD
yashikno May 29, 2024
a8efa32
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot May 29, 2024
238a7fd
fix lint issues
SteveBronder May 29, 2024
5dc921b
update
SteveBronder May 29, 2024
2f7f627
fix subtest builders
SteveBronder May 29, 2024
7ccf07c
fix windows compile tests
SteveBronder May 29, 2024
a844ca4
move cmake deps to own folder
SteveBronder May 29, 2024
e97a61e
revert changes to runtests.py
SteveBronder May 29, 2024
ce4f814
trying to fix git tests
SteveBronder May 30, 2024
4d591a7
update to remove std::cout in dae solver debugging
SteveBronder May 31, 2024
70163a9
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot May 31, 2024
fff42b0
remove && from powershell commands
SteveBronder May 31, 2024
33e172e
update workflow
SteveBronder Jun 3, 2024
026fc47
update tbb
SteveBronder Jun 3, 2024
a39fa9d
update tbb
SteveBronder Jun 3, 2024
b0cf280
update tbb
SteveBronder Jun 3, 2024
b4bc673
update tbb
SteveBronder Jun 3, 2024
3e921d9
update tbb
SteveBronder Jun 3, 2024
6da07ac
update tbb
SteveBronder Jun 3, 2024
eda1c0b
update tbb
SteveBronder Jun 3, 2024
4f85d92
update tbb
SteveBronder Jun 3, 2024
0e39fbf
update to use stan::math::pi() instead of M_PI
SteveBronder Jun 3, 2024
a397f99
Merge commit '8a09048f5187662687e04c14d7737cf4d20a18a1' into HEAD
yashikno Jun 3, 2024
cd921b2
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 3, 2024
1fbd7e7
fix tbb flags
SteveBronder Jun 3, 2024
14d0c4e
Merge remote-tracking branch 'refs/remotes/origin/feature/cmake-tests…
SteveBronder Jun 3, 2024
a672ed3
just test making test_unit_math
SteveBronder Jun 5, 2024
2c20934
run all unit tests in jenkinsfile
SteveBronder Jun 5, 2024
8b4589c
update matrix exp test
SteveBronder Jun 5, 2024
27b1e26
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 5, 2024
8201295
update with OpenCL enabled for tests and add .exe to windows ci execu…
SteveBronder Jun 5, 2024
8bedcae
Merge remote-tracking branch 'refs/remotes/origin/feature/cmake-tests…
SteveBronder Jun 5, 2024
b2816c1
update linking options to not use generator expression for OpenCL
SteveBronder Jun 5, 2024
6490b79
test github action
SteveBronder Jun 6, 2024
b2be36e
test github action
SteveBronder Jun 6, 2024
542f636
test github action
SteveBronder Jun 6, 2024
58ee686
update
SteveBronder Jun 7, 2024
0224042
update
SteveBronder Jun 7, 2024
14a78f9
update
SteveBronder Jun 7, 2024
a549064
update
SteveBronder Jun 7, 2024
d0eae22
update
SteveBronder Jun 7, 2024
ad86bf0
update
SteveBronder Jun 8, 2024
a25224c
update
SteveBronder Jun 8, 2024
333988f
update
SteveBronder Jun 8, 2024
1b12e27
update
SteveBronder Jun 8, 2024
57c1710
use ctest in github actions instead of directly calling test
SteveBronder Jun 10, 2024
2ff8d50
Jenkins uses ctest
SteveBronder Jun 10, 2024
63b0ca6
use ctest for opencl
SteveBronder Jun 10, 2024
88632fd
use ctest for opencl
SteveBronder Jun 10, 2024
cde5c09
allow cmake to compile doxygen
SteveBronder Jun 10, 2024
82f5ab8
update test headers and tag for mix fun tests in windows
SteveBronder Jun 11, 2024
4004d23
adds inline to gpu util functions
SteveBronder Jun 11, 2024
10cf4ef
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 11, 2024
7fcb220
add inline to opencl kernel test functions
SteveBronder Jun 12, 2024
6e12385
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 12, 2024
0f9ff17
get mpi tests working locally
SteveBronder Jun 12, 2024
46933ba
Merge remote-tracking branch 'refs/remotes/origin/feature/cmake-tests…
SteveBronder Jun 12, 2024
59d1265
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 12, 2024
bfc4714
update mpi test for cpplint
SteveBronder Jun 12, 2024
b8ea220
update mpi test for cpplint
SteveBronder Jun 12, 2024
02b0ed6
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 12, 2024
dd5d1b9
update names of tests
SteveBronder Jun 12, 2024
2813c37
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 12, 2024
163cfae
fix boost download for timestamp
SteveBronder Jun 12, 2024
ddef41c
Merge remote-tracking branch 'refs/remotes/origin/feature/cmake-tests…
SteveBronder Jun 12, 2024
c162fdf
fix mpi links for cmake
SteveBronder Jun 12, 2024
0f0b0e5
have opencl use a gtest suite to cleanup the allocator between rev tests
SteveBronder Jun 18, 2024
7ed5c3f
Merge remote-tracking branch 'origin/develop' into feature/cmake-tests
SteveBronder Jun 18, 2024
1166b99
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 18, 2024
a5cf6a0
cpplint fixes
SteveBronder Jun 18, 2024
5c9de1c
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 18, 2024
54a3da2
cpplint fixes
SteveBronder Jun 18, 2024
b53e777
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 18, 2024
ecbf433
update jenkinsfile with cc and to report output on ctest error
SteveBronder Jun 18, 2024
e5f47d3
cleanup opencl and comment out device switching test
SteveBronder Jun 20, 2024
06fedf5
Merge remote-tracking branch 'refs/remotes/origin/feature/cmake-tests…
SteveBronder Jun 20, 2024
820c2d7
update
SteveBronder Jun 20, 2024
5f5dc74
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Jun 20, 2024
52f6a79
comment out bad opencl test
SteveBronder Jun 21, 2024
f594095
merge to develop
SteveBronder Oct 30, 2024
99991b6
Update Sundials and fix boost mpi include issue
SteveBronder Oct 30, 2024
c5ddf3c
[Jenkins] auto-formatting by clang-format version 10.0.0-4ubuntu1
stan-buildbot Oct 30, 2024
36043c4
Try out new jenkins with updated cmake
SteveBronder Nov 11, 2024
6a46395
update cmake and ctest
SteveBronder Nov 21, 2024
8aadf09
adds cmake for test headers check
SteveBronder Nov 21, 2024
2fb39d0
update cmake and ctest
SteveBronder Nov 21, 2024
79d7b2a
update cmake and ctest
SteveBronder Nov 21, 2024
b9b9208
print user options for cmake at start of run
SteveBronder Nov 21, 2024
c05ff0b
cleanup ctest regex for labels
SteveBronder Nov 21, 2024
627505a
update pch header to match flags for tests
SteveBronder Nov 26, 2024
9210a03
update pch header to match flags for tests
SteveBronder Nov 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 14 additions & 7 deletions .github/workflows/header_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ jobs:
Get-Command mingw32-make | Select-Object -ExpandProperty Definition
shell: powershell

- name: Build Math libs
shell: powershell
run: mingw32-make -f make/standalone math-libs -j2
# - name: Build Math libs
# shell: powershell
# run: mingw32-make -f make/standalone math-libs -j2

- name: Run header tests
shell: powershell
run: make -j2 test-headers
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE -DSTAN_TEST_HEADERS=ON
cd build
make -j2 test-headers

opencl:
name: OpenCL
Expand All @@ -56,7 +59,8 @@ jobs:

- name: Run header tests
run: |
echo "STAN_OPENCL=true" > make/local
cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE -DSTAN_TEST_HEADERS=ON
cd build
make -j2 test-headers
no_range_checks:
name: NoRange
Expand All @@ -67,5 +71,8 @@ jobs:

- name: Run header tests
run: |
echo "STAN_NO_RANGE_CHECKS=true" > make/local
./runTests.py -j2 ./test/unit/math/prim/err/
cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE -DSTAN_NO_RANGE_CHECKS=ON
cd build
make -j4 test_unit_math_prim_err_subtests
ctest --label-regex unit_math_prim_err
"
76 changes: 21 additions & 55 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ jobs:
if: runner.os == 'Windows'
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build Math libs
shell: powershell
run: |
make -f make/standalone math-libs -j2
# - name: Build Math libs
# shell: powershell
# run: |
# make -f make/standalone math-libs -j4
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run prim and rev unit tests
shell: powershell
run: |
python.exe runTests.py -j2 test/unit/*_test.cpp
python.exe runTests.py -j2 test/unit/math/*_test.cpp
python.exe runTests.py -j2 test/unit/math/prim
python.exe runTests.py -j2 test/unit/math/rev
python.exe runTests.py -j2 test/unit/math/memory
cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE
cd build
make -j4 test_unit_math_prim_rev_test
cd test
ctest -R "unit_math_prim_rev"

- name: Upload gtest_output xml
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
- name: Build Math libs
shell: powershell
run: |
make -f make/standalone math-libs -j2
make -f make/standalone math-libs -j4
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
Expand All @@ -91,12 +91,11 @@ jobs:
- name: Run fwd unit tests and all the mix tests except those in mix/fun
shell: powershell
run: |
python.exe runTests.py test/unit/math/fwd -j2
python.exe runTests.py test/unit/math/mix/core -j2
python.exe runTests.py test/unit/math/mix/functor -j2
python.exe runTests.py test/unit/math/mix/meta -j2
python.exe runTests.py test/unit/math/mix/prob -j2
python.exe runTests.py test/unit/math/mix/*_test.cpp -j2
cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE
cd build
make -j4 test_unit_math_fwd_nonfun_mix_subtests
cd test
ctest -R "unit_math_fwd_nonfun_mix"

- name: Upload gtest_output xml
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -126,17 +125,18 @@ jobs:
- name: Build Math libs
shell: powershell
run: |
make -f make/standalone math-libs -j2
make -f make/standalone math-libs -j4
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run mix/fun unit tests
shell: powershell
run: |
$MixFunTests = Get-ChildItem -Path test\unit\math\mix\fun\* -Include *.cpp | Resolve-Path -Relative
$NumberTests = $MixFunTests.Length
$HalfNumberTests = [math]::Floor($NumberTests / 2)
python.exe runTests.py $MixFunTests[0..$HalfNumberTests]
cmake -S . -B build -DCMAKE_BUILD_TYPE=RELEASE
cd build
make -j4 test_unit_math_mix_fun_subtests
cd test
ctest -L "unit_math_mix_fun"

- name: Upload gtest_output xml
uses: actions/upload-artifact@v4
Expand All @@ -145,40 +145,6 @@ jobs:
name: gtest_outputs_xml
path: '**/*_test.xml'

mix-fun-2:
name: mix/fun tests 2
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
rtools-version: '44'

- name: Set path for Rtools44
if: runner.os == 'Windows'
run: echo "C:/rtools44/usr/bin;C:/rtools44/x86_64-w64-mingw32.static.posix/bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8

- name: Build Math libs
shell: powershell
run: |
Add-Content make\local "O=1`n"
make -f make/standalone math-libs -j2
- name: Add TBB to PATH
shell: powershell
run: echo "D:/a/math/math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Run mix/fun unit tests
shell: powershell
run: |
$MixFunTests = Get-ChildItem -Path test\unit\math\mix\fun\* -Include *.cpp | Resolve-Path -Relative
$NumberTests = $MixFunTests.Length
$HalfNumberTests = [math]::Floor($NumberTests / 2)
python.exe runTests.py $MixFunTests[($HalfNumberTests + 1)..($NumberTests - 1)]

- name: Upload gtest_output xml
uses: actions/upload-artifact@v4
if: failure()
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ benchmarks/*.csv
*.exe
*.a

#build directory
/build/**
# Intel template building blocks (TBB)
lib/tbb

Expand Down
Loading