-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github actions to run c++ tests.
- Loading branch information
Showing
4 changed files
with
55 additions
and
7 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,27 @@ | ||
name: CMake | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install third-party libraries | ||
run: sudo apt install -y libboost-test-dev libtorch-dev | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
run: make test ARGS=--verbose" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,29 @@ | |
|
||
setup( | ||
name="torch_geopooling", | ||
version="1.0.0", | ||
description="Geopooling modules for PyTorch framework", | ||
|
||
url="https://github.com/ybubnov/torch_geopooling", | ||
author="Yakau Bubnou", | ||
author_email="[email protected]", | ||
|
||
package_dir={"torch_geopooling": "torch_geopooling"}, | ||
packages=["torch_geopooling"], | ||
|
||
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
classifiers=[ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Developers", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: System :: Archiving :: Compression", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"License :: OSI Approved :: MIT License", | ||
], | ||
|
||
ext_modules=[ | ||
cpp_extension.CppExtension( | ||
name="torch_geopooling._C", | ||
|
@@ -18,11 +37,14 @@ | |
"src/tile.cc", | ||
"torch_geopooling/__bind__/python_module.cc", | ||
], | ||
include_dirs=[ | ||
str(Path.cwd() / "include"), | ||
], | ||
libraries=["fmt", "torch", "c10"], | ||
include_dirs=[str(Path.cwd() / "include")], | ||
libraries=["torch", "c10"], | ||
extra_compile_args=["-DFMT_HEADER_ONLY=1"], | ||
), | ||
], | ||
cmdclass={"build_ext": cpp_extension.BuildExtension}, | ||
|
||
test_require=["pytest"], | ||
install_requires=["torch>=2.0.0"], | ||
setup_requires=["torch>=2.0.0"], | ||
) |
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