Skip to content

Commit a405776

Browse files
chrispaderclaude
andcommitted
chore: restore the macOS example and pause its checks
Nitro V1 doesn't support React Native macOS yet. The macOS example, docs, and CI routing stay in place, but the macOS build, CocoaPods lockfile check, and release lockfile steps are skipped until it does. The Nitro 0.37.1 patch moves into the macOS example because the root install can't apply it to Nitro V1. CocoaPods lockfile selection only covers macOS now that the iOS example uses Swift Package Manager. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent e66a9ad commit a405776

65 files changed

Lines changed: 6795 additions & 63 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/ci-paths.json‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"example/tsconfig.json",
1919
"example/app.json",
2020
"example/package.json",
21+
"example/macos/package.json",
2122
"packages/react-native-nitro-sqlite/**/*.ts",
2223
"packages/react-native-nitro-sqlite/**/*.tsx",
2324
"packages/react-native-nitro-sqlite/**/*.js",
@@ -153,5 +154,42 @@
153154
"example/app.json",
154155
"packages/react-native-nitro-sqlite-vec/src/**",
155156
"!packages/react-native-nitro-sqlite-vec/src/__tests__/**"
157+
],
158+
"macos": [
159+
".github/workflows/**",
160+
".github/actions/**",
161+
".github/ci-paths.json",
162+
"scripts/ci*",
163+
"example/macos/**",
164+
"example/src/**",
165+
"example/tests/**",
166+
"example/app.json",
167+
"example/index.js",
168+
"example/babel.config*.js",
169+
"packages/react-native-nitro-sqlite/src/**",
170+
"packages/react-native-nitro-sqlite/cpp/**",
171+
"packages/react-native-nitro-sqlite/ios/**",
172+
"packages/react-native-nitro-sqlite/nitrogen/generated/shared/**",
173+
"packages/react-native-nitro-sqlite/nitrogen/generated/ios/**",
174+
"packages/react-native-nitro-sqlite/RNNitroSQLite.podspec",
175+
"packages/react-native-nitro-sqlite/react-native.config.js",
176+
"packages/react-native-nitro-sqlite/nitro.json",
177+
"packages/react-native-nitro-sqlite/package.json",
178+
"packages/react-native-nitro-sqlite-vec/src/**",
179+
"packages/react-native-nitro-sqlite-vec/cpp/**",
180+
"packages/react-native-nitro-sqlite-vec/RNNitroSqliteVec.podspec",
181+
"packages/react-native-nitro-sqlite-vec/react-native.config.js",
182+
"packages/react-native-nitro-sqlite-vec/package.json",
183+
"patches/**",
184+
"example/macos/Podfile.lock",
185+
"example/Gemfile*",
186+
"bun.lock",
187+
"package.json",
188+
"example/package.json",
189+
"example/macos/package.json",
190+
"example/react-native.config.js",
191+
"example/macos/react-native.config.js",
192+
"!packages/react-native-nitro-sqlite/src/__tests__/**",
193+
"!packages/react-native-nitro-sqlite-vec/src/__tests__/**"
156194
]
157195
}

