Repository navigation
85 lines (75 loc) · 2.56 KB
/
Copy pathtest-macos.yml
File metadata and controls
85 lines (75 loc) · 2.56 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
name: Build and test macOS
on:
workflow_call:
permissions:
contents: read
env:
USE_CCACHE: 1
jobs:
test:
name: macOS integration tests
runs-on: macos-26
timeout-minutes: 40
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: ci-lockfiles
path: .
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.1
- name: Install npm dependencies (bun)
run: bun install --frozen-lockfile
- name: Install Ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: 500M
key: ${{ runner.os }}-ccache-example-macos
create-symlink: true
- name: Setup ccache behavior
run: |
{
echo "CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros"
echo "CCACHE_FILECLONE=true"
echo "CCACHE_DEPEND=true"
echo "CCACHE_INODECACHE=true"
} >> "$GITHUB_ENV"
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true
working-directory: example
- name: Select Xcode 26.5
run: sudo xcode-select -s "/Applications/Xcode_26.5.app/Contents/Developer"
- name: Restore Pods cache
uses: actions/cache@v6
with:
path: example/macos/Pods
key: ${{ runner.os }}-pods-macos-${{ hashFiles('example/macos/Podfile.lock', 'example/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-macos-
- name: Clean generated macOS codegen
run: rm -rf example/macos/build/generated
- name: Install Pods
run: bun --cwd example pods:macos
- name: Build App
working-directory: example/macos
run: |
set -o pipefail
xcodebuild \
-derivedDataPath build/DerivedData -UseModernBuildSystem=YES \
-workspace NitroSQLiteExample.xcworkspace \
-scheme NitroSQLiteExample-macOS \
-configuration Debug \
-destination 'platform=macOS,arch=arm64' \
-showBuildTimingSummary \
ONLY_ACTIVE_ARCH=YES \
build \
CODE_SIGNING_ALLOWED=NO | xcbeautify --renderer github-actions
- name: Run macOS integration tests
working-directory: example/macos
env:
MACOS_APP_PATH: build/DerivedData/Build/Products/Debug/NitroSQLiteExample.app
run: bun run test