Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Bart Louwers <bart@emeel.net>
162 lines
4.9 KiB
YAML
162 lines
4.9 KiB
YAML
name: macos-ci
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'platform/macos/**'
|
|
- 'platform/darwin/**'
|
|
- 'platform/glfw/**'
|
|
- '.github/workflows/macos-ci.yml'
|
|
- 'bin/**'
|
|
- 'include/**'
|
|
- 'platform/default/**'
|
|
- 'render-test/**'
|
|
- 'src/**'
|
|
- 'vendor/**'
|
|
- 'metrics/**'
|
|
- '.gitmodules'
|
|
- '!**/*.md'
|
|
- 'WORKSPACE'
|
|
- 'BUILD.bazel'
|
|
- '.bazelrc'
|
|
- '.bazelversion'
|
|
- 'pnpm-lock.yaml'
|
|
- 'CMakeLists.txt'
|
|
- 'CMakePresets.json'
|
|
- 'cmake/**'
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'platform/macos/**'
|
|
- 'platform/darwin/**'
|
|
- 'platform/glfw/**'
|
|
- '.github/workflows/macos-ci.yml'
|
|
- 'bin/**'
|
|
- 'include/**'
|
|
- 'platform/default/**'
|
|
- 'render-test/**'
|
|
- 'src/**'
|
|
- 'vendor/**'
|
|
- 'metrics/**'
|
|
- '.gitmodules'
|
|
- '!**/*.md'
|
|
- 'WORKSPACE'
|
|
- 'BUILD.bazel'
|
|
- '.bazelrc'
|
|
- '.bazelversion'
|
|
- 'pnpm-lock.yaml'
|
|
- 'CMakeLists.txt'
|
|
- 'CMakePresets.json'
|
|
- 'cmake/**'
|
|
|
|
concurrency:
|
|
# cancel jobs on PRs only
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
build:
|
|
name: MacOS Metal CI Tests
|
|
runs-on: [macos-15]
|
|
defaults:
|
|
run:
|
|
working-directory: platform/macos
|
|
shell: bash
|
|
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Cache Bazel
|
|
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
|
|
with:
|
|
key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bazel-
|
|
path: ~/.cache/bazel
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install bazelisk webp libuv webp icu4c jpeg-turbo glfw
|
|
brew link icu4c --force
|
|
|
|
- name: Build AppKit app, GLFW app, cache tool, render tool for macOS
|
|
run: bazel build //platform/macos/app:macos_app //platform/glfw:glfw_app //bin:cache_tool //bin:render_tool --//:renderer=metal
|
|
|
|
- name: Generate Xcode project for macOS
|
|
run: bazel run //platform/macos:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal"
|
|
|
|
webgpu-cmake:
|
|
name: macOS WebGPU (${{ matrix.variant.name }})
|
|
runs-on: macos-15
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
variant:
|
|
- impl: dawn
|
|
name: Dawn
|
|
- impl: wgpu
|
|
name: wgpu
|
|
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
|
|
with:
|
|
submodules: recursive
|
|
persist-credentials: false
|
|
|
|
- name: Install dependencies
|
|
env:
|
|
HOMEBREW_NO_AUTO_UPDATE: 1
|
|
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
|
run: |
|
|
brew install cmake ninja pkg-config python@3.11 go glfw libuv icu4c jpeg-turbo webp libpng ccache
|
|
brew link --overwrite python@3.11
|
|
|
|
- name: Configure environment
|
|
run: |
|
|
{
|
|
echo "PKG_CONFIG_PATH=$(brew --prefix icu4c)/lib/pkgconfig:$(brew --prefix libuv)/lib/pkgconfig:${PKG_CONFIG_PATH}"
|
|
echo "PATH=$(brew --prefix python@3.11)/bin:$(brew --prefix go)/bin:$PATH"
|
|
echo "CC=clang"
|
|
echo "CXX=clang++"
|
|
} >> "$GITHUB_ENV"
|
|
|
|
- name: Configure build
|
|
run: cmake --preset macos-webgpu-${{ matrix.variant.impl }}
|
|
|
|
- name: Build targets
|
|
run: |
|
|
cmake --build build-macos-webgpu-${{ matrix.variant.impl }} --target \
|
|
mbgl-render-test-runner \
|
|
mbgl-expression-test \
|
|
mbgl-test-runner
|
|
|
|
- name: Run unit tests
|
|
id: unit_test
|
|
run: build-macos-webgpu-${{ matrix.variant.impl }}/mbgl-test-runner --gtest_filter=-Map.StyleNetworkErrorRetry:LocalGlyphRasterizer.PingFang:LocalGlyphRasterizer.PingFangWithBoldInStyle:LocalGlyphRasterizer.PingFangSemibold:Map.Offline
|
|
|
|
- name: Run expression tests
|
|
id: expression_test
|
|
run: build-macos-webgpu-${{ matrix.variant.impl }}/expression-test/mbgl-expression-test
|
|
|
|
- name: Prepare render test output directory
|
|
run: mkdir -p metrics/macos-webgpu-${{ matrix.variant.impl }}
|
|
|
|
- name: Run WebGPU render tests
|
|
id: render_test
|
|
run: build-macos-webgpu-${{ matrix.variant.impl }}/mbgl-render-test-runner --manifestPath metrics/macos-webgpu-${{ matrix.variant.impl }}.json
|
|
|
|
- name: Upload render report
|
|
if: always() && steps.render_test.outcome == 'failure'
|
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
|
with:
|
|
name: macos-webgpu-${{ matrix.variant.impl }}-render-report
|
|
path: metrics/macos-webgpu-${{ matrix.variant.impl }}.html
|