Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ permissions:
contents: read # needed for CodeQL
security-events: write # needed for CodeQL

env:
EGL_PLATFORM: surfaceless

jobs:
pre_job:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -122,6 +125,7 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DMLN_WITH_COVERAGE=ON \
-DMLN_WITH_EGL=ON \
${{ env.renderer_flag_cmake }}
cmake --build build --target mbgl-core mbgl-test-runner mbgl-render-test-runner mbgl-expression-test mbgl-render mbgl-benchmark-runner

Expand Down Expand Up @@ -165,7 +169,7 @@ jobs:

- name: Run C++ tests
continue-on-error: ${{ matrix.renderer == 'vulkan' }}
run: xvfb-run -a build/mbgl-test-runner
run: build/mbgl-test-runner

# render tests

Expand All @@ -178,7 +182,7 @@ jobs:
if [[ "$renderer" == *-rust ]]; then
renderer=${renderer%-rust}
fi
xvfb-run -a build/mbgl-render-test-runner --manifestPath=metrics/linux-"$renderer".json
build/mbgl-render-test-runner --manifestPath=metrics/linux-"$renderer".json

- name: Upload render test result
if: always() && steps.render_test.outcome == 'failure'
Expand Down Expand Up @@ -228,11 +232,10 @@ jobs:

- name: Generate coverage report
run: |
xvfb-run -a \
bazel coverage --combined_report=lcov --instrumentation_filter="//:mbgl-core" \
bazel coverage --combined_report=lcov --instrumentation_filter="//:mbgl-core" \
--test_output=errors --local_test_jobs=1 \
--repo_env=GCOV="$PWD/.github/scripts/gcov_wrapper" \
--test_env=DISPLAY --test_env=XAUTHORITY --copt="-DCI_BUILD" \
--test_env=EGL_PLATFORM --copt="-DCI_BUILD" \
//test:core //render-test:render-test //expression-test:test
echo coverage_report="$(bazel info output_path)"/_coverage/_coverage_report.dat >> "$GITHUB_ENV"

Expand Down
4 changes: 2 additions & 2 deletions platform/linux/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ cc_library(
name = "impl",
srcs = [
"src/gl_functions.cpp",
"src/headless_backend_glx.cpp",
"src/headless_backend_egl.cpp",
],
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
linkopts = [
"-lGL",
"-lX11",
"-lEGL",
"-luv",
"-lz",
"-lcurl",
Expand Down
Loading