Co-authored-by: mwilsnd <mwilsnd@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: macos-ci
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
# cancel jobs on PRs only
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
jobs:
|
|
build:
|
|
name: MacOS CI Tests
|
|
runs-on: [macos-14]
|
|
defaults:
|
|
run:
|
|
working-directory: platform/macos
|
|
shell: bash
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Cache Bazel
|
|
uses: actions/cache@v4
|
|
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"
|
|
|
|
|