Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
strasdat committed Jun 10, 2024
1 parent 49c07cc commit 7682f8f
Show file tree
Hide file tree
Showing 69 changed files with 1,348 additions and 1,754 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ assignees: ''
**To Reproduce**
[Steps to reproduce the behavior:]
1.
2.
3.
2.
3.

**Expected behavior**
[A clear and concise description of what you expected to happen.]
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build-and-test-sophus-pybind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15]
os: [ubuntu-20.04, macos-13]
fail-fast: false

steps:
- name : Checkout
uses: actions/checkout@v2
Expand Down
59 changes: 0 additions & 59 deletions .github/workflows/coverage.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: format

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
pre-commit-check:
runs-on: ubuntu-latest
steps:
- name: Checkout workspace
uses: actions/checkout@v3
- name: Install pre-commit and install
run: |
pip install pre-commit
pre-commit install
- name: Run pre-commit checks
run: pre-commit run --all-files
34 changes: 0 additions & 34 deletions .github/workflows/gh_pages.yml

This file was deleted.

121 changes: 85 additions & 36 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,100 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
build_type: [Debug, Release]
row_major: [ON, OFF]
basic_logging: [ON, OFF]
exclude:
- build_type: Release
row_major: ON
- build_type: Release
basic_logging: ON
- build_type: Debug
row_major: ON
basic_logging: ON
fail-fast: false
env:
BUILD_TYPE: ${{ matrix.build_type }}
ROW_MAJOR_DEFAULT: ${{ matrix.row_major }}
USE_BASIC_LOGGING: ${{ matrix.basic_logging }}
include:
- test: unit_tests
os: ubuntu-22.04
access: row_major
ensure: default_panic
- test: unit_tests
ensure: disabled
os: ubuntu-22.04
access: col_major
- test: unit_tests
os: ubuntu-24.04
access: col_major
ensure: default_panic
- test: unit_tests
os: macos-13
access: col_major
ensure: default_panic
- test: unit_tests
os: macos-14
access: col_major
ensure: default_panic
- test: install_test
os: ubuntu-22.04
access: col_major
ensure: default_panic
- test: install_test
os: ubuntu-22.04
access: col_major
ensure: custom_handler
- test: install_test
os: macos-14
access: col_major
ensure: default_panic
- test: install_test
os: macos-14
access: col_major
ensure: custom_handler

fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set default value for for environment variables
run: |
echo "ROW_MAJOR_DEFAULT=OFF" >> $GITHUB_ENV
echo "SOPHUS_DISABLE_ENSURES=OFF" >> $GITHUB_ENV
echo "SOPHUS_ENABLE_ENSURE_HANDLER=OFF" >> $GITHUB_ENV
- name: Format
uses: DoozyX/clang-format-lint-action@v0.12
with:
source: '.'
extensions: 'hpp,cpp'
exclude: './sympy ./doxyrest_b'
clangFormatVersion: 9
if: matrix.os == 'ubuntu-20.04'
- name: Update ROW_MAJOR_DEFAULT=ON if condition is met
if: matrix.access == 'row_major'
run: echo "ROW_MAJOR_DEFAULT=ON" >> $GITHUB_ENV

- name: Update SOPHUS_DISABLE_ENSURES=ON if condition is met
if: matrix.ensure == 'disabled'
run: echo "SOPHUS_DISABLE_ENSURES=ON" >> $GITHUB_ENV

- name: Update SOPHUS_ENABLE_ENSURE_HANDLER=ON if condition is met
if: matrix.ensure == 'custom_handler'
run: echo "SOPHUS_ENABLE_ENSURE_HANDLER=ON" >> $GITHUB_ENV

- uses: actions/checkout@v2

- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ runner.os }}-${{ matrix.os }}-${{ matrix.access }}-${{ matrix.ensure }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-${{ matrix.access }}-${{ matrix.ensure }}
- name: Install dependencies (Linux)
run: ./scripts/install_linux_deps.sh
if: matrix.os == 'ubuntu-20.04'

- name: Install fmt dependency (Linux)
run: ./scripts/install_linux_fmt_deps.sh
if: matrix.os == 'ubuntu-20.04' && matrix.basic_logging == 'OFF'
- name: Install dependencies (Linux incl. Ceres)
run: ./scripts/install_ubuntu_deps_incl_ceres.sh
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04'

- name: Install dependencies (Mac OS)
run: ./scripts/install_osx_deps.sh
if: matrix.os == 'macos-10.15'
- name: Install dependencies (Mac OS incl. Ceres)
run: ./scripts/install_osx_deps_incl_ceres.sh
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'

- name: Run tests
run: ./scripts/run_cpp_tests.sh
if: matrix.test == 'unit_tests'

- name: Install test
run: |
echo "Install test"
mkdir build_dir
cd build_dir
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. -DSOPHUS_DISABLE_ENSURE=$SOPHUS_DISABLE_ENSURE -DSOPHUS_ENABLE_ENSURE_HANDLER=$SOPHUS_ENABLE_ENSURE_HANDLER
# Ubuntu builds via Github actions run on 2-core virtual machines
make -j2
sudo make install
cd ..
cd examples
mkdir build_dir
cd build_dir
cmake ..
make
ls -la
if: matrix.test == 'install_test'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build
CMakeLists.txt.user
*.pyc
.vscode/settings.json
.vscode/settings.json
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: (thirdparty/.*)|(.txt)$
- id: check-yaml
args: ["--unsafe"]
- id: check-json
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v14.0.0
hooks:
- id: clang-format
exclude: (sympy/.*)
types_or: [file]
files: .*(\.h|\.cpp|\.h\.glsl|\.proto)$
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
files: ^.*\/ts\/.*\.(css|htm|html|js|json|jsx|less|md|scss|toml|ts|tsx|xml|yaml|yml)$
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.10
hooks:
- id: cmake-format
# lint does not pass
#- id: cmake-lint
Loading

0 comments on commit 7682f8f

Please sign in to comment.