macOS Metal + AppKit app (#2205)
Co-authored-by: mwilsnd <mwilsnd@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
2
.github/workflows/ios-ci.yml
vendored
2
.github/workflows/ios-ci.yml
vendored
@@ -77,8 +77,6 @@ jobs:
|
||||
${{ runner.os }}-bazel-
|
||||
path: ~/.cache/bazel
|
||||
|
||||
- run: cp bazel/example_config.bzl bazel/config.bzl
|
||||
|
||||
- name: Check debug symbols
|
||||
run: bazel run //platform:check-public-symbols --//:renderer=metal
|
||||
|
||||
|
||||
94
.github/workflows/macos-ci.yml
vendored
94
.github/workflows/macos-ci.yml
vendored
@@ -4,48 +4,11 @@ on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- opengl-2
|
||||
- macos-*.*.x
|
||||
tags:
|
||||
- 'macos-*'
|
||||
paths:
|
||||
- CMakeLists.txt
|
||||
- 'platform/ios/**'
|
||||
- 'platform/darwin/**'
|
||||
- ".github/workflows/macos-ci.yml"
|
||||
- "bin/**"
|
||||
- "expression-test/**"
|
||||
- "include/**"
|
||||
- "metrics/**"
|
||||
- "platform/default/**"
|
||||
- "render-test/**"
|
||||
- "scripts/**"
|
||||
- "src/**"
|
||||
- "test/**"
|
||||
- "vendor/**"
|
||||
- ".gitmodules"
|
||||
- "!**/*.md"
|
||||
- main
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- opengl-2
|
||||
paths:
|
||||
- CMakeLists.txt
|
||||
- 'platform/ios/**'
|
||||
- 'platform/darwin/**'
|
||||
- ".github/workflows/macos-ci.yml"
|
||||
- "bin/**"
|
||||
- "expression-test/**"
|
||||
- "include/**"
|
||||
- "metrics/**"
|
||||
- "platform/default/**"
|
||||
- "render-test/**"
|
||||
- "scripts/**"
|
||||
- "src/**"
|
||||
- "test/**"
|
||||
- "vendor/**"
|
||||
- ".gitmodules"
|
||||
- "!**/*.md"
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
# cancel jobs on PRs only
|
||||
@@ -55,15 +18,10 @@ concurrency:
|
||||
jobs:
|
||||
build:
|
||||
name: MacOS CI Tests
|
||||
runs-on: [self-hosted, macOS, ARM64]
|
||||
env:
|
||||
BUILDTYPE: Debug
|
||||
HOMEBREW_NO_AUTO_UPDATE: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
|
||||
runs-on: [macos-14]
|
||||
defaults:
|
||||
run:
|
||||
working-directory: platform/ios
|
||||
working-directory: platform/macos
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
@@ -72,31 +30,23 @@ jobs:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
- name: Cache Bazel
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
node-version: 18
|
||||
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: npm install
|
||||
run: npm ci --ignore-scripts
|
||||
|
||||
- name: Run macOS Objective-C tests
|
||||
run: |
|
||||
../macos/scripts/run-in-macos-gui-env.sh "make macos-test"
|
||||
|
||||
- name: npm install # C++ tests are run with root as working directory
|
||||
run: npm ci --ignore-scripts
|
||||
working-directory: .
|
||||
|
||||
- name: Run macOS C++ unit tests
|
||||
run: |
|
||||
cmake -S . -B "$BUILD_DIR"
|
||||
cmake --build "$BUILD_DIR" --target mbgl-test-runner
|
||||
ctest -VV --test-dir "$BUILD_DIR" -R mbgl-test-runner
|
||||
env:
|
||||
BUILD_DIR: ../../../maplibre-gl-native-macostestbuild
|
||||
|
||||
- name: Check public symbols
|
||||
run: make darwin-check-public-symbols
|
||||
|
||||
- name: Lint plist files
|
||||
run: make macos-lint
|
||||
- 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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user