Skip to content

Commit 6e067d6

Browse files
committed
Add additional workflows
1 parent 688be59 commit 6e067d6

File tree

4 files changed

+106
-1
lines changed

4 files changed

+106
-1
lines changed

.github/workflows/cpp.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: C++ API
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
9+
env:
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
cpp_api:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-24.04, ubuntu-22.04, windows-2022] # TODO(hlim): Support Mac macos-14, macos-15]
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Setup cmake
21+
uses: jwlawson/[email protected]
22+
with:
23+
cmake-version: "3.25.x"
24+
- name: Configure CMake
25+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/cpp/
26+
- name: Build
27+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
28+
29+
# As the previous job will always install the dependencies from cmake, and this is guaranteed to
30+
# work, we also want to support dev sandboxes where the main dependencies are already
31+
# pre-installed in the system. For now, we only support dev machines under a GNU/Linux
32+
# environmnets. If you are reading this and need the same functionallity in Windows/macOS please
33+
# open a ticket.
34+
cpp_api_dev:
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
matrix:
38+
os: [ubuntu-24.04, ubuntu-22.04]
39+
40+
steps:
41+
- uses: actions/checkout@v3
42+
- name: Cache dependencies
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.apt/cache
46+
key: ${{ runner.os }}-apt-${{ hashFiles('**/ubuntu_dependencies.yml') }}
47+
restore-keys: |
48+
${{ runner.os }}-apt-
49+
- name: Install dependencies
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y build-essential cmake git libeigen3-dev libtbb-dev g++
53+
- name: Configure CMake
54+
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{github.workspace}}/cpp/
55+
- name: Build
56+
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

.github/workflows/pre-commit.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Style Check
2+
3+
on:
4+
push:
5+
branches: ["master"]
6+
pull_request:
7+
branches: ["master"]
8+
9+
jobs:
10+
pre-commit:
11+
name: Pre-commit checks
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.10"
18+
- uses: pre-commit/[email protected]

.github/workflows/pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
runs-on: ${{ matrix.os }}
3131
strategy:
3232
matrix:
33-
os: [ubuntu-22.04, windows-2022, macos-14]
33+
os: [ubuntu-22.04, windows-2022] # TODO(hlim): Support Mac, macos-14]
3434

3535
steps:
3636
- uses: actions/checkout@v3

.github/workflows/python.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Python API
2+
on:
3+
push:
4+
branches: ["main"]
5+
pull_request:
6+
branches: ["main"]
7+
8+
jobs:
9+
python_package:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-24.04, ubuntu-22.04, windows-2022] # TODO(hlim): Support Mac macos-14, macos-15]
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python3
18+
uses: actions/setup-python@v4
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
- name: Build pip package
23+
run: |
24+
python -m pip install --verbose ./python/
25+
- name: Test installation
26+
run: |
27+
kiss_icp_pipeline --version
28+
- name: Run unittests
29+
run: |
30+
python -m pip install --verbose './python[test]'
31+
pytest -rA --verbose ./python/

0 commit comments

Comments
 (0)