|
23 | 23 | description: 'Build for macOS' |
24 | 24 | type: boolean |
25 | 25 | default: false |
| 26 | + run_reference_tests: |
| 27 | + description: 'Run reference tests' |
| 28 | + type: boolean |
| 29 | + default: false |
26 | 30 |
|
27 | 31 | concurrency: |
28 | 32 | group: ${{ github.ref }} |
@@ -65,27 +69,27 @@ jobs: |
65 | 69 | path: packages/webgpu/package.tgz |
66 | 70 | compression-level: 0 |
67 | 71 |
|
68 | | - # These are disabled since they are not useful in the context of |
69 | | - # GitHub Actions CI and they slow down the workflow significantly. |
70 | | - # test: |
71 | | - # runs-on: macos-latest |
72 | | - # steps: |
73 | | - # - name: Checkout |
74 | | - # uses: actions/checkout@v4 |
| 72 | + reference-tests: |
| 73 | + if: github.event_name == 'workflow_dispatch' && github.event.inputs.run_reference_tests == 'true' |
| 74 | + runs-on: macos-latest |
| 75 | + steps: |
| 76 | + - name: Checkout |
| 77 | + uses: actions/checkout@v4 |
75 | 78 |
|
76 | | - # - name: Setup |
77 | | - # uses: ./.github/actions/setup |
78 | | - # with: |
79 | | - # github_token: ${{ secrets.GITHUB_TOKEN }} |
| 79 | + - name: Setup |
| 80 | + uses: ./.github/actions/setup |
| 81 | + with: |
| 82 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
80 | 83 |
|
81 | | - # - name: Install Chrome |
82 | | - # run: npx puppeteer browsers install chrome |
| 84 | + - name: Install Chrome |
| 85 | + run: npx puppeteer browsers install chrome |
83 | 86 |
|
84 | | - # - name: Run reference test suite |
85 | | - # working-directory: packages/webgpu |
86 | | - # run: yarn test:ref |
| 87 | + - name: Run reference test suite |
| 88 | + working-directory: packages/webgpu |
| 89 | + run: yarn test:ref |
87 | 90 |
|
88 | 91 | build-android: |
| 92 | + if: github.event_name == 'workflow_dispatch' && github.event.inputs.build_android == 'true' |
89 | 93 | runs-on: macos-latest |
90 | 94 | env: |
91 | 95 | TURBO_CACHE_DIR: .turbo/android |
@@ -126,7 +130,7 @@ jobs: |
126 | 130 | id: setup-ndk |
127 | 131 | with: |
128 | 132 | ndk-version: r27d |
129 | | - |
| 133 | + |
130 | 134 | - name: Set ANDROID_NDK |
131 | 135 | run: echo "ANDROID_NDK=$ANDROID_HOME/ndk-bundle" >> $GITHUB_ENV |
132 | 136 |
|
@@ -156,6 +160,7 @@ jobs: |
156 | 160 | yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --force |
157 | 161 |
|
158 | 162 | build-ios: |
| 163 | + if: github.event_name == 'workflow_dispatch' && github.event.inputs.build_ios == 'true' |
159 | 164 | runs-on: macos-latest |
160 | 165 | env: |
161 | 166 | TURBO_CACHE_DIR: .turbo/ios |
@@ -187,36 +192,39 @@ jobs: |
187 | 192 | - name: Build example for iOS |
188 | 193 | run: | |
189 | 194 | yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" |
190 | | -# We disable it until RNTA support 0.81 |
191 | | -# build-macos: |
192 | | -# runs-on: macos-latest |
193 | | -# env: |
194 | | -# TURBO_CACHE_DIR: .turbo/macos |
195 | | -# steps: |
196 | | -# - name: Checkout |
197 | | -# uses: actions/checkout@v3 |
198 | | - |
199 | | -# - name: Setup |
200 | | -# uses: ./.github/actions/setup |
201 | | -# with: |
202 | | -# github_token: ${{ secrets.GITHUB_TOKEN }} |
203 | | - |
204 | | -# - name: Cache turborepo for macOS |
205 | | -# uses: actions/cache@v3 |
206 | | -# with: |
207 | | -# path: ${{ env.TURBO_CACHE_DIR }} |
208 | | -# key: ${{ runner.os }}-turborepo-macos-${{ hashFiles('yarn.lock') }} |
209 | | -# restore-keys: | |
210 | | -# ${{ runner.os }}-turborepo-macos- |
211 | | - |
212 | | -# - name: Check turborepo cache for macOS |
213 | | -# run: | |
214 | | -# TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:macos --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:macos').cache.status") |
215 | | - |
216 | | -# if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then |
217 | | -# echo "turbo_cache_hit=1" >> $GITHUB_ENV |
218 | | -# fi |
219 | | - |
220 | | -# - name: Build example for macOS |
221 | | -# run: | |
222 | | -# yarn turbo run build:macos --cache-dir="${{ env.TURBO_CACHE_DIR }}" |
| 195 | +
|
| 196 | + # Note: This job is disabled by default until RNTA supports 0.81 |
| 197 | + # Enable it manually via workflow_dispatch when needed |
| 198 | + build-macos: |
| 199 | + if: github.event_name == 'workflow_dispatch' && github.event.inputs.build_macos == 'true' |
| 200 | + runs-on: macos-latest |
| 201 | + env: |
| 202 | + TURBO_CACHE_DIR: .turbo/macos |
| 203 | + steps: |
| 204 | + - name: Checkout |
| 205 | + uses: actions/checkout@v4 |
| 206 | + |
| 207 | + - name: Setup |
| 208 | + uses: ./.github/actions/setup |
| 209 | + with: |
| 210 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 211 | + |
| 212 | + - name: Cache turborepo for macOS |
| 213 | + uses: actions/cache@v4 |
| 214 | + with: |
| 215 | + path: ${{ env.TURBO_CACHE_DIR }} |
| 216 | + key: ${{ runner.os }}-turborepo-macos-${{ hashFiles('yarn.lock') }} |
| 217 | + restore-keys: | |
| 218 | + ${{ runner.os }}-turborepo-macos- |
| 219 | +
|
| 220 | + - name: Check turborepo cache for macOS |
| 221 | + run: | |
| 222 | + TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:macos --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:macos').cache.status") |
| 223 | +
|
| 224 | + if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then |
| 225 | + echo "turbo_cache_hit=1" >> $GITHUB_ENV |
| 226 | + fi |
| 227 | +
|
| 228 | + - name: Build example for macOS |
| 229 | + run: | |
| 230 | + yarn turbo run build:macos --cache-dir="${{ env.TURBO_CACHE_DIR }}" |
0 commit comments