Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/cxx_unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
pull_request:
branches: [main]

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
unit-tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: ubuntu:22.04
image: ubuntu:24.04

steps:
- name: Checkout source code
Expand All @@ -27,12 +31,16 @@ jobs:
id: install_packages
run: |
apt-get update
apt-get install -y cmake build-essential libboost-test-dev libfmt-dev wget unzip
apt-get install -y cmake build-essential libboost-test-dev libfmt-dev ninja-build wget unzip
apt-get install -y python3-pip python3-numpy

- name: Install python libraries
id: install_torch
run: pip3 install 'torch>=2.2.0+cpu' --index-url https://download.pytorch.org/whl/cpu
run: >
pip3 install
'torch>=2.2.0+cpu'
--break-system-packages
--index-url https://download.pytorch.org/whl/cpu

- name: Find PyTorch cmake prefix path
id: find_torch
Expand All @@ -45,9 +53,10 @@ jobs:
cmake
-DCMAKE_PREFIX_PATH=${{steps.find_torch.outputs.cmake_prefix_path}}
-B ${{github.workspace}}/build
-G Ninja

- name: Build CXX library
run: cmake --build ${{github.workspace}}/build

- name: Run unit-tests
run: make -C ${{github.workspace}}/build test ARGS="--verbose" BOOST_TEST_LOG_LEVEL="test_suite"
run: ninja -C ${{github.workspace}}/build test
36 changes: 27 additions & 9 deletions .github/workflows/pre_commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,33 @@ on:
pull_request:
branches: [main]

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
- name: Checkout source code
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Configure apt to disable recommendations installation
id: configure_apt
run: |
echo 'APT::Install-Recommends "false";' | sudo tee /etc/apt/apt.conf
echo 'APT::Install-Suggests "false";' | sudo tee -a /etc/apt/apt.conf

- name: Install third-party libraries and tools
id: install_packages
run: |
sudo apt-get install -y cmake build-essential libboost-test-dev libfmt-dev wget unzip
sudo apt-get install -y python3-numpy pre-commit

- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
4 changes: 4 additions & 0 deletions .github/workflows/python_build_wheel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- v*
workflow_dispatch:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/python_unit_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [main]

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
unit-tests:
strategy:
Expand Down
17 changes: 17 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,20 @@ repos:
- id: clang-format
name: "Clang C++ formatting"
types_or: [c++, c, cuda]
- repo: local
hooks:
- id: cppcheck
name: "C++ static analysis"
types_or: [c++, c, cuda]
entry: cppcheck -q -j8 --error-exitcode=1
language: python
additional_dependencies: ["cppcheck==1.5.1"]
args:
- --check-level=exhaustive
- --language=c++
- --enable=warning
- --library=boost
- -I include
- src
- test
- torch_geopooling
Loading