‎.github/workflows/ci.yml‎

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ jobs:
4949
android: ${{ steps.select.outputs.android }}
5050
android_configuration: ${{ steps.select.outputs.android_configuration }}
5151
ios: ${{ steps.select.outputs.ios }}
52+
macos: ${{ steps.select.outputs.macos }}
53+
macos_pods: ${{ steps.pods.outputs.macos_pods }}
5254
steps:
5355
- uses: actions/checkout@v7
5456
with:
@@ -63,7 +65,9 @@ jobs:
6365
CI_BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before || github.sha }}
6466
CI_FULL: ${{ inputs.full || github.event_name == 'schedule' }}
6567
- name: Test CI routing
66-
run: node --test scripts/ci.test.ts
68+
run: |
69+
node --test scripts/ci.test.ts
70+
ruby scripts/ci-pod-lockfiles.test.rb
6771
- uses: oven-sh/setup-bun@v2
6872
if: steps.select.outputs.dependencies == 'true'
6973
with:
@@ -82,16 +86,27 @@ jobs:
8286
uses: actions/upload-artifact@v7
8387
with:
8488
name: ci-lockfiles
85-
path: bun.lock
89+
path: |
90+
bun.lock
91+
example/macos/Podfile.lock
8692
retention-days: 1
8793
- name: Require committed dependency resolutions
8894
if: steps.select.outputs.dependencies == 'true'
8995
run: |
9096
bun run check:lockfile
9197
git diff --exit-code -- bun.lock
92-
- name: Test release preflight
98+
- name: Select native lockfile checks
99+
id: pods
100+
if: steps.select.outputs.dependencies == 'true' && steps.select.outputs.macos == 'true'
101+
run: node scripts/ci-dependencies.ts
102+
env:
103+
CI_BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before || github.sha }}
104+
CI_FULL: ${{ inputs.full || github.event_name == 'schedule' }}
105+
- name: Test dependency routing and release preflight
93106
if: steps.select.outputs.dependencies == 'true'
94-
run: bun run test:release
107+
run: |
108+
node --test scripts/ci-dependencies.test.ts
109+
bun run test:release
95110
- name: Test Harness Metro cache handoff
96111
if: steps.select.outputs.dependencies == 'true'
97112
run: node --test scripts/ci-harness-cache.test.ts
@@ -111,6 +126,7 @@ jobs:
111126
(cd packages/react-native-nitro-sqlite && ../../node_modules/.bin/jest --coverage --runInBand)
112127
(cd packages/react-native-nitro-sqlite-vec && ../../node_modules/.bin/jest --coverage --runInBand)
113128
(cd example && ../node_modules/.bin/jest --config jest.mocha.config.js --runInBand --watchman=false)
129+
node --test example/macos/scripts/test-macos.test.mjs
114130
- name: Format C++
115131
if: steps.select.outputs.cpp_format == 'true'
116132
run: |
@@ -128,10 +144,22 @@ jobs:
128144
bun docs typecheck
129145
bun docs build
130146
147+
lockfiles:
148+
name: Native lockfiles
149+
needs: checks
150+
# Paused until Nitro V1 supports React Native macOS. Remove `false &&` to resume it.
151+
if: >-
152+
false &&
153+
github.event_name != 'push' && !github.event.pull_request.draft &&
154+
needs.checks.outputs.macos_pods == 'true'
155+
uses: ./.github/workflows/update-lockfiles.yml
156+
131157
android:
132158
name: Android
133-
needs: checks
159+
needs: [checks, lockfiles]
134160
if: >-
161+
!cancelled() && needs.checks.result == 'success' &&
162+
(needs.lockfiles.result == 'success' || needs.lockfiles.result == 'skipped') &&
135163
github.event_name != 'push' && !github.event.pull_request.draft &&
136164
needs.checks.outputs.android == 'true'
137165
uses: ./.github/workflows/test-harness-android.yml
@@ -141,10 +169,24 @@ jobs:
141169

142170
ios:
143171
name: iOS
144-
needs: checks
172+
needs: [checks, lockfiles]
145173
if: >-
174+
!cancelled() && needs.checks.result == 'success' &&
175+
(needs.lockfiles.result == 'success' || needs.lockfiles.result == 'skipped') &&
146176
github.event_name != 'push' && !github.event.pull_request.draft &&
147177
needs.checks.outputs.ios == 'true'
148178
uses: ./.github/workflows/test-harness-ios.yml
149179
with:
150180
full: ${{ inputs.full || github.event_name == 'schedule' }}
181+
182+
macos:
183+
name: macOS
184+
needs: [checks, lockfiles]
185+
# Paused until Nitro V1 supports React Native macOS. Remove `false &&` to resume it.
186+
if: >-
187+
false &&
188+
!cancelled() && needs.checks.result == 'success' &&
189+
(needs.lockfiles.result == 'success' || needs.lockfiles.result == 'skipped') &&
190+
github.event_name != 'push' && !github.event.pull_request.draft &&
191+
needs.checks.outputs.macos == 'true'
192+
uses: ./.github/workflows/test-macos.yml

‎.github/workflows/release.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,19 @@ jobs:
9494
bun run sync:lockfile
9595
bun run check:lockfile
9696
bun install --frozen-lockfile
97+
# The macOS steps are paused until Nitro V1 supports React Native macOS.
98+
- uses: ruby/setup-ruby@v1
99+
if: false
100+
with:
101+
ruby-version: 3.3.0
102+
bundler-cache: true
103+
working-directory: example
104+
- name: Select Xcode
105+
if: false
106+
run: sudo xcode-select -s "/Applications/Xcode_26.5.app/Contents/Developer"
107+
- name: Update macOS lockfile
108+
if: false
109+
run: bun example pods:macos
97110
- name: Commit lockfiles and optional announcement
98111
run: node scripts/commit-release-lockfiles.ts
99112
env:

