Skip to content

Commit 9902ccc

Browse files
authored
Merge pull request #1337 from borglab/release/4.2a8
2 parents 77008c0 + f9a5313 commit 9902ccc

File tree

572 files changed

+26822
-12825
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

572 files changed

+26822
-12825
lines changed

Diff for: .github/scripts/python.sh

+55-33
Original file line numberDiff line numberDiff line change
@@ -43,46 +43,68 @@ if [ -z ${PYTHON_VERSION+x} ]; then
4343
exit 127
4444
fi
4545

46-
PYTHON="python${PYTHON_VERSION}"
46+
export PYTHON="python${PYTHON_VERSION}"
4747

48-
if [[ $(uname) == "Darwin" ]]; then
48+
function install_dependencies()
49+
{
50+
if [[ $(uname) == "Darwin" ]]; then
4951
brew install wget
50-
else
52+
else
5153
# Install a system package required by our library
5254
sudo apt-get install -y wget libicu-dev python3-pip python3-setuptools
53-
fi
54-
55-
PATH=$PATH:$($PYTHON -c "import site; print(site.USER_BASE)")/bin
56-
57-
[ "${GTSAM_WITH_TBB:-OFF}" = "ON" ] && install_tbb
58-
59-
60-
BUILD_PYBIND="ON"
55+
fi
6156

62-
sudo $PYTHON -m pip install -r $GITHUB_WORKSPACE/python/requirements.txt
57+
export PATH=$PATH:$($PYTHON -c "import site; print(site.USER_BASE)")/bin
6358

64-
mkdir $GITHUB_WORKSPACE/build
65-
cd $GITHUB_WORKSPACE/build
59+
[ "${GTSAM_WITH_TBB:-OFF}" = "ON" ] && install_tbb
6660

67-
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
68-
-DGTSAM_BUILD_TESTS=OFF \
69-
-DGTSAM_BUILD_UNSTABLE=${GTSAM_BUILD_UNSTABLE:-ON} \
70-
-DGTSAM_USE_QUATERNIONS=OFF \
71-
-DGTSAM_WITH_TBB=${GTSAM_WITH_TBB:-OFF} \
72-
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
73-
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \
74-
-DGTSAM_BUILD_PYTHON=${BUILD_PYBIND} \
75-
-DGTSAM_UNSTABLE_BUILD_PYTHON=${GTSAM_BUILD_UNSTABLE:-ON} \
76-
-DGTSAM_PYTHON_VERSION=$PYTHON_VERSION \
77-
-DPYTHON_EXECUTABLE:FILEPATH=$(which $PYTHON) \
78-
-DGTSAM_ALLOW_DEPRECATED_SINCE_V42=OFF \
79-
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/gtsam_install
61+
$PYTHON -m pip install -r $GITHUB_WORKSPACE/python/requirements.txt
62+
}
8063

64+
function build()
65+
{
66+
mkdir $GITHUB_WORKSPACE/build
67+
cd $GITHUB_WORKSPACE/build
68+
69+
BUILD_PYBIND="ON"
70+
71+
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
72+
-DGTSAM_BUILD_TESTS=OFF \
73+
-DGTSAM_BUILD_UNSTABLE=${GTSAM_BUILD_UNSTABLE:-ON} \
74+
-DGTSAM_USE_QUATERNIONS=OFF \
75+
-DGTSAM_WITH_TBB=${GTSAM_WITH_TBB:-OFF} \
76+
-DGTSAM_BUILD_EXAMPLES_ALWAYS=OFF \
77+
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \
78+
-DGTSAM_BUILD_PYTHON=${BUILD_PYBIND} \
79+
-DGTSAM_UNSTABLE_BUILD_PYTHON=${GTSAM_BUILD_UNSTABLE:-ON} \
80+
-DGTSAM_PYTHON_VERSION=$PYTHON_VERSION \
81+
-DPYTHON_EXECUTABLE:FILEPATH=$(which $PYTHON) \
82+
-DGTSAM_ALLOW_DEPRECATED_SINCE_V42=OFF \
83+
-DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/gtsam_install
84+
85+
86+
# Set to 2 cores so that Actions does not error out during resource provisioning.
87+
make -j2 install
88+
89+
cd $GITHUB_WORKSPACE/build/python
90+
$PYTHON -m pip install --user .
91+
}
8192

