44 # Version here should match the one in React Native template and packages/cmake-rn/src/cli.ts
55 NDK_VERSION : 27.1.12297006
66 # Building Hermes from source doesn't support CMake v4
7- CMAKE_VERSION : 3.31.6
7+ CMAKE_VERSION : 4.2.2
88 # Enabling the Gradle test on CI (disabled by default because it downloads a lot)
99 ENABLE_GRADLE_TESTS : true
1010
@@ -28,10 +28,14 @@ jobs:
2828 - uses : actions/setup-node@v6
2929 with :
3030 node-version : lts/krypton
31- - name : Setup clang-format
31+ - name : Setup cpp tools
3232 uses : aminya/setup-cpp@v1
3333 with :
3434 clang-format : true
35+ - name : ccache
36+ uses : hendrikmuhs/ccache-action@v1.2
37+ with :
38+ key : ${{ github.job }}-${{ runner.os }}
3539 # Set up JDK and Android SDK only because we need weak-node-api, to build ferric-example and to run the linting
3640 # TODO: Remove this once we have a way to run linting without building the native code
3741 - name : Set up JDK 17
@@ -71,10 +75,14 @@ jobs:
7175 - uses : actions/setup-node@v6
7276 with :
7377 node-version : lts/krypton
74- - name : Setup clang-format
78+ - name : Setup cpp tools
7579 uses : aminya/setup-cpp@v1
7680 with :
7781 clang-format : true
82+ - name : ccache
83+ uses : hendrikmuhs/ccache-action@v1.2
84+ with :
85+ key : ${{ github.job }}-${{ runner.os }}
7886 - name : Set up JDK 17
7987 uses : actions/setup-java@v4
8088 with :
@@ -104,10 +112,14 @@ jobs:
104112 - uses : actions/setup-node@v6
105113 with :
106114 node-version : lts/krypton
107- - name : Setup clang-format
115+ - name : Setup cpp tools
108116 uses : aminya/setup-cpp@v1
109117 with :
110118 clang-format : true
119+ - name : ccache
120+ uses : hendrikmuhs/ccache-action@v1.2
121+ with :
122+ key : ${{ github.job }}-${{ runner.os }}
111123 - run : npm ci
112124 - run : npm run build
113125 - name : Prepare weak-node-api
@@ -127,10 +139,14 @@ jobs:
127139 - uses : actions/setup-node@v6
128140 with :
129141 node-version : lts/krypton
130- - name : Setup clang-format
142+ - name : Setup cpp tools
131143 uses : aminya/setup-cpp@v1
132144 with :
133145 clang-format : true
146+ - name : ccache
147+ uses : hendrikmuhs/ccache-action@v1.2
148+ with :
149+ key : ${{ github.job }}-${{ runner.os }}
134150 - name : Set up JDK 17
135151 uses : actions/setup-java@v3
136152 with :
@@ -151,7 +167,7 @@ jobs:
151167 - name : Run tests (iOS)
152168 run : npm run test:ios:allTests
153169 # TODO: Enable release mode when it works
154- # run: npm run test:ios -- --mode Release
170+ # run: npm run test:ios:allTests -- --mode Release
155171 working-directory : apps/test-app
156172 test-macos :
157173 # Disabling this on main for now, as initializing the template takes a long time and
@@ -164,10 +180,14 @@ jobs:
164180 - uses : actions/setup-node@v6
165181 with :
166182 node-version : lts/krypton
167- - name : Setup clang-format
183+ - name : Setup cpp tools
168184 uses : aminya/setup-cpp@v1
169185 with :
170186 clang-format : true
187+ - name : ccache
188+ uses : hendrikmuhs/ccache-action@v1.2
189+ with :
190+ key : ${{ github.job }}-${{ runner.os }}
171191 - name : Set up JDK 17
172192 uses : actions/setup-java@v3
173193 with :
@@ -187,9 +207,17 @@ jobs:
187207 - run : npm run init-macos-test-app
188208 - run : pod install --project-directory=macos
189209 working-directory : apps/macos-test-app
190- - name : Run MacOS test app
191- run : npm run test:allTests -- --mode Release
210+ - name : Bundle test app
211+ run : npx react-native bundle --entry-file index.js --platform macos --dev false --minify false --bundle-output dist/main.macos.jsbundle --assets-dest dist/res
192212 working-directory : apps/macos-test-app
213+ - name : Build test app
214+ run : xcodebuild archive -workspace MacOSTestApp.xcworkspace -configuration Release -scheme MacOSTestApp-macOS -destination generic/platform="macOS" -archivePath ./build/macos-test-app.xcarchive | xcbeautify
215+ working-directory : apps/macos-test-app/macos
216+ - name : Run test app
217+ run : npx mocha-remote --exit-on-error -- macos/build/macos-test-app.xcarchive/Products/Applications/MacOSTestApp.app/Contents/MacOS/MacOSTestApp
218+ working-directory : apps/macos-test-app
219+ env :
220+ MOCHA_REMOTE_CONTEXT : allTests
193221 test-android :
194222 if : github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'Android 🤖')
195223 name : Test app (Android)
@@ -199,10 +227,14 @@ jobs:
199227 - uses : actions/setup-node@v6
200228 with :
201229 node-version : lts/krypton
202- - name : Setup clang-format
230+ - name : Setup cpp tools
203231 uses : aminya/setup-cpp@v1
204232 with :
205233 clang-format : true
234+ - name : ccache
235+ uses : hendrikmuhs/ccache-action@v1.2
236+ with :
237+ key : ${{ github.job }}-${{ runner.os }}
206238 - name : Set up JDK 17
207239 uses : actions/setup-java@v4
208240 with :
@@ -283,10 +315,14 @@ jobs:
283315 - uses : actions/setup-node@v6
284316 with :
285317 node-version : lts/krypton
286- - name : Setup clang-format
318+ - name : Setup cpp tools
287319 uses : aminya/setup-cpp@v1
288320 with :
289321 clang-format : true
322+ - name : ccache
323+ uses : hendrikmuhs/ccache-action@v1.2
324+ with :
325+ key : ${{ github.job }}-${{ runner.os }}
290326 - name : Set up JDK 17
291327 uses : actions/setup-java@v3
292328 with :
0 commit comments