Linux CI: Retry failed XOpenDisplay calls and only log errors in coverage run (#1368)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart@emeel.net> Co-authored-by: Bart Louwers <bart.louwers@gmail.com>
This commit is contained in:
16
.github/workflows/linux-ci.yml
vendored
16
.github/workflows/linux-ci.yml
vendored
@@ -72,6 +72,8 @@ jobs:
|
||||
libwebp-dev
|
||||
|
||||
- name: Build MapLibre Native Core
|
||||
env:
|
||||
CI: 1
|
||||
run: |
|
||||
cmake --version
|
||||
cmake -B build -GNinja -DCMAKE_BUILD_TYPE=Debug -DMLN_WITH_CLANG_TIDY=ON -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMLN_WITH_COVERAGE=ON
|
||||
@@ -182,7 +184,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libuv1-dev \
|
||||
libjpeg-dev \
|
||||
@@ -190,8 +192,8 @@ jobs:
|
||||
libwebp-dev \
|
||||
libglfw3-dev \
|
||||
libsqlite3-dev \
|
||||
xserver-xorg-video-dummy \
|
||||
xinit
|
||||
xvfb \
|
||||
x11-xserver-utils
|
||||
|
||||
- name: Cache Bazel
|
||||
uses: actions/cache@v3
|
||||
@@ -208,10 +210,14 @@ jobs:
|
||||
|
||||
- name: Generate coverage report
|
||||
run: |
|
||||
bazel coverage --test_output=all --combined_report=lcov --nobuild_runfile_links --local_test_jobs=1 --instrumentation_filter="//:mbgl-core" //test:core //render-test:render-test --//:maplibre_platform=linux --run_under=//platform/linux:startxwrapper
|
||||
echo coverage_report="$(bazel info output_path)"/_coverage/_coverage_report.dat >> "$GITHUB_ENV"
|
||||
xvfb-run -a \
|
||||
bazel coverage --combined_report=lcov --instrumentation_filter="//:mbgl-core" --//:maplibre_platform=linux \
|
||||
--test_output=errors --local_test_jobs=1 \
|
||||
--test_env=DISPLAY --test_env=XAUTHORITY --define=CI_BUILD=1 \
|
||||
//test:core
|
||||
|
||||
- name: Upload coverage report
|
||||
if: '!cancelled()'
|
||||
uses: codecov/codecov-action@v3
|
||||
with:
|
||||
files: ${{ env.coverage_report }}
|
||||
|
||||
Reference in New Issue
Block a user