-
-
Notifications
You must be signed in to change notification settings - Fork 330
82 lines (73 loc) · 2.08 KB
/
macos-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: macos-ci
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'platform/macos/**'
- 'platform/darwin/**'
- '.github/workflows/macos-ci.yml'
- 'bin/**'
- 'include/**'
- 'platform/default/**'
- 'src/**'
- 'vendor/**'
- '.gitmodules'
- '!**/*.md'
- 'WORKSPACE'
- 'BUILD.bazel'
- '.bazelrc'
- '.bazelversion'
- 'pnpm-lock.yaml'
pull_request:
branches:
- main
paths:
- 'platform/macos/**'
- 'platform/darwin/**'
- '.github/workflows/macos-ci.yml'
- 'bin/**'
- 'include/**'
- 'platform/default/**'
- 'src/**'
- 'vendor/**'
- '.gitmodules'
- '!**/*.md'
- 'WORKSPACE'
- 'BUILD.bazel'
- '.bazelrc'
- '.bazelversion'
- 'pnpm-lock.yaml'
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"