-
Notifications
You must be signed in to change notification settings - Fork 2.5k
chore: setup eas ci #2911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+255
−6
Merged
chore: setup eas ci #2911
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
92f82c0
chore: setup eas ci
Yash-Singh1 98f40f3
pls work
Yash-Singh1 f4f256d
pls work
Yash-Singh1 0e32ea5
pls work
Yash-Singh1 9c128b0
pls work
Yash-Singh1 771b288
remove author check
Yash-Singh1 f986a9d
skip if unset
Yash-Singh1 d4db2dd
rm from path
Yash-Singh1 2234f7a
chore: use pnpm for EAS preview workflow
d122aae
keep patch for pnpm
Yash-Singh1 d7a2294
chore: simplify EAS preview setup
d876387
chore: use vp for EAS setup
f313c1f
Revert "chore: use vp for EAS setup"
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| name: Mobile EAS Preview | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| preview: | ||
| name: EAS Preview | ||
| runs-on: blacksmith-8vcpu-ubuntu-2404 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| env: | ||
| APP_VARIANT: preview | ||
| NODE_OPTIONS: --max-old-space-size=8192 | ||
| MOBILE_VERSION_POLICY: fingerprint | ||
| steps: | ||
| - id: expo-token | ||
| name: Check for EXPO_TOKEN | ||
| env: | ||
| EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
| run: | | ||
| if [ -n "$EXPO_TOKEN" ]; then | ||
| echo "present=true" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "present=false" >> "$GITHUB_OUTPUT" | ||
| echo "EXPO_TOKEN is not available; skipping EAS preview." | ||
| fi | ||
|
|
||
| - name: Checkout | ||
| if: steps.expo-token.outputs.present == 'true' | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup Vite+ | ||
| if: steps.expo-token.outputs.present == 'true' | ||
| uses: voidzero-dev/setup-vp@v1 | ||
| with: | ||
| node-version-file: package.json | ||
| cache: true | ||
| run-install: true | ||
|
cursor[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Expose pnpm | ||
| if: steps.expo-token.outputs.present == 'true' | ||
| run: | | ||
| pnpm_version="$(node --print "require('./package.json').packageManager.split('@').pop()")" | ||
| vp_pnpm_bin="$HOME/.vite-plus/package_manager/pnpm/$pnpm_version/pnpm/bin" | ||
| echo "$vp_pnpm_bin" >> "$GITHUB_PATH" | ||
| "$vp_pnpm_bin/pnpm" --version | ||
|
|
||
| - name: Setup EAS | ||
| if: steps.expo-token.outputs.present == 'true' | ||
| uses: expo/expo-github-action@v8 | ||
| with: | ||
| eas-version: latest | ||
| token: ${{ secrets.EXPO_TOKEN }} | ||
| packager: pnpm | ||
|
|
||
| - name: Pull preview environment variables | ||
| if: steps.expo-token.outputs.present == 'true' | ||
| working-directory: apps/mobile | ||
| env: | ||
| EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
| run: eas env:pull preview --non-interactive | ||
|
|
||
| - name: Deploy with fingerprint check | ||
| if: steps.expo-token.outputs.present == 'true' | ||
| uses: expo/expo-github-action/continuous-deploy-fingerprint@main | ||
| env: | ||
| EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} | ||
| with: | ||
|
Yash-Singh1 marked this conversation as resolved.
|
||
| profile: preview:dev | ||
| branch: pr-${{ github.event.pull_request.number }} | ||
| platform: all | ||
| environment: preview | ||
| working-directory: apps/mobile | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Expo artifacts | ||
| .expo/ | ||
| .eas/ | ||
|
|
||
| # Build outputs | ||
| android/ | ||
| ios/ | ||
| dist/ | ||
| web-build/ | ||
|
|
||
| # Test files | ||
| **/*.test.ts | ||
| **/*.test.tsx | ||
|
|
||
| # Docs | ||
| *.md | ||
|
|
||
| # Local env | ||
| .env | ||
| .env.local | ||
| .env*.local | ||
|
|
||
| # TypeScript | ||
| *.tsbuildinfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| diff --git a/build/serializer/sourceMap.js b/build/serializer/sourceMap.js | ||
| index 4cc9aa4..703dfe0 100644 | ||
| --- a/build/serializer/sourceMap.js | ||
| +++ b/build/serializer/sourceMap.js | ||
| @@ -20,6 +20,20 @@ function loadRemapping() { | ||
| } | ||
| return _remapping; | ||
| } | ||
| +let _sourceMapCodec; | ||
| +function loadSourceMapCodec() { | ||
| + if (!_sourceMapCodec) { | ||
| + _sourceMapCodec = require('@jridgewell/sourcemap-codec'); | ||
| + } | ||
| + return _sourceMapCodec; | ||
| +} | ||
| +let _traceMapping; | ||
| +function loadTraceMapping() { | ||
| + if (!_traceMapping) { | ||
| + _traceMapping = require('@jridgewell/trace-mapping'); | ||
| + } | ||
| + return _traceMapping; | ||
|
cursor[bot] marked this conversation as resolved.
|
||
| +} | ||
| let _Generator; | ||
| function loadGenerator() { | ||
| if (!_Generator) { | ||
| @@ -199,6 +213,58 @@ function patchMetroSourceMapStringForPackedMaps() { | ||
| stock.sourceMapString = sourceMapString; | ||
| stock.sourceMapStringNonBlocking = sourceMapStringNonBlocking; | ||
| } | ||
| +// Hermes can emit mappings for Metro trailer/debug lines that have no | ||
| +// corresponding Metro source-map line. @jridgewell/remapping assumes every | ||
| +// referenced generated line exists, so strip those invalid bridge segments. | ||
| +function getGeneratedLineCount(map) { | ||
| + const { TraceMap, decodedMappings } = loadTraceMapping(); | ||
| + return decodedMappings(new TraceMap(map)).length; | ||
| +} | ||
| +function dropInvalidOriginalSegments(map, maxOriginalLine) { | ||
| + const { TraceMap, decodedMappings } = loadTraceMapping(); | ||
| + const decoded = decodedMappings(new TraceMap(map)); | ||
| + let didChange = false; | ||
| + const filtered = decoded.map((line) => { | ||
| + const filteredLine = line.filter((segment) => { | ||
| + if (segment.length < 4) { | ||
| + return true; | ||
| + } | ||
| + const sourceIndex = segment[1]; | ||
| + const sourceLine = segment[2]; | ||
| + const sourceColumn = segment[3]; | ||
| + return (sourceIndex >= 0 && | ||
| + sourceIndex < map.sources.length && | ||
| + sourceLine >= 0 && | ||
| + sourceLine < maxOriginalLine && | ||
| + sourceColumn >= 0); | ||
| + }); | ||
| + if (filteredLine.length !== line.length) { | ||
| + didChange = true; | ||
| + } | ||
| + return filteredLine; | ||
| + }); | ||
| + if (!didChange) { | ||
| + return map; | ||
| + } | ||
| + return { | ||
| + ...map, | ||
| + mappings: loadSourceMapCodec().encode(filtered), | ||
| + }; | ||
| +} | ||
| +function sanitizeSourceMapsForComposition(maps) { | ||
| + let sanitized = maps; | ||
| + for (let index = 1; index < maps.length; index++) { | ||
| + const maxOriginalLine = getGeneratedLineCount(sanitized[index - 1]); | ||
| + const next = dropInvalidOriginalSegments(sanitized[index], maxOriginalLine); | ||
| + if (next !== sanitized[index]) { | ||
| + if (sanitized === maps) { | ||
| + sanitized = maps.slice(); | ||
| + } | ||
| + sanitized[index] = next; | ||
| + } | ||
| + } | ||
| + return sanitized; | ||
| +} | ||
| // `maps[0]` is the original-most transform; `maps[maps.length - 1]` is | ||
| // the most recent. Built on `@jridgewell/remapping` instead of mozilla's | ||
| // `SourceMapConsumer`-based composer. | ||
| @@ -226,7 +292,7 @@ function composeSourceMaps(maps) { | ||
| return { ...map, ignoreList: map.x_google_ignoreList }; | ||
| }); | ||
| // Metro convention is original-first; remapping is most-recent first. | ||
| - const reversed = normalized.slice().reverse(); | ||
| + const reversed = sanitizeSourceMapsForComposition(normalized).slice().reverse(); | ||
| const composed = loadRemapping()(reversed, () => null); | ||
| // Re-emit as a plain object — remapping returns a `SourceMap` class | ||
| // instance, which doesn't round-trip JSON cleanly. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing concurrency can race deploys
Medium Severity
The new EAS preview workflow has no
concurrencygroup for the pull request, so several pushes in quick succession can run overlapping deploy/update jobs against the samepr-<number>branch at once, unlike other PR workflows in this repo that cancel in-progress runs per PR.Reviewed by Cursor Bugbot for commit d122aae. Configure here.