-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* set remote branch * add subprojects * give up compiling unit tests in Meson because no user-defined function feature * add support for installing m4 macros * add comments in root meson.build * add pkg-config generator * remove gtest subproject because removed unit tests earlier * add python support * add lua support * remove 'bin' install directories because meson defaults to standard conforming directory i.e. bin * add basic java support * reset options * change meson.options to meson_options.txt for backward compatibility * make doxygen not required * remove compiler warnings to match cmake * remove -Wno-unused-result c_arg * add option to disable compilation of lcmgen * mark java as WIP in meson.build * create meson ci tests * edit windows build dependencies and linking in meson * make full lcm_export.h * try not compiling static libs for windows * try verbose output in ci for windows * add compiler arg for windows in meson * build static liblcm again * add basic test to meson build ci * install shared library lcm * use grep to create test for lcm windows * remove verbose output from cmake windows build * remove verbose output from meson windows build * install lcm lib headers * install man pages * clean up commented code and unused code * fix lcm header install subdir into lcm subdir * add build files for c example * add ci test for building c example * install lcm before using in Windows ci test * fix directories * fix fedora docker command and don't build c example for windows * add build files for cpp example and lcm_log_writer * add ci tests for building c++ and lcm log writer example * comment placeholder code for java pkg-config generation * address documentation support not implemented yet * add generated file from examples to gitignore * shorten code and remove unused exe variable declarations * remove jchart2d meson files until further development * shorten library building code using Meson's * add generated c example code to gitignore * add back variable for static lcm lib fix python library installation and remove comment * build all modules with met dependencies by default * remove building java because broken * check for optional module dependencies and don't build optional modules if not found * add options summary * remove generated java targets from main meson build * remove name_suffix from windows python build * remove python support for Windows and describe WIP status for python and java * remove mysterious meson/ directory from gitignore * shorten lcm lib building code * rename lcm-python module to lcm * add detailed summary * add build instructions for Meson * use meson built in default_library switch for building shared/static instead of unused option * fix lcm-lua install_dir and name * mark all optional modules as not working * add spaces * fix python installation for linux and macos * move pure keyword from find_installation() to install_sources() and bring back hacky platlib dir for compatibility with ubuntu 22.04's ancient meson version * fix macos lua install oserror * update lua install_dir to match cmake * replace unsupported message with disabled message when unsupported features are disabled * fix if statement * fix python/lua typo * remove python, lua, and java support * use threads dependency * remove threads dep for windows * include stdbool.h for windows * format code * add rationale for nested broken modules --------- Co-authored-by: jason <[email protected]>
- Loading branch information
Showing
24 changed files
with
646 additions
and
15 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,175 @@ | ||
name: test_meson | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
ubuntu: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-24.04, ubuntu-22.04] | ||
build_type: [Debug, Release] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt install liblua5.3-dev lua5.3 libjchart2d-java libglib2.0-dev meson | ||
- name: Setup Meson | ||
run: meson setup ${{github.workspace}}/build | ||
|
||
- name: Build | ||
run: ninja -C ${{github.workspace}}/build | ||
|
||
- name: Test | ||
run : '${{github.workspace}}/build/liblcm-test/lcm-tester | grep "LCM: OK!"' | ||
|
||
- name: Install | ||
run : sudo ninja -C ${{github.workspace}}/build install | ||
|
||
- name : Build C Example | ||
working-directory: ${{github.workspace}}/examples/c | ||
run: | | ||
meson setup build | ||
ninja -C build | ||
- name: Build C++ Example | ||
working-directory: ${{github.workspace}}/examples/cpp | ||
run: | | ||
meson setup build | ||
ninja -C build | ||
- name: Build and Run C++ Log Writer Example | ||
working-directory: ${{github.workspace}}/examples/cpp/lcm_log_writer | ||
run: | | ||
meson setup build | ||
ninja -C build | ||
LD_LIBRARY_PATH=/usr/local/lib/ build/lcm_log_writer build/example.log | ||
fedora: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build and Start Container | ||
run: | | ||
docker build -f docker/Dockerfile.fedora -t lcm-fedora docker | ||
docker run -v $(pwd):/work -d --rm -it --name lcm-fedora lcm-fedora /bin/bash | ||
- name: Setup Meson | ||
run: docker exec lcm-fedora meson setup ${{github.workspace}}/build | ||
|
||
- name: Build | ||
run: docker exec lcm-fedora ninja -C ${{github.workspace}}/build | ||
|
||
- name: Test | ||
run : 'docker exec lcm-fedora ${{github.workspace}}/build/liblcm-test/lcm-tester | grep "LCM: OK!"' | ||
|
||
- name: Install | ||
run : docker exec lcm-fedora ninja -C ${{github.workspace}}/build install | ||
|
||
- name : Build C Example | ||
run: | | ||
docker exec --workdir /work/examples/c lcm-fedora meson setup build | ||
docker exec --workdir /work/examples/c lcm-fedora ninja -C build | ||
- name: Build C++ Example | ||
run: | | ||
docker exec --workdir /work/examples/cpp lcm-fedora meson setup build | ||
docker exec --workdir /work/examples/cpp lcm-fedora ninja -C build | ||
- name: Build and Run C++ Log Writer Example | ||
working-directory: ${{github.workspace}}/examples/cpp/lcm_log_writer | ||
run: | | ||
docker exec --workdir /work/examples/cpp/lcm_log_writer lcm-fedora meson setup build | ||
docker exec --workdir /work/examples/cpp/lcm_log_writer lcm-fedora ninja -C build | ||
docker exec --workdir /work/examples/cpp/lcm_log_writer -e LD_LIBRARY_PATH=/usr/local/lib64/ lcm-fedora build/lcm_log_writer build/example.log | ||
macos: | ||
strategy: | ||
matrix: | ||
os: [macos-13, macos-14] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
brew install lua meson | ||
- name: Setup Meson | ||
run: meson setup ${{github.workspace}}/build | ||
|
||
- name: Build | ||
run: ninja -C ${{github.workspace}}/build | ||
|
||
- name: Test | ||
run : '${{github.workspace}}/build/liblcm-test/lcm-tester | grep "LCM: OK!"' | ||
|
||
- name: Install | ||
run : sudo ninja -C ${{github.workspace}}/build install | ||
|
||
- name : Build C Example | ||
working-directory: ${{github.workspace}}/examples/c | ||
run: | | ||
meson setup build | ||
ninja -C build | ||
- name: Build C++ Example | ||
working-directory: ${{github.workspace}}/examples/cpp | ||
run: | | ||
meson setup build | ||
ninja -C build | ||
- name: Build and Run C++ Log Writer Example | ||
working-directory: ${{github.workspace}}/examples/cpp/lcm_log_writer | ||
run: | | ||
meson setup build | ||
ninja -C build | ||
build/lcm_log_writer build/example.log | ||
windows: | ||
strategy: | ||
matrix: | ||
os: [windows-2019, windows-2022] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: mingw64 | ||
update: false | ||
install: >- | ||
git | ||
make | ||
pacboy: >- | ||
toolchain:p | ||
cmake:p | ||
glib2:p | ||
gtest:p | ||
meson:p | ||
- name: Setup Meson | ||
run: meson setup build --prefix /mingw64/ | ||
|
||
- name: Build | ||
run: ninja -C build | ||
|
||
- name: Install | ||
run: ninja -C build install | ||
|
||
- name: Test | ||
run : 'lcm-tester | grep "LCM: OK"' |
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 |
---|---|---|
|
@@ -8,4 +8,5 @@ docs/_build/ | |
.project | ||
.classpath | ||
.venv | ||
.DS_Store | ||
.DS_Store | ||
.cache/ |
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
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,5 @@ | ||
# Placeholder code until documentation support is implemented | ||
# doxygen = find_program('doxygen', required : false) | ||
# if not doxygen.found() | ||
# warning('Doxygen was not found; documentation generation will be incomplete') | ||
# endif |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
lcm-gen -c ../types/* |
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,31 @@ | ||
project('lcm_c_example', 'c') | ||
|
||
lcm_dep = dependency('lcm') | ||
glib_dep = dependency('glib-2.0') | ||
|
||
generate_example_messages_c_exe = find_program('generate_example_messages_c.sh') | ||
run_command(generate_example_messages_c_exe, check: true) | ||
|
||
example_messages_source = ['exlcm_exampleconst_t.c', 'exlcm_example_list_t.c', 'exlcm_example_t.c', 'exlcm_muldim_array_t.c', 'exlcm_node_t.c'] | ||
example_messages_c_lib = library('example_messages-c', | ||
example_messages_source, | ||
dependencies : lcm_dep) | ||
|
||
example_messages_c_dep = declare_dependency(link_with : example_messages_c_lib, | ||
dependencies : lcm_dep) | ||
|
||
executable('listener', | ||
'listener.c', | ||
dependencies : example_messages_c_dep) | ||
executable('listener-async', | ||
'listener-async.c', | ||
dependencies : example_messages_c_dep) | ||
executable('listener-glib', | ||
'listener-glib.c', | ||
dependencies : [example_messages_c_dep, glib_dep]) | ||
executable('send_message', | ||
'send_message.c', | ||
dependencies : example_messages_c_dep) | ||
executable('read_log', | ||
'read_log.c', | ||
dependencies : example_messages_c_dep) |
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,3 @@ | ||
#!/bin/bash | ||
|
||
lcm-gen -x ../types/* |
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,11 @@ | ||
project('lcm_log_writer', 'cpp') | ||
|
||
lcm_dep = dependency('lcm') | ||
glib_dep = dependency('glib-2.0') | ||
|
||
run_command('lcm-gen', '-x', 'pronto_joint_state_t.lcm', check: true) | ||
|
||
lcm_log_writer_exe = executable('lcm_log_writer', | ||
'main.cpp', | ||
include_directories : include_directories('pronto'), | ||
dependencies : [lcm_dep, glib_dep]) |
Oops, something went wrong.