82-
# Set to 2 cores so that Actions does not error out during resource provisioning.
83-
make -j2 install
93+
function test()
94+
{
95+
cd $GITHUB_WORKSPACE/python/gtsam/tests
96+
$PYTHON -m unittest discover -v
97+
}
8498

85-
cd $GITHUB_WORKSPACE/build/python
86-
$PYTHON -m pip install --user .
87-
cd $GITHUB_WORKSPACE/python/gtsam/tests
88-
$PYTHON -m unittest discover -v
99+
# select between build or test
100+
case $1 in
101+
-d)
102+
install_dependencies
103+
;;
104+
-b)
105+
build
106+
;;
107+
-t)
108+
test
109+
;;
110+
esac

Diff for: .github/workflows/build-linux.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ jobs:
2020
# Github Actions requires a single row to be added to the build matrix.
2121
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
2222
name: [
23-
ubuntu-18.04-gcc-5,
24-
ubuntu-18.04-gcc-9,
25-
ubuntu-18.04-clang-9,
23+
ubuntu-20.04-gcc-7,
24+
ubuntu-20.04-gcc-9,
25+
ubuntu-20.04-clang-9,
2626
]
2727

2828
build_type: [Debug, Release]
2929
build_unstable: [ON]
3030
include:
31-
- name: ubuntu-18.04-gcc-5
32-
os: ubuntu-18.04
31+
- name: ubuntu-20.04-gcc-7
32+
os: ubuntu-20.04
3333
compiler: gcc
34-
version: "5"
34+
version: "7"
3535

36-
- name: ubuntu-18.04-gcc-9
37-
os: ubuntu-18.04
36+
- name: ubuntu-20.04-gcc-9
37+
os: ubuntu-20.04
3838
compiler: gcc
3939
version: "9"
4040

41-
- name: ubuntu-18.04-clang-9
42-
os: ubuntu-18.04
41+
- name: ubuntu-20.04-clang-9
42+
os: ubuntu-20.04
4343
compiler: clang
4444
version: "9"
4545

@@ -60,9 +60,9 @@ jobs:
6060
gpg -a --export $LLVM_KEY | sudo apt-key add -
6161
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
6262
fi
63-
sudo apt-get -y update
6463
65-
sudo apt-get -y install cmake build-essential pkg-config libpython-dev python-numpy libicu-dev
64+
sudo apt-get -y update
65+
sudo apt-get -y install cmake build-essential pkg-config libpython3-dev python3-numpy libicu-dev
6666
6767
if [ "${{ matrix.compiler }}" = "gcc" ]; then
6868
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib

Diff for: .github/workflows/build-macos.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
# Github Actions requires a single row to be added to the build matrix.
2020
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
2121
name: [
22-
macOS-10.15-xcode-11.3.1,
22+
macos-11-xcode-13.4.1,
2323
]
2424

2525
build_type: [Debug, Release]
2626
build_unstable: [ON]
2727
include:
28-
- name: macOS-10.15-xcode-11.3.1
29-
os: macOS-10.15
28+
- name: macos-11-xcode-13.4.1
29+
os: macos-11
3030
compiler: xcode
31-
version: "11.3.1"
31+
version: "13.4.1"
3232

3333
steps:
3434
- name: Checkout
@@ -43,7 +43,7 @@ jobs:
4343
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
4444
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
4545
else
46-
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
46+
sudo xcode-select -switch /Applications/Xcode.app
4747
echo "CC=clang" >> $GITHUB_ENV
4848
echo "CXX=clang++" >> $GITHUB_ENV
4949
fi

Diff for: .github/workflows/build-python.yml

