Skip to content

Commit

Permalink
Merge branch 'main' of github.com:d-SEAMS/seams-core
Browse files Browse the repository at this point in the history
  • Loading branch information
RuhiRG committed Aug 26, 2024
2 parents 3834798 + e42be0a commit 384f197
Show file tree
Hide file tree
Showing 11 changed files with 12,488 additions and 20,232 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/build_lib.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/build_meson.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "[meson] test yodaLib, yodaStruct"
on: [push, pull_request]
jobs:
build_lib:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: environment.yml
cache-environment: true
cache-downloads: false

- name: Build library with meson
shell: micromamba-shell {0}
run: |
mkdir bbdir
meson setup bbdir
meson compile -C bbdir
build_pkg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: mamba-org/setup-micromamba@v1
with:
generate-run-shell: true
environment-file: environment.yml
cache-environment: true
cache-downloads: false

- name: Test application with meson
shell: micromamba-shell {0}
run: |
mkdir bbdir
meson setup bbdir -Dwith_lua=True \
-Dwith_tests=True --prefix $CONDA_PREFIX
meson install -C bbdir
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
$CONDA_PREFIX/bin/yodaStruct -c lua_inputs/config.yml
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ shellBuild/
doxyYoda
doxyYoda_*
run*
bbdir/
# Manual updates ONLY
spack.yml
/.spack-env/
Expand Down Expand Up @@ -336,4 +337,4 @@ TSWLatexianTemp*
.history
.ionide

# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode
5 changes: 3 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ dependencies:
- cmake
- meson
- cmake
- pkgconfig
# - lua-luafilesystem
- luarocks
# Pinned
- fmt==9.0.0
- fmt==9.1.0
- eigen==3.4.0
- lua==5.4.4
- lua==5.3.*
43 changes: 16 additions & 27 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# The project is seams-core, the executable is yodaStruct
project('seams-core', 'cpp',
version : '1.0.1',
default_options : ['warning_level=3', 'cpp_std=c++17'])
default_options : ['warning_level=3', 'cpp_std=c++14'])

host_system = host_machine.system()

Expand All @@ -33,7 +33,7 @@ if host_system == 'darwin'
# Workaround for
# error: aligned allocation function of
# type 'void *(unsigned long, enum std::align_val_t)' is only available on macOS 10.13 or newer
add_global_arguments(['-faligned-allocation', '-ggdb', '-Og', '-fno-inline-functions'], language: 'cpp')
add_project_arguments(['-faligned-allocation', '-ggdb', '-Og', '-fno-inline-functions'], language: 'cpp')
endif

cppc = meson.get_compiler('cpp')
Expand All @@ -45,14 +45,13 @@ _deps += m_dep
_deps += [declare_dependency(link_args: '-lstdc++')]

# All of which can be installed with meson wrap install <blah> originally
subproject('eigen')
eigen_dep = dependency('eigen3',
version: '3.4.0',
required: true)
_deps += [ eigen_dep ]

fmt_dep = dependency('fmt',
version: '9.0.0',
version: '9.1.0',
required: true)
_deps += [ fmt_dep ]

Expand Down Expand Up @@ -95,6 +94,7 @@ ydsl_sources = [
'src/ring.cpp',
'src/seams_input.cpp',
'src/seams_output.cpp',
'src/selection.cpp',
'src/shapeMatch.cpp',
'src/topo_bulk.cpp',
'src/topo_one_dim.cpp',
Expand All @@ -109,40 +109,29 @@ ydslib = library('yodaLib',
install: true
)

yds_dep = declare_dependency(
link_with: [ydslib, _linkto],
include_directories: _incdirs,
compile_args: _args,
dependencies: _deps)


# -------------------- Executable

# Only when not a subproject
if (not meson.is_subproject())
# Lua is only used in the executable
if get_option('with_lua')
lua_dep = dependency('lua',
version : '5.4.6',
required : false)
if lua_dep.found()
version : '<5.4',
required : true)
_deps += [ lua_dep ]
endif
if (not lua_dep.found())
message('Trying with subproject lua, but luafilesystem might be problematic')
subproject('lua')
lua_dep = dependency('lua',
version : '5.4.4',
required : false)
if lua_dep.found()
_deps += [ lua_dep ]
endif
else
message('Lua not found, will assume spack is present')
# Assume spack
lua_spack_dep = cppc.find_library('lua', dirs:
meson.source_root()+'/../.spack-env/view/lib',
required: true)
_deps += [ lua_spack_dep ]
endif
# Build the executable
yds = executable('yodaStruct',
['src/main.cpp'],
['src/main.cpp',
'src/opt_parser.cpp'],
link_with : _linkto,
dependencies: _deps,
dependencies: [_deps, yds_dep],
cpp_args : _args,
include_directories : _incdirs,
install : true)
Expand Down
53 changes: 0 additions & 53 deletions src/include/external/sol/config.hpp

This file was deleted.

Loading

0 comments on commit 384f197

Please sign in to comment.