Skip to content

Commit 538871a

Browse files
committed
Merge branch 'develop' into model-selection-integration
2 parents e9e2ef9 + acf457e commit 538871a

38 files changed

+755
-333
lines changed

.github/scripts/python.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,21 @@ function build()
6565
# Set to 2 cores so that Actions does not error out during resource provisioning.
6666
cmake --build build -j2
6767

68-
$PYTHON -m pip install --user build/python
68+
cmake --build build --target python-install
6969
}
7070

7171
function test()
7272
{
7373
cd $GITHUB_WORKSPACE/python/gtsam/tests
7474
$PYTHON -m unittest discover -v
7575
cd $GITHUB_WORKSPACE
76+
77+
cd $GITHUB_WORKSPACE/python/gtsam_unstable/tests
78+
$PYTHON -m unittest discover -v
79+
cd $GITHUB_WORKSPACE
80+
81+
# cmake --build build --target python-test
82+
# cmake --build build --target python-test-unstable
7683
}
7784

7885
# select between build or test

.github/workflows/build-python.yml

+54-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
CTEST_PARALLEL_LEVEL: 2
1919
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
2020
PYTHON_VERSION: ${{ matrix.python_version }}
21+
BOOST_VERSION: 1.72.0
22+
BOOST_EXE: boost_1_72_0-msvc-14.2
2123

2224
strategy:
2325
fail-fast: true
@@ -30,6 +32,7 @@ jobs:
3032
ubuntu-20.04-gcc-9-tbb,
3133
ubuntu-20.04-clang-9,
3234
macOS-11-xcode-13.4.1,
35+
windows-2022-msbuild,
3336
]
3437

3538
build_type: [Release]
@@ -56,6 +59,10 @@ jobs:
5659
compiler: xcode
5760
version: "13.4.1"
5861

62+
- name: windows-2022-msbuild
63+
os: windows-2022
64+
platform: 64
65+
5966
steps:
6067
- name: Checkout
6168
uses: actions/checkout@v3
@@ -97,29 +104,74 @@ jobs:
97104
echo "CC=clang" >> $GITHUB_ENV
98105
echo "CXX=clang++" >> $GITHUB_ENV
99106
107+
- name: Setup msbuild (Windows)
108+
if: runner.os == 'Windows'
109+
uses: ilammy/msvc-dev-cmd@v1
110+
with:
111+
arch: x${{matrix.platform}}
112+
toolset: 14.38
113+
114+
- name: cl version (Windows)
115+
if: runner.os == 'Windows'
116+
shell: cmd
117+
run: cl
118+
119+
- name: Setup python (Windows)
120+
uses: actions/setup-python@v4
121+
if: runner.os == 'Windows'
122+
with:
123+
python-version: ${{ matrix.python_version }}
124+
125+
- name: Install ninja (Windows)
126+
if: runner.os == 'Windows'
127+
shell: bash
128+
run: |
129+
choco install ninja
130+
ninja --version
131+
where ninja
132+
133+
- name: Install Boost (Windows)
134+
if: runner.os == 'Windows'
135+
shell: powershell
136+
run: |
137+
# Snippet from: https://github.com/actions/virtual-environments/issues/2667
138+
$BOOST_PATH = "C:\hostedtoolcache\windows\Boost\$env:BOOST_VERSION\x86_64"
139+
140+
# Use the prebuilt binary for Windows
141+
$Url = "https://sourceforge.net/projects/boost/files/boost-binaries/$env:BOOST_VERSION/$env:BOOST_EXE-${{matrix.platform}}.exe"
142+
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
143+
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$BOOST_PATH"
144+
145+
# Set the BOOST_ROOT variable
146+
echo "BOOST_ROOT=$BOOST_PATH" >> $env:GITHUB_ENV
147+
100148
- name: Set GTSAM_WITH_TBB Flag
101149
if: matrix.flag == 'tbb'
102150
run: |
103151
echo "GTSAM_WITH_TBB=ON" >> $GITHUB_ENV
104152
echo "GTSAM Uses TBB"
105153
106-
- name: Set Swap Space
154+
- name: Set Swap Space (Linux)
107155
if: runner.os == 'Linux'
108156
uses: pierotofy/set-swap-space@master
109157
with:
110158
swap-size-gb: 6
111159

112-
- name: Install System Dependencies
160+
- name: Install System Dependencies (Linux, macOS)
161+
if: runner.os != 'Windows'
113162
run: |
114163
bash .github/scripts/python.sh -d
115164
116165
- name: Install Python Dependencies
166+
shell: bash
117167
run: python$PYTHON_VERSION -m pip install -r python/dev_requirements.txt
118168

119169
- name: Build
170+
shell: bash
120171
run: |
121172
bash .github/scripts/python.sh -b
122173
123174
- name: Test
175+
shell: bash
124176
run: |
125177
bash .github/scripts/python.sh -t

.github/workflows/build-windows.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
# Github Actions requires a single row to be added to the build matrix.
2828
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
2929
name: [
30-
windows-2019-cl,
30+
windows-2022-cl,
3131
]
3232

3333
build_type: [
@@ -37,12 +37,25 @@ jobs:
3737

3838
build_unstable: [ON]
3939
include:
40-
- name: windows-2019-cl
41-
os: windows-2019
40+
- name: windows-2022-cl
41+
os: windows-2022
4242
compiler: cl
4343
platform: 64
4444

4545
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v3
48+
49+
- name: Setup msbuild
50+
uses: ilammy/msvc-dev-cmd@v1
51+
with:
52+
arch: x${{ matrix.platform }}
53+
toolset: 14.38
54+
55+
- name: cl version
56+
shell: cmd
57+
run: cl
58+
4659
- name: Install Dependencies
4760
shell: powershell
4861
run: |
@@ -91,14 +104,6 @@ jobs:
91104
# Set the BOOST_ROOT variable
92105
echo "BOOST_ROOT=$BOOST_PATH" >> $env:GITHUB_ENV
93106
94-
- name: Checkout
95-
uses: actions/checkout@v3
96-
97-
- name: Setup msbuild
98-
uses: ilammy/msvc-dev-cmd@v1
99-
with:
100-
arch: x${{ matrix.platform }}
101-
102107
- name: Configuration
103108
shell: bash
104109
run: |

gtsam/3rdparty/cephes/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.12)
1+
cmake_minimum_required(VERSION 3.10)
22
enable_testing()
33
project(
44
cephes
@@ -8,7 +8,6 @@ project(
88

99
set(CEPHES_HEADER_FILES
1010
cephes.h
11-
cephes/cephes_names.h
1211
cephes/dd_idefs.h
1312
cephes/dd_real.h
1413
cephes/dd_real_idefs.h

gtsam/3rdparty/cephes/LICENSE.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
MIT License
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

gtsam/3rdparty/cephes/README.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# README
2+
3+
This is a vendored version of the Cephes Mathematical Library. The source code can be found on [netlib.org](https://www.netlib.org/cephes/).
4+
5+
The software is provided with an [MIT License](https://smath.com/en-US/view/CephesMathLibrary/license).
6+
7+
## Original Readme
8+
9+
Some software in this archive may be from the book _Methods and
10+
Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster
11+
International, 1989) or from the Cephes Mathematical Library, a
12+
commercial product. In either event, it is copyrighted by the author.
13+
What you see here may be used freely but it comes with no support or
14+
guarantee.
15+
16+
The two known misprints in the book are repaired here in the
17+
source listings for the gamma function and the incomplete beta
18+
integral.
19+
20+
21+
Stephen L. Moshier
22+

0 commit comments

Comments
 (0)