+34-28
Original file line numberDiff line numberDiff line change
@@ -19,48 +19,48 @@ jobs:
1919
# Github Actions requires a single row to be added to the build matrix.
2020
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions.
2121
name: [
22-
ubuntu-18.04-gcc-5,
23-
ubuntu-18.04-gcc-9,
24-
ubuntu-18.04-clang-9,
25-
macOS-10.15-xcode-11.3.1,
26-
ubuntu-18.04-gcc-5-tbb,
22+
ubuntu-20.04-gcc-7,
23+
ubuntu-20.04-gcc-9,
24+
ubuntu-20.04-clang-9,
25+
macOS-11-xcode-13.4.1,
26+
ubuntu-20.04-gcc-7-tbb,
2727
]
2828

2929
build_type: [Debug, Release]
3030
python_version: [3]
3131
include:
32-
- name: ubuntu-18.04-gcc-5
33-
os: ubuntu-18.04
32+
- name: ubuntu-20.04-gcc-7
33+
os: ubuntu-20.04
3434
compiler: gcc
35-
version: "5"
35+
version: "7"
3636

37-
- name: ubuntu-18.04-gcc-9
38-
os: ubuntu-18.04
37+
- name: ubuntu-20.04-gcc-9
38+
os: ubuntu-20.04
3939
compiler: gcc
4040
version: "9"
4141

42-
- name: ubuntu-18.04-clang-9
43-
os: ubuntu-18.04
42+
- name: ubuntu-20.04-clang-9
43+
os: ubuntu-20.04
4444
compiler: clang
4545
version: "9"
4646

4747
# NOTE temporarily added this as it is a required check.
48-
- name: ubuntu-18.04-clang-9
49-
os: ubuntu-18.04
48+
- name: ubuntu-20.04-clang-9
49+
os: ubuntu-20.04
5050
compiler: clang
5151
version: "9"
5252
build_type: Debug
5353
python_version: "3"
5454

55-
- name: macOS-10.15-xcode-11.3.1
56-
os: macOS-10.15
55+
- name: macOS-11-xcode-13.4.1
56+
os: macOS-11
5757
compiler: xcode
58-
version: "11.3.1"
58+
version: "13.4.1"
5959

60-
- name: ubuntu-18.04-gcc-5-tbb
61-
os: ubuntu-18.04
60+
- name: ubuntu-20.04-gcc-7-tbb
61+
os: ubuntu-20.04
6262
compiler: gcc
63-
version: "5"
63+
version: "7"
6464
flag: tbb
6565

6666
steps:
@@ -79,9 +79,9 @@ jobs:
7979
gpg -a --export $LLVM_KEY | sudo apt-key add -
8080
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
8181
fi
82+
8283
sudo apt-get -y update
83-
84-
sudo apt-get -y install cmake build-essential pkg-config libpython-dev python-numpy libboost-all-dev
84+
sudo apt-get -y install cmake build-essential pkg-config libpython3-dev python3-numpy libboost-all-dev
8585
8686
if [ "${{ matrix.compiler }}" = "gcc" ]; then
8787
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib
@@ -103,7 +103,7 @@ jobs:
103103
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
104104
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
105105
else
106-
sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app
106+
sudo xcode-select -switch /Applications/Xcode.app
107107
echo "CC=clang" >> $GITHUB_ENV
108108
echo "CXX=clang++" >> $GITHUB_ENV
109109
fi
@@ -112,11 +112,17 @@ jobs:
112112
run: |
113113
echo "GTSAM_WITH_TBB=ON" >> $GITHUB_ENV
114114
echo "GTSAM Uses TBB"
115-
- name: Build (Linux)
115+
- name: Set Swap Space
116116
if: runner.os == 'Linux'
117+
uses: pierotofy/set-swap-space@master
118+
with:
119+
swap-size-gb: 6
120+
- name: Install Dependencies
117121
run: |
118-
bash .github/scripts/python.sh
119-
- name: Build (macOS)
120-
if: runner.os == 'macOS'
122+
bash .github/scripts/python.sh -d
123+
- name: Build
124+
run: |
125+
bash .github/scripts/python.sh -b
126+
- name: Test
121127
run: |
122-
bash .github/scripts/python.sh
128+
bash .github/scripts/python.sh -t

Diff for: .github/workflows/build-special.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,31 +32,31 @@ jobs:
3232

