Skip to content

Commit 8d4ee1d

Browse files
committed
revert: restore build.yml and turbo, remove e2e.yml
1 parent e060723 commit 8d4ee1d

7 files changed

Lines changed: 265 additions & 596 deletions

File tree

.github/workflows/build.yml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
build-android:
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
TURBO_CACHE_DIR: .turbo/android
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
21+
- name: Setup
22+
uses: ./.github/actions/setup
23+
24+
- name: Cache turborepo for Android
25+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
26+
with:
27+
path: ${{ env.TURBO_CACHE_DIR }}
28+
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
29+
restore-keys: |
30+
${{ runner.os }}-turborepo-android-
31+
32+
- name: Check turborepo cache for Android
33+
run: |
34+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
35+
36+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
37+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
38+
fi
39+
40+
- name: Install JDK
41+
if: env.turbo_cache_hit != 1
42+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
43+
with:
44+
distribution: 'zulu'
45+
java-version: '17'
46+
47+
- name: Finalize Android SDK
48+
if: env.turbo_cache_hit != 1
49+
run: |
50+
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
51+
52+
- name: Cache Gradle
53+
if: env.turbo_cache_hit != 1
54+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
55+
with:
56+
path: |
57+
~/.gradle/wrapper
58+
~/.gradle/caches
59+
key: ${{ runner.os }}-gradle-${{ hashFiles('example/bare/android/gradle/wrapper/gradle-wrapper.properties') }}
60+
restore-keys: |
61+
${{ runner.os }}-gradle-
62+
63+
- name: Build example for Android
64+
env:
65+
JAVA_OPTS: "-XX:MaxHeapSize=6g"
66+
run: |
67+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
68+
69+
build-ios:
70+
runs-on: macos-latest
71+
72+
env:
73+
XCODE_VERSION: latest-stable
74+
TURBO_CACHE_DIR: .turbo/ios
75+
RCT_USE_RN_DEP: 1
76+
RCT_USE_PREBUILT_RNCORE: 1
77+
78+
steps:
79+
- name: Checkout
80+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
81+
82+
- name: Setup
83+
uses: ./.github/actions/setup
84+
85+
- name: Cache turborepo for iOS
86+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
87+
with:
88+
path: ${{ env.TURBO_CACHE_DIR }}
89+
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
90+
restore-keys: |
91+
${{ runner.os }}-turborepo-ios-
92+
93+
- name: Check turborepo cache for iOS
94+
run: |
95+
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
96+
97+
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
98+
echo "turbo_cache_hit=1" >> $GITHUB_ENV
99+
fi
100+
101+
- name: Use appropriate Xcode version
102+
if: env.turbo_cache_hit != 1
103+
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
104+
with:
105+
xcode-version: ${{ env.XCODE_VERSION }}
106+
107+
- name: Cache iOS build
108+
if: env.turbo_cache_hit != 1
109+
id: ios-cache
110+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
111+
with:
112+
path: |
113+
~/Library/Caches/ccache
114+
~/Library/Developer/Xcode/DerivedData
115+
example/bare/ios/Pods
116+
key: ${{ runner.os }}-ios-${{ hashFiles('example/bare/ios/Podfile.lock') }}-${{ github.sha }}
117+
restore-keys: |
118+
${{ runner.os }}-ios-${{ hashFiles('example/bare/ios/Podfile.lock') }}-
119+
${{ runner.os }}-ios-
120+
121+
- name: Install ccache
122+
if: env.turbo_cache_hit != 1
123+
run: brew install ccache
124+
125+
- name: Install cocoapods
126+
if: env.turbo_cache_hit != 1 && steps.ios-cache.outputs.cache-hit != 'true'
127+
run: |
128+
cd example/bare
129+
bundle install
130+
bundle exec pod install --project-directory=ios
131+
132+
- name: Build example for iOS
133+
run: |
134+
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"

.github/workflows/e2e.yml

Lines changed: 0 additions & 116 deletions
This file was deleted.

example/expo/app.config.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,4 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
4747
experiments: {
4848
typedRoutes: true,
4949
},
50-
buildCacheProvider: {
51-
plugin: '@eggl-js/expo-github-cache',
52-
options: {
53-
owner: 'lodev09',
54-
repo: 'react-native-true-sheet',
55-
},
56-
},
5750
});

example/expo/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"react-native-worklets": "^0.7.0"
3939
},
4040
"devDependencies": {
41-
"@eggl-js/expo-github-cache": "^0.2.1",
4241
"@types/react": "~19.1.10",
4342
"react-native-monorepo-config": "^0.1.9",
4443
"react-test-renderer": "19.1.0",

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
"react-native-worklets": "^0.7.0",
113113
"react-test-renderer": "19.1.1",
114114
"release-it": "^19.0.4",
115+
"turbo": "^2.5.6",
115116
"typescript": "^5.9.2"
116117
},
117118
"resolutions": {

turbo.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "https://turbo.build/schema.json",
3+
"globalDependencies": [".nvmrc", ".yarnrc.yml"],
4+
"globalEnv": ["NODE_ENV"],
5+
"tasks": {
6+
"build:android": {
7+
"env": ["ANDROID_HOME", "ORG_GRADLE_PROJECT_newArchEnabled"],
8+
"inputs": [
9+
"package.json",
10+
"android",
11+
"!android/build",
12+
"common",
13+
"src/*.ts",
14+
"src/*.tsx",
15+
"example/bare/package.json",
16+
"example/bare/android",
17+
"!example/bare/android/.gradle",
18+
"!example/bare/android/build",
19+
"!example/bare/android/app/build"
20+
],
21+
"outputs": []
22+
},
23+
"build:ios": {
24+
"env": [
25+
"RCT_NEW_ARCH_ENABLED",
26+
"RCT_USE_RN_DEP",
27+
"RCT_USE_PREBUILT_RNCORE"
28+
],
29+
"inputs": [
30+
"package.json",
31+
"*.podspec",
32+
"ios",
33+
"common",
34+
"src/*.ts",
35+
"src/*.tsx",
36+
"example/bare/package.json",
37+
"example/bare/ios",
38+
"!example/bare/ios/build",
39+
"!example/bare/ios/Pods"
40+
],
41+
"outputs": []
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)