Compare commits
1 Commits
v0.2.0
...
1a68502401
| Author | SHA1 | Date | |
|---|---|---|---|
|
1a68502401
|
@@ -38,23 +38,17 @@ jobs:
|
|||||||
echo "=== End dependency package version ==="
|
echo "=== End dependency package version ==="
|
||||||
- name: setup builddir
|
- name: setup builddir
|
||||||
run: meson setup builddir -Db_coverage=true
|
run: meson setup builddir -Db_coverage=true
|
||||||
|
- name: build and test dist package
|
||||||
|
run: ninja -C builddir dist
|
||||||
- name: run unit tests
|
- name: run unit tests
|
||||||
run: ninja -C builddir test
|
run: ninja -C builddir test
|
||||||
- name: calculate coverage
|
- name: calculate coverage
|
||||||
run: ninja -C builddir coverage-text
|
run: ninja -C builddir coverage-text
|
||||||
- name: Coverage report
|
- name: Coverage report
|
||||||
run: cat ./builddir/meson-logs/coverage.txt
|
run: cat ./builddir/meson-logs/coverage.txt
|
||||||
- name: build and test dist package
|
|
||||||
run: ninja -C builddir dist
|
|
||||||
- name: upload dist package
|
- name: upload dist package
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ptprnt
|
name: ptprnt-dist
|
||||||
path: ./builddir/meson-dist/*
|
path: ./builddir/meson-dist/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
- name: upload coverage report
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: coverage.txt
|
|
||||||
path: ./builddir/meson-logs/coverage.txt
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|||||||
15
meson.build
15
meson.build
@@ -1,11 +1,11 @@
|
|||||||
project(
|
project(
|
||||||
'ptprnt',
|
'ptprnt',
|
||||||
'cpp',
|
'cpp',
|
||||||
version: 'v0.2.0-'
|
version: 'v0.1.0-' + run_command(
|
||||||
+ run_command(
|
|
||||||
'git',
|
'git',
|
||||||
'rev-parse',
|
'rev-parse',
|
||||||
'--short', 'HEAD',
|
'--short',
|
||||||
|
'HEAD',
|
||||||
check: true,
|
check: true,
|
||||||
).stdout().strip(),
|
).stdout().strip(),
|
||||||
license: 'GPLv3',
|
license: 'GPLv3',
|
||||||
@@ -24,7 +24,7 @@ log_dep = dependency('spdlog')
|
|||||||
fmt_dep = dependency('fmt')
|
fmt_dep = dependency('fmt')
|
||||||
pangocairo_dep = dependency('pangocairo')
|
pangocairo_dep = dependency('pangocairo')
|
||||||
|
|
||||||
# CLI11
|
# CLI11
|
||||||
cli11_proj = subproject('cli11')
|
cli11_proj = subproject('cli11')
|
||||||
cli11_dep = cli11_proj.get_variable('CLI11_dep')
|
cli11_dep = cli11_proj.get_variable('CLI11_dep')
|
||||||
if not cli11_dep.found()
|
if not cli11_dep.found()
|
||||||
@@ -41,9 +41,7 @@ cpp_args = ['-DPROJ_VERSION="' + meson.project_version() + '"']
|
|||||||
# USB trace mode option (for debugging without sending to hardware)
|
# USB trace mode option (for debugging without sending to hardware)
|
||||||
if get_option('usb_trace_only')
|
if get_option('usb_trace_only')
|
||||||
cpp_args += ['-DUSB_TRACE_ONLY']
|
cpp_args += ['-DUSB_TRACE_ONLY']
|
||||||
message(
|
message('USB_TRACE_ONLY enabled: USB data will be logged but not sent to device')
|
||||||
'USB_TRACE_ONLY enabled: USB data will be logged but not sent to device',
|
|
||||||
)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ptprnt_exe = executable(
|
ptprnt_exe = executable(
|
||||||
@@ -56,6 +54,7 @@ ptprnt_exe = executable(
|
|||||||
cpp_args: cpp_args,
|
cpp_args: cpp_args,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
### Unit tests
|
### Unit tests
|
||||||
|
|
||||||
# GTest and GMock
|
# GTest and GMock
|
||||||
@@ -66,4 +65,4 @@ if not gtest_dep.found()
|
|||||||
error('MESON_SKIP_TEST: gtest not installed.')
|
error('MESON_SKIP_TEST: gtest not installed.')
|
||||||
endif
|
endif
|
||||||
|
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
|||||||
Reference in New Issue
Block a user