Skip to content

Commit

Permalink
Merge branch 'develop' into model-selection-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
varunagrawal committed Mar 18, 2024
2 parents e9e2ef9 + acf457e commit 538871a
Show file tree
Hide file tree
Showing 38 changed files with 755 additions and 333 deletions.
9 changes: 8 additions & 1 deletion .github/scripts/python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,21 @@ function build()
# Set to 2 cores so that Actions does not error out during resource provisioning.
cmake --build build -j2

$PYTHON -m pip install --user build/python
cmake --build build --target python-install
}

function test()
{
cd $GITHUB_WORKSPACE/python/gtsam/tests
$PYTHON -m unittest discover -v
cd $GITHUB_WORKSPACE

cd $GITHUB_WORKSPACE/python/gtsam_unstable/tests
$PYTHON -m unittest discover -v
cd $GITHUB_WORKSPACE

# cmake --build build --target python-test
# cmake --build build --target python-test-unstable
}

# select between build or test
Expand Down
56 changes: 54 additions & 2 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
CTEST_PARALLEL_LEVEL: 2
CMAKE_BUILD_TYPE: ${{ matrix.build_type }}
PYTHON_VERSION: ${{ matrix.python_version }}
BOOST_VERSION: 1.72.0
BOOST_EXE: boost_1_72_0-msvc-14.2

strategy:
fail-fast: true
Expand All @@ -30,6 +32,7 @@ jobs:
ubuntu-20.04-gcc-9-tbb,
ubuntu-20.04-clang-9,
macOS-11-xcode-13.4.1,
windows-2022-msbuild,
]

build_type: [Release]
Expand All @@ -56,6 +59,10 @@ jobs:
compiler: xcode
version: "13.4.1"

- name: windows-2022-msbuild
os: windows-2022
platform: 64

steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -97,29 +104,74 @@ jobs:
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
- name: Setup msbuild (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x${{matrix.platform}}
toolset: 14.38

- name: cl version (Windows)
if: runner.os == 'Windows'
shell: cmd
run: cl

- name: Setup python (Windows)
uses: actions/setup-python@v4
if: runner.os == 'Windows'
with:
python-version: ${{ matrix.python_version }}

- name: Install ninja (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
choco install ninja
ninja --version
where ninja
- name: Install Boost (Windows)
if: runner.os == 'Windows'
shell: powershell
run: |
# Snippet from: https://github.com/actions/virtual-environments/issues/2667
$BOOST_PATH = "C:\hostedtoolcache\windows\Boost\$env:BOOST_VERSION\x86_64"
# Use the prebuilt binary for Windows
$Url = "https://sourceforge.net/projects/boost/files/boost-binaries/$env:BOOST_VERSION/$env:BOOST_EXE-${{matrix.platform}}.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=$BOOST_PATH"
# Set the BOOST_ROOT variable
echo "BOOST_ROOT=$BOOST_PATH" >> $env:GITHUB_ENV
- name: Set GTSAM_WITH_TBB Flag
if: matrix.flag == 'tbb'
run: |
echo "GTSAM_WITH_TBB=ON" >> $GITHUB_ENV
echo "GTSAM Uses TBB"
- name: Set Swap Space
- name: Set Swap Space (Linux)
if: runner.os == 'Linux'
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 6

- name: Install System Dependencies
- name: Install System Dependencies (Linux, macOS)
if: runner.os != 'Windows'
run: |
bash .github/scripts/python.sh -d
- name: Install Python Dependencies
shell: bash
run: python$PYTHON_VERSION -m pip install -r python/dev_requirements.txt

- name: Build
shell: bash
run: |
bash .github/scripts/python.sh -b
- name: Test
shell: bash
run: |
bash .github/scripts/python.sh -t
27 changes: 16 additions & 11 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Github Actions requires a single row to be added to the build matrix.
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
name: [
windows-2019-cl,
windows-2022-cl,
]

build_type: [
Expand All @@ -37,12 +37,25 @@ jobs:

build_unstable: [ON]
include:
- name: windows-2019-cl
os: windows-2019
- name: windows-2022-cl
os: windows-2022
compiler: cl
platform: 64

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup msbuild
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x${{ matrix.platform }}
toolset: 14.38

- name: cl version
shell: cmd
run: cl

- name: Install Dependencies
shell: powershell
run: |
Expand Down Expand Up @@ -91,14 +104,6 @@ jobs:
# Set the BOOST_ROOT variable
echo "BOOST_ROOT=$BOOST_PATH" >> $env:GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3

- name: Setup msbuild
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x${{ matrix.platform }}

- name: Configuration
shell: bash
run: |
Expand Down
3 changes: 1 addition & 2 deletions gtsam/3rdparty/cephes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.10)
enable_testing()
project(
cephes
Expand All @@ -8,7 +8,6 @@ project(

set(CEPHES_HEADER_FILES
cephes.h
cephes/cephes_names.h
cephes/dd_idefs.h
cephes/dd_real.h
cephes/dd_real_idefs.h
Expand Down
7 changes: 7 additions & 0 deletions gtsam/3rdparty/cephes/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
MIT License

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.
22 changes: 22 additions & 0 deletions gtsam/3rdparty/cephes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# README

This is a vendored version of the Cephes Mathematical Library. The source code can be found on [netlib.org](https://www.netlib.org/cephes/).

The software is provided with an [MIT License](https://smath.com/en-US/view/CephesMathLibrary/license).

## Original Readme

Some software in this archive may be from the book _Methods and
Programs for Mathematical Functions_ (Prentice-Hall or Simon & Schuster
International, 1989) or from the Cephes Mathematical Library, a
commercial product. In either event, it is copyrighted by the author.
What you see here may be used freely but it comes with no support or
guarantee.

The two known misprints in the book are repaired here in the
source listings for the gamma function and the incomplete beta
integral.


Stephen L. Moshier
[email protected]
Loading

0 comments on commit 538871a

Please sign in to comment.