-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dev sandbox build and add testing (#28)
* Add dev sandbox testing * Fix cmake error * Add pybind * pybind is pip, of course * Fix based on pybind/pybind11#1379 * Port fix from KISS-ICP
- Loading branch information
Showing
3 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: C++ Build | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
cpp_api: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-20.04] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup cmake | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: "3.25.x" | ||
- name: Install pybind | ||
run: python3 -m pip install pybind11[global] | ||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/src/mapmos/pybind | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
|
||
# As the previous job will always install the dependencies from cmake, and this is guaranteed to | ||
# work, we also want to support dev sandboxes where the main dependencies are already | ||
# pre-installed in the system. For now, we only support dev machines under a GNU/Linux | ||
# environmnets. If you are reading this and need the same functionallity in Windows/macOS please | ||
# open a ticket. | ||
cpp_api_dev: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-20.04] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.apt/cache | ||
key: ${{ runner.os }}-apt-${{ hashFiles('**/ubuntu_dependencies.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-apt- | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential cmake git libeigen3-dev libtbb-dev | ||
- name: Install pybind | ||
run: python3 -m pip install pybind11[global] | ||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/src/mapmos/pybind | ||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters