From d56afb750a1cde046158f13bb7bc6abbd8f1cb1b Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 13 Jul 2021 00:56:54 +0200 Subject: [PATCH 1/3] [tests] Ignore more symbols These seem to be exported when building with code coverage on macOS. --- src/check-symbols.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/check-symbols.py b/src/check-symbols.py index 8050e1bf9..385959bde 100755 --- a/src/check-symbols.py +++ b/src/check-symbols.py @@ -9,7 +9,8 @@ libs = os.getenv ('libs', '.libs') IGNORED_SYMBOLS = '|'.join(['_fini', '_init', '_fdata', '_ftext', '_fbss', '__bss_start', '__bss_start__', '__bss_end__', '_edata', '_end', '_bss_end__', - '__end__', '__gcov_.*', 'llvm_.*', 'flush_fn_list', 'writeout_fn_list', 'mangle_path']) + '__end__', '__gcov_.*', 'llvm_.*', 'flush_fn_list', 'writeout_fn_list', 'mangle_path', + 'lprofDirMode', 'reset_fn_list']) nm = os.getenv ('NM', shutil.which ('nm')) if not nm: @@ -67,7 +68,7 @@ for soname in ['harfbuzz', 'harfbuzz-subset', 'harfbuzz-icu', 'harfbuzz-gobject' tested = True if not tested: - print ('check-symbols.sh: no shared libraries found; skipping test') + print ('check-symbols.py: no shared libraries found; skipping test') sys.exit (77) sys.exit (stat) From f6c9fcfd3e07dffe246fb727fce95429d028395a Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 13 Jul 2021 01:12:43 +0200 Subject: [PATCH 2/3] [ci] Add macOS GitHub workflow To collect codecov coverage on macOS as well (hopefully it will run the macOS-specific tests). --- .github/workflows/macos-ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/macos-ci.yml diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml new file mode 100644 index 000000000..0ee10752e --- /dev/null +++ b/.github/workflows/macos-ci.yml @@ -0,0 +1,27 @@ +name: macos-ci + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: macos-10.15 + + steps: + - uses: actions/checkout@v2 + - name: install dependencies + run: HOMEBREW_NO_AUTO_UPDATE=1 brew install pkg-config freetype glib cairo icu4c graphite2 gobject-introspection gtk-doc ninja gcovr + - run: pip3 install meson fonttools --upgrade + - name: run + run: PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" meson build -Db_coverage=true -Dcoretext=enabled -Dgraphite=enabled -Dauto_features=enabled -Dchafa=disabled -Doptimization=2 + - name: ci + run: meson test --print-errorlogs -Cbuild + + - name: cov + run: ninja -Cbuild coverage + - uses: codecov/codecov-action@v1 + with: + file: build/meson-logs/coverage.xml From 2c7ef0db0b1b0815fa32d5d21b2c53d3b753aab6 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 13 Jul 2021 13:23:53 +0200 Subject: [PATCH 3/3] [ci] Generate only XML coverage data That is the one we are uploading, and HTML coverage seems broken on macOS. --- .github/workflows/linux-ci.yml | 2 +- .github/workflows/macos-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 88b1f593d..407d21460 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -47,7 +47,7 @@ jobs: # fail-on-alert: true - name: cov - run: ninja -Cbuild coverage + run: ninja -Cbuild coverage-xml - uses: codecov/codecov-action@v1 with: file: build/meson-logs/coverage.xml diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index 0ee10752e..84e54df17 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -21,7 +21,7 @@ jobs: run: meson test --print-errorlogs -Cbuild - name: cov - run: ninja -Cbuild coverage + run: ninja -Cbuild coverage-xml - uses: codecov/codecov-action@v1 with: file: build/meson-logs/coverage.xml