Skip to content

Commit

Permalink
Merge pull request #10 from saudzahirr/CI/CD
Browse files Browse the repository at this point in the history
CI/CD and Skbuild
  • Loading branch information
saudzahirr authored Mar 28, 2024
2 parents 3b8ec1d + ef7dbf4 commit 23e97ea
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 64 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/c-cpp.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
- name: Build and test
run: |
mkdir build
cd build
cmake ..
cmake --build .
cd ..
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ __pycache__
_skbuild/
dist/
build/
<<<<<<< HEAD
_skbuild/
lib/
_cmake_test_compile/
=======
lib/
>>>>>>> master

_version.py
*.log
Expand Down
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
cmake_minimum_required(VERSION 3.22...3.28)
project(vonMises)


set(CMAKE_CXX_STANDARD 11)


set(SOURCES
src/eigenlib/eigen_API.cpp
src/eigenlib/logger.cpp
Expand All @@ -17,8 +15,8 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/src/lib)

include_directories(src/lib)


set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fopenmp")


add_library(eigen SHARED ${SOURCES})

install(TARGETS eigen LIBRARY DESTINATION lib)
2 changes: 0 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ dependencies:
- ruff
- pytest
- tqdm
- pip:
- - -r requirements.txt
4 changes: 4 additions & 0 deletions install.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
install_cmd = shlex.split("python -m pip install -e . -v")
setup_directory = os.getcwd()


with open("build.log", "w") as log:
<<<<<<< HEAD
=======
if not os.path.exists("build"):
os.makedirs("build")
os.chdir("build")
Expand All @@ -17,6 +20,7 @@
os.chdir(setup_directory)

with open("build.log", "a") as log:
>>>>>>> master
rv = subprocess.Popen(wheel_cmd, stdout=log, stderr=log)
while rv.poll() is None:
time.sleep(0.5)
Expand Down
40 changes: 39 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
[build-system]
<<<<<<< HEAD
build-backend = "setuptools.build_meta"
requires = [
"setuptools",
"setuptools_scm",
"scikit-build",
"cmake",
"ninja",
]

[project]
name = "vonMises"
authors = [{name = "Saud Zahir", email = "[email protected]"}]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: C++ :: 11",
"License :: proprietary",
"Operating System :: Linux",
]
description = "Numerical Algorithm for Eigen Value Problems."
keywords = ["numerical"]
license = {file = "LICENSE"}
requires-python = ">=3.11"
dynamic = ["version"]

[project.urls]
"Homepage" = "https://github.com/saudzahirr/vonMises"

[project.scripts]
"vonMises" = "src.__main__:main"

[tool.setuptools.packages.find]
where = ["."]

[tool.setuptools_scm]
version_file = "src/_version.py"
=======
requires = ["setuptools", "setuptools_scm", "wheel"]

[tool.setuptools_scm]
version_file = "src/_version.py"
version_file = "src/_version.py"
>>>>>>> master
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

6 changes: 0 additions & 6 deletions ruff-lint.bat

This file was deleted.

6 changes: 0 additions & 6 deletions ruff-lint.sh

This file was deleted.

34 changes: 0 additions & 34 deletions setup.cfg

This file was deleted.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import setuptools
from skbuild import setup

setuptools.setup()
setup()

0 comments on commit 23e97ea

Please sign in to comment.