Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
PLukas2018 committed Oct 30, 2024
1 parent 08245ca commit 64b6c05
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ jobs:
strategy:
matrix:
include:
- build-type: release
diffkemp-bin: diffkemp
- build-type: development
diffkemp-bin: build/bin/diffkemp
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Dependencies
run: |
sudo apt update
Expand All @@ -39,21 +39,26 @@ jobs:
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-${{ env.llvm }} main"
sudo apt update
sudo apt install llvm-${{ env.llvm }}-dev clang-${{ env.llvm }}
sudo ln -s /usr/lib/llvm-${{ env.llvm }} /usr/local/lib/llvm
ls "/usr/lib/llvm-${{ env.llvm }}/bin"
echo "/usr/lib/llvm-${{ env.llvm }}/bin" >> $GITHUB_PATH
echo $GITHUB_PATH
- name: Release build and install of DiffKemp
if: ${{ matrix.build-type == 'release' }}
run: |
echo $PATH
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release
echo $PATH
sudo ninja -C build install
pip install .
# No need to install binary with python build
# sudo install -m 0755 bin/diffkemp /usr/bin/diffkemp
- name: Development build of DiffKemp
if: ${{ matrix.build-type == 'development' }}
run: |
echo $PATH
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Debug
echo $PATH
sudo ninja -C build
pip install -e .
- name: Check by building and comparing make-based project
Expand Down
3 changes: 2 additions & 1 deletion diffkemp/simpll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ else ()
endif ()

add_custom_target(python-ffi ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/_simpll.c")
message($ENV{PATH})
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_simpll.c"
DEPENDS simpll-lib "simpll_build.py"
COMMENT "Building CFFI python bindings for SimpLL"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/simpll_build.py .
&& "SIMPLL_BUILD_DIR=${simpll_build_dir}" python3 simpll_build.py)
&& ${CMAKE_COMMAND} -E env PATH=$ENV{PATH} "SIMPLL_BUILD_DIR=${simpll_build_dir}" python3 simpll_build.py)

if(SIMPLL_INSTALL_BINARY)
install(TARGETS simpll
Expand Down
1 change: 1 addition & 0 deletions diffkemp/simpll/simpll_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def get_root_dir(path, is_develop_build):
return os.path.abspath(f"{path}/../..")


print(os.environ["PATH"])
ffibuilder = FFI()
location = os.path.dirname(os.path.abspath(__file__))
root_dir = get_root_dir(location, is_develop_build=(len(sys.argv) == 1))
Expand Down

0 comments on commit 64b6c05

Please sign in to comment.