Skip to content

Commit

Permalink
maintenance update
Browse files Browse the repository at this point in the history
  • Loading branch information
strasdat committed Jun 10, 2024
1 parent 49c07cc commit eafec4a
Show file tree
Hide file tree
Showing 71 changed files with 1,375 additions and 1,862 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
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.

137 changes: 100 additions & 37 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,114 @@ 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
compiler: clang
- test: unit_tests
os: ubuntu-24.04
access: col_major
ensure: default_panic
compiler: clang
- test: unit_tests
os: ubuntu-22.04
access: col_major
ensure: default_panic
compiler: gcc
- test: unit_tests
os: ubuntu-24.04
access: col_major
ensure: default_panic
compiler: gcc
- test: unit_tests
os: macos-13
access: col_major
ensure: default_panic
compiler: clang
- test: unit_tests
os: macos-14
access: col_major
ensure: default_panic
compiler: clang
- test: install_test
os: ubuntu-22.04
access: col_major
ensure: default_panic
compiler: clang
- test: install_test
os: ubuntu-22.04
access: col_major
ensure: custom_handler
compiler: clang
- test: install_test
os: macos-14
access: col_major
ensure: default_panic
compiler: clang
- test: install_test
os: macos-14
access: col_major
ensure: custom_handler
compiler: clang

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_ENABLE_ENSURE_HANDLER=OFF" >> $GITHUB_ENV
- name: Format
uses: DoozyX/[email protected]
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_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 }}-${{ matrix.compiler }}
restore-keys: |
${{ runner.os }}-${{ matrix.os }}-${{ matrix.access }}-${{ matrix.ensure }}-${{ matrix.compiler }}
- 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 (Linux)
run: ./scripts/install_linux_deps.sh
if: matrix.os == 'ubuntu-20.04'
- 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: Install fmt dependency (Linux)
run: ./scripts/install_linux_fmt_deps.sh
if: matrix.os == 'ubuntu-20.04' && matrix.basic_logging == 'OFF'
- name: Build (gcc) and run tests
run: ./scripts/run_cpp_tests_gcc.sh
if: matrix.test == 'unit_tests' && matrix.compiler == 'gcc'

- name: Install dependencies (Mac OS)
run: ./scripts/install_osx_deps.sh
if: matrix.os == 'macos-10.15'
- name: Build (clang) and run tests
run: ./scripts/run_cpp_tests_clang.sh
if: matrix.test == 'unit_tests' && matrix.compiler == 'clang'

- name: Run tests
run: ./scripts/run_cpp_tests.sh
- name: Install test
run: |
echo "Install test"
mkdir build_dir
cd build_dir
cmake -DCMAKE_CXX_COMPILER_LAUNCHER=ccache .. -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
./hello_so3
if: matrix.test == 'install_test'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Pybind tests

on:
push:
Expand All @@ -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
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: .*(\.hpp|\.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 eafec4a

Please sign in to comment.