diff --git a/.circleci/config.yml b/.circleci/config.yml index a4231938d..9df4f4997 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -226,7 +226,7 @@ jobs: # test a meson based dist - run: meson dist -Cbuild && rm -rf build # test experimental APIs - - run: meson build -Dexperimental_api=true -Dbenchmark=true -Dexperimental_api=true -Doptimization=2 && ninja -j9 -Cbuild test # or meson test -Cbuild + - run: meson build -Dexperimental_api=true -Dexperimental_api=true -Doptimization=2 && ninja -j9 -Cbuild test # or meson test -Cbuild # run benchmarks - run: build/perf/perf && meson test -Cbuild --benchmark && rm -rf build # or ninja -Cbuild benchmark # mingw diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index a731233a7..bf8e3df86 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -17,7 +17,7 @@ jobs: - name: install meson and fonttools run: sudo pip3 install meson fonttools - name: run - run: meson build -Db_coverage=true -Dglib=enabled -Dcairo=enabled -Dicu=enabled -Dgraphite=enabled -Dfreetype=enabled -Dbenchmark=true -Doptimization=2 + run: meson build -Db_coverage=true -Dglib=enabled -Dcairo=enabled -Dicu=enabled -Dgraphite=enabled -Dfreetype=enabled -Doptimization=2 - name: ci run: meson test --print-errorlogs -Cbuild diff --git a/meson.build b/meson.build index 29988f880..ea9cb3221 100644 --- a/meson.build +++ b/meson.build @@ -344,7 +344,10 @@ if not get_option('tests').disabled() subdir('test') endif -if get_option('benchmark') +if not get_option('benchmark').disabled() and \ + ((host_machine.system() != 'windows' and \ + not meson.is_subproject() and \ + not meson.is_cross_build()) or get_option('benchmark').enabled()) subdir('perf') endif diff --git a/meson_options.txt b/meson_options.txt index a61de2d3c..1590e0f7e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -28,7 +28,7 @@ option('introspection', type: 'feature', value: 'auto', yield: true, option('gtk_doc', type: 'feature', value: 'auto', yield: true, description: 'Generate documentation with gtk-doc') -option('benchmark', type : 'boolean', value : false, +option('benchmark', type: 'feature', value: 'auto', description: 'Enable benchmark tests') option('icu_builtin', type: 'boolean', value: false, description: 'Don\'t separate ICU support as harfbuzz-icu module')