‎.github/workflows/test-macos.yml‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Build and test macOS
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
env:
10+
USE_CCACHE: 1
11+
12+
jobs:
13+
test:
14+
name: macOS integration tests
15+
runs-on: macos-26
16+
timeout-minutes: 30
17+
steps:
18+
- uses: actions/checkout@v7
19+
- uses: actions/download-artifact@v8
20+
with:
21+
name: ci-lockfiles
22+
path: .
23+
- uses: oven-sh/setup-bun@v2
24+
with:
25+
bun-version: 1.3.1
26+
27+
- name: Install npm dependencies (bun)
28+
run: bun install --frozen-lockfile
29+
30+
- name: Install Ccache
31+
uses: hendrikmuhs/ccache-action@v1.2
32+
with:
33+
max-size: 500M
34+
key: ${{ runner.os }}-ccache-example-macos
35+
create-symlink: true
36+
- name: Setup ccache behavior
37+
run: |
38+
{
39+
echo "CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros"
40+
echo "CCACHE_FILECLONE=true"
41+
echo "CCACHE_DEPEND=true"
42+
echo "CCACHE_INODECACHE=true"
43+
} >> "$GITHUB_ENV"
44+
45+
- name: Setup Ruby (bundle)
46+
uses: ruby/setup-ruby@v1
47+
with:
48+
ruby-version: 3.3.0
49+
bundler-cache: true
50+
working-directory: example
51+
52+
- name: Select Xcode 26.5
53+
run: sudo xcode-select -s "/Applications/Xcode_26.5.app/Contents/Developer"
54+
55+
- name: Restore Pods cache
56+
uses: actions/cache@v6
57+
with:
58+
path: example/macos/Pods
59+
key: ${{ runner.os }}-pods-macos-${{ hashFiles('example/macos/Podfile.lock', 'example/Gemfile.lock') }}
60+
restore-keys: |
61+
${{ runner.os }}-pods-macos-
62+
- name: Clean generated macOS codegen
63+
run: rm -rf example/macos/build/generated
64+
- name: Install Pods
65+
run: bun --cwd example pods:macos
66+
67+
- name: Build App
68+
working-directory: example/macos
69+
run: |
70+
set -o pipefail
71+
xcodebuild \
72+
-derivedDataPath build/DerivedData -UseModernBuildSystem=YES \
73+
-workspace NitroSQLiteExample.xcworkspace \
74+
-scheme NitroSQLiteExample-macOS \
75+
-configuration Debug \
76+
-destination 'platform=macOS,arch=arm64' \
77+
-showBuildTimingSummary \
78+
ONLY_ACTIVE_ARCH=YES \
79+
build \
80+
CODE_SIGNING_ALLOWED=NO | xcbeautify --renderer github-actions
81+
- name: Run macOS integration tests
82+
working-directory: example/macos
83+
env:
84+
MACOS_APP_PATH: build/DerivedData/Build/Products/Debug/NitroSQLiteExample.app
85+
run: bun run test
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Check native lockfiles
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
check:
11+
name: Check CocoaPods dependency resolutions
12+
runs-on: macos-26
13+
timeout-minutes: 15
14+
env:
15+
USE_FRAMEWORKS: static
16+
steps:
17+
- uses: actions/checkout@v7
18+
- uses: actions/download-artifact@v8
19+
with:
20+
name: ci-lockfiles
21+
path: .
22+
- uses: oven-sh/setup-bun@v2
23+
with:
24+
bun-version: 1.3.1
25+
- name: Install dependencies
26+
run: bun install --frozen-lockfile
27+
- uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: 3.3.0
30+
bundler-cache: true
31+
working-directory: example
32+
- name: Select Xcode 26.5
33+
run: sudo xcode-select -s '/Applications/Xcode_26.5.app/Contents/Developer'
34+
- name: Refresh macOS lockfile
35+
working-directory: example
36+
run: bun pods:macos
37+
- name: Attach refreshed native lockfiles
38+
if: always()
39+
uses: actions/upload-artifact@v7
40+
with:
41+
name: native-lockfiles
42+
path: |
43+
example/macos/Podfile.lock
44+
example/Gemfile.lock
45+
retention-days: 1
46+
- name: Require committed native dependency resolutions
47+
run: |
48+
ruby scripts/ci-pod-lockfiles.rb example/macos/Podfile.lock
49+
git diff --exit-code -- example/Gemfile.lock

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
<br />
1010

11-
Nitro SQLite is a SQLite library for React Native on iOS and Android, built with [Nitro Modules](https://nitro.margelo.com/). It provides synchronous and asynchronous queries, transactions, and batch operations.
11+
Nitro SQLite is a SQLite library for React Native on iOS, macOS, visionOS, and Android, built with [Nitro Modules](https://nitro.margelo.com/). It provides synchronous and asynchronous queries, transactions, and batch operations.
1212

13-
The bundled SQLite build enables [R\*Tree indexes](https://sqlite.margelo.com/docs/concepts/queries-and-indexes#query-spatial-ranges) by default on iOS and Android. Set `nitroSQLite.enableRTree` to `false` in your app's `package.json` to omit it from the native build.
13+
The bundled SQLite build enables [R\*Tree indexes](https://sqlite.margelo.com/docs/concepts/queries-and-indexes#query-spatial-ranges) by default on Apple platforms and Android. Set `nitroSQLite.enableRTree` to `false` in your app's `package.json` to omit it from the native build.
1414

1515
**[Read the documentation](https://sqlite.margelo.com/docs)** for setup, guides, integrations, and the API reference.
1616

0 commit comments

Comments
 (0)