3333
include:
3434
- name: ubuntu-gcc-deprecated
35-
os: ubuntu-18.04
35+
os: ubuntu-20.04
3636
compiler: gcc
3737
version: "9"
3838
flag: deprecated
3939

4040
- name: ubuntu-gcc-quaternions
41-
os: ubuntu-18.04
41+
os: ubuntu-20.04
4242
compiler: gcc
4343
version: "9"
4444
flag: quaternions
4545

4646
- name: ubuntu-gcc-tbb
47-
os: ubuntu-18.04
47+
os: ubuntu-20.04
4848
compiler: gcc
4949
version: "9"
5050
flag: tbb
5151

5252
- name: ubuntu-cayleymap
53-
os: ubuntu-18.04
53+
os: ubuntu-20.04
5454
compiler: gcc
5555
version: "9"
5656
flag: cayley
5757

5858
- name: ubuntu-system-libs
59-
os: ubuntu-18.04
59+
os: ubuntu-20.04
6060
compiler: gcc
6161
version: "9"
6262
flag: system-libs
@@ -74,9 +74,9 @@ jobs:
7474
gpg -a --export 15CF4D18AF4F7421 | sudo apt-key add -
7575
sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
7676
fi
77-
sudo apt-get -y update
7877
79-
sudo apt-get -y install cmake build-essential pkg-config libpython-dev python-numpy libicu-dev
78+
sudo apt-get -y update
79+
sudo apt-get -y install cmake build-essential pkg-config libpython3-dev python3-numpy libicu-dev
8080
8181
if [ "${{ matrix.compiler }}" = "gcc" ]; then
8282
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib

Diff for: .github/workflows/trigger-packaging.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# This triggers building of packages
2+
name: Trigger Package Builds
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
jobs:
8+
trigger-package-build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Trigger Package Rebuild
12+
uses: actions/github-script@v6
13+
with:
14+
github-token: ${{ secrets.PACKAGING_REPO_ACCESS_TOKEN }}
15+
script: |
16+
await github.rest.actions.createWorkflowDispatch({
17+
owner: 'borglab-launchpad',
18+
repo: 'gtsam-packaging',
19+
workflow_id: 'main.yaml',
20+
ref: 'master'
21+
})

Diff for: CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ endif()
1010
set (GTSAM_VERSION_MAJOR 4)
1111
set (GTSAM_VERSION_MINOR 2)
1212
set (GTSAM_VERSION_PATCH 0)
13-
set (GTSAM_PRERELEASE_VERSION "a7")
13+
set (GTSAM_PRERELEASE_VERSION "a8")
1414
math (EXPR GTSAM_VERSION_NUMERIC "10000 * ${GTSAM_VERSION_MAJOR} + 100 * ${GTSAM_VERSION_MINOR} + ${GTSAM_VERSION_PATCH}")
1515

1616
if (${GTSAM_VERSION_PATCH} EQUAL 0)
@@ -101,8 +101,6 @@ if(GTSAM_BUILD_PYTHON OR GTSAM_INSTALL_MATLAB_TOOLBOX)
101101
# Copy matlab.h to the correct folder.
102102
configure_file(${PROJECT_SOURCE_DIR}/wrap/matlab.h
103103
${PROJECT_BINARY_DIR}/wrap/matlab.h COPYONLY)
104-
# Add the include directories so that matlab.h can be found
105-
include_directories("${PROJECT_BINARY_DIR}" "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}")
106104

107105
add_subdirectory(wrap)
108106
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/wrap/cmake")

Diff for: INSTALL.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ will run up to 10x faster in Release mode! See the end of this document for
5050
additional debugging tips.
5151

5252
3. GTSAM has Doxygen documentation. To generate, run 'make doc' from your
53-
build directory.
53+
build directory after setting the `GTSAM_BUILD_DOCS` and `GTSAM_BUILD_[HTML|LATEX]` cmake flags.
5454

5555
4. The instructions below install the library to the default system install path and
5656
build all components. From a terminal, starting in the root library folder,

0 commit comments

Comments
 (0)