Skip to content

Commit

Permalink
refactor affine project
Browse files Browse the repository at this point in the history
  • Loading branch information
terasakisatoshi committed Jun 22, 2024
1 parent f5db178 commit daa8456
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 19 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/affine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,7 @@ jobs:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- name: Install CxxWrap
run: julia -e 'using Pkg; Pkg.add("CxxWrap")'
- name: Install Eigen
run: sudo apt-get install libeigen3-dev
- name: Build shared libraries
run: bash build.sh
- name: Run Julia Tests
run: julia --project -e 'using Pkg; Pkg.test()'
- name: Run CXX Tests
run: make test
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
10 changes: 0 additions & 10 deletions affine/Makefile

This file was deleted.

File renamed without changes.
14 changes: 14 additions & 0 deletions affine/deps/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CXXWRAP_PREFIX=`julia --project -e 'using CxxWrap; CxxWrap.prefix_path() |> print'`

.PHONY: all run build test clean
all: build

build: *.cpp
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$CXXWRAP_PREFIX
cmake --build ./build --config Release -j `nproc`

test: build
ctest --test-dir ./build

clean:
$(RM) -r build
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions affine/deps/build.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run(`bash build.sh`)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion affine/src/MyCxxWrap5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using ..MyCxxWrap5
using CxxWrap
using Libdl

@wrapmodule(() -> joinpath(pkgdir(@__MODULE__), "build/lib/libjl_affine.$(dlext)"))
@wrapmodule(() -> joinpath(pkgdir(@__MODULE__), "../deps/build/lib/libjl_affine.$(dlext)"))

function __init__()
@initcxx
Expand Down

0 comments on commit daa8456

Please sign in to comment.