-
Notifications
You must be signed in to change notification settings - Fork 18
136 lines (126 loc) · 4.29 KB
/
Copy pathmac.yml
File metadata and controls
136 lines (126 loc) · 4.29 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Mac
on:
push:
branches:
- main
- master
paths:
- 'snapo-app-mac/**'
- 'snapo-network-inspector-web/**'
- 'contracts/network/**'
- 'scripts/snapo'
- '.github/workflows/mac.yml'
- 'VERSION'
pull_request:
paths:
- 'snapo-app-mac/**'
- 'snapo-network-inspector-web/**'
- 'contracts/network/**'
- 'scripts/snapo'
- '.github/workflows/mac.yml'
- 'VERSION'
permissions:
contents: read
jobs:
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
cache: npm
cache-dependency-path: snapo-network-inspector-web/package-lock.json
- name: Install dependencies
working-directory: snapo-network-inspector-web
run: npm ci
- name: Check formatting
working-directory: snapo-network-inspector-web
run: npm run format:check
- name: Lint
working-directory: snapo-network-inspector-web
run: npm run lint
- name: Typecheck
working-directory: snapo-network-inspector-web
run: npm run typecheck
- name: Test
working-directory: snapo-network-inspector-web
run: npm test
- name: Build
working-directory: snapo-network-inspector-web
run: npm run build
test:
runs-on: macos-26
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with:
xcode-version: '26.1.1'
- name: Test shared device client
working-directory: snapo-app-mac/SnapODeviceClient
run: swift test
- name: Test live preview frame export
working-directory: snapo-app-mac
run: sh scripts/test-live-preview-frame-export.sh
- name: Test live preview pointer delivery
working-directory: snapo-app-mac
run: sh scripts/test-live-preview-pointer.sh
- name: Test capture mode transitions
working-directory: snapo-app-mac
run: sh scripts/test-capture-modes.sh
- name: Test capture startup
working-directory: snapo-app-mac
run: sh scripts/test-startup-capture.sh
build:
runs-on: macos-26
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '22'
cache: npm
cache-dependency-path: snapo-network-inspector-web/package-lock.json
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with:
xcode-version: '26.1.1'
- name: Expose setup-node to the Xcode web UI build phase
run: |
set -euo pipefail
SNAPO_NODE_BIN_DIR=$(dirname "$(command -v node)")
echo "SNAPO_NODE_BIN_DIR=${SNAPO_NODE_BIN_DIR}" >> "$GITHUB_ENV"
- name: Build Snap-O
working-directory: snapo-app-mac
run: |
set -o pipefail
xcodebuild -project Snap-O.xcodeproj \
-scheme Snap-O \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
build
style:
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: Set up mise
working-directory: snapo-app-mac
run: ./scripts/ci-install-mise.sh
- name: Install tools
working-directory: snapo-app-mac
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mise trust --quiet
mise install
- name: SwiftFormat
working-directory: snapo-app-mac
run: mise exec -- swiftformat . --lint --config .swiftformat --reporter github-actions-log
- name: SwiftLint
working-directory: snapo-app-mac
run: mise exec -- swiftlint lint --strict --no-cache --reporter github-actions-logging