Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
81ddd8a
Copy files to here
sjchmiela Nov 28, 2025
b3a1fc4
Update `package.json` and `yarn.lock`
sjchmiela Nov 28, 2025
a120c75
Add `@expo/rudder-sdk-node`
sjchmiela Nov 28, 2025
1a24cd1
Fix `tsconfig.json`
sjchmiela Nov 28, 2025
8eac515
Simplify direnv setup
sjchmiela Nov 28, 2025
0716f66
Remove obsolete assets
sjchmiela Nov 28, 2025
26532fe
# This is a combination of 2 commits.
sjchmiela Nov 28, 2025
26a164c
Fix `getAccessedEnvs`, `env` and `Environment`
sjchmiela Nov 28, 2025
679a0b7
Import test utils
sjchmiela Nov 28, 2025
5c2268a
Migrate from `promise.sleep` to `timers/promises`
sjchmiela Nov 28, 2025
fe3a4b0
Remove notion of `priority`
sjchmiela Nov 28, 2025
5551a0b
Fix Sentry integration
sjchmiela Nov 28, 2025
a31ed04
Import `ResourceClass` and image info
sjchmiela Nov 28, 2025
e41ed13
Remove `ExitHandler`
sjchmiela Nov 28, 2025
1d711df
Import `errorMiddleware`
sjchmiela Nov 28, 2025
d7f65d3
Import `WebSocketServer`
sjchmiela Nov 28, 2025
1620fa8
Import `LauncherMessage`, `WorkerMessage` and `Worker`
sjchmiela Nov 28, 2025
17ce4d3
Import logger
sjchmiela Nov 28, 2025
f39ff87
Import `turtleFetch`
sjchmiela Nov 28, 2025
9a817bc
Fix `.eslintrc.json`
sjchmiela Nov 28, 2025
840533b
Add dependencies missing from `package.json`
sjchmiela Nov 28, 2025
b00340e
Adjust code for missing `no-floating-promises` ESLint rule
sjchmiela Nov 28, 2025
3422fc9
Adjust `.eslintrc.js`
sjchmiela Nov 28, 2025
27402a2
Fix ESLint problems
sjchmiela Nov 28, 2025
045976f
Update `@types/tar` to fix `minipass` problem
sjchmiela Nov 28, 2025
5cffe5a
Fix test setup
sjchmiela Nov 28, 2025
f497e27
Remove unused build.ts file
sjchmiela Nov 28, 2025
75c5e8c
Adapt `build-and-deploy-worker.yml`
sjchmiela Nov 28, 2025
c427b51
Add `expo-cocoapods-proxy`
sjchmiela Nov 28, 2025
4990d99
Adjust `package.sh`
sjchmiela Nov 28, 2025
c0bddd4
Fixup `setup-gcloud`
sjchmiela Dec 1, 2025
edcd1fd
Bump packages
sjchmiela Dec 2, 2025
5effe7d
Fix GCP authentication means
sjchmiela Dec 8, 2025
c0679a8
Fix src/services/worker/dist expectation from launcher
sjchmiela Dec 9, 2025
bb4f542
Apply #2434 from turtle-v2
sjchmiela Dec 9, 2025
c1786d6
Apply #2436 from turtle-v2
sjchmiela Dec 9, 2025
3ba4617
Add `worker.yml`
sjchmiela Dec 9, 2025
7be83cb
Cleanup `.envrc`
sjchmiela Dec 9, 2025
52352a4
Use real secrets for integration tests
sjchmiela Dec 9, 2025
90570e4
Move `Environment` to `constants`
sjchmiela Dec 10, 2025
0ea8720
Fix `abortBuild` test
sjchmiela Dec 10, 2025
9e4706b
Update packages/expo-cocoapods-proxy/expo-cocoapods-proxy.gemspec
sjchmiela Dec 11, 2025
1012108
Fixup
sjchmiela Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/internal-actions/direnv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: direnv

runs:
using: "composite"
steps:
- name: Download direnv
shell: bash
run: |
# inside of a container you are probably already root
# and sudo is not available
if [ "$EUID" -ne 0 ]; then
SUDO=sudo
fi

os="$(uname | tr '[:upper:]' '[:lower:]')"
arch="$(uname -m)"
if [ "$arch" = 'x86_64' ]; then
arch='amd64'
fi

curl -L -o /tmp/direnv "https://github.com/direnv/direnv/releases/download/v2.32.1/direnv.$os-$arch"
chmod +x /tmp/direnv
$SUDO mv /tmp/direnv /usr/local/bin/direnv

- name: Allow dirs
shell: bash
run: |
config_file="$HOME/.config/direnv/direnv.toml"
mkdir -p $(dirname "$config_file")
cat <<- EOF > "$config_file"
[global]
strict_env = true
[whitelist]
prefix = [ "$GITHUB_WORKSPACE" ]
EOF

- name: Load env
shell: bash
run: |
direnv_path_value="$(direnv exec . sh -c 'echo $PATH')"
IFS=: # loop over PATH entries, which are separated by ":"
for direnv_path_entry in $(echo "$direnv_path_value"); do
if ! echo "$PATH" | grep "$direnv_path_entry" &> /dev/null; then
echo "GITHUB_PATH does not include $direnv_path_entry, adding now"
echo "$direnv_path_entry" >> "$GITHUB_PATH"
fi
done
direnv export gha >> "$GITHUB_ENV"
16 changes: 16 additions & 0 deletions .github/internal-actions/setup-gcloud/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: setup-gcloud

runs:
using: "composite"
steps:
- name: Auth gcloud
uses: google-github-actions/auth@v2
with:
workload_identity_provider: 'projects/321830142373/locations/global/workloadIdentityPools/github/providers/expo'
project_id: exponentjs

- name: Setup gcloud
uses: google-github-actions/setup-gcloud@e427ad8a34f8676edf47cf7d7925499adf3eb74f # v2
with:
version: 548.0.0
project_id: exponentjs
110 changes: 110 additions & 0 deletions .github/workflows/build-and-deploy-worker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: build-and-deploy-worker
# If environment is empty we want to build (for testing)
# and upload (if on `main`, for later deployment).
# If environment is not empty, we want to build and upload (unless
# already uploaded) and deploy.

on:
workflow_dispatch:
inputs:
environment:
description: '"staging", "production" or empty'
type: string
required: true
workflow_call:
inputs:
environment:
description: '"staging", "production" or empty'
type: string
required: true

jobs:
setup:
runs-on: ubuntu-latest
if: inputs.environment != ''
outputs:
needs-to-build: ${{ steps.check_worker_exists.outputs.worker_exists == 'false' }}
permissions:
id-token: write
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- uses: ./.github/internal-actions/setup-gcloud

- name: Check if worker already exists
id: check_worker_exists
run: |
for platform in android ios; do
GCP_TARBALL="worker-$platform-sha1-$GITHUB_SHA.tar.gz"

if ! gsutil stat gs://eas-build-worker-tarballs/$GCP_TARBALL; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears this is the first time gs://eas-build-worker-tarballs has been publicly exposed.
I reviewed the bucket’s access policy and it looks safe.

Adding a note here as this does expand our attack surface.

echo "worker_exists=false" >> "$GITHUB_OUTPUT"
exit 0
fi
done

echo "worker_exists=true" >> "$GITHUB_OUTPUT"

build:
runs-on: ${{ matrix.runner.name }}
needs:
- setup
if: (!failure() && !cancelled() && inputs.environment == '') || needs.setup.outputs.needs-to-build == 'true'
permissions:
id-token: write
strategy:
matrix:
runner:
- name: ubuntu-latest
platform: android
- name: macos-latest
platform: ios
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- uses: volta-cli/action@5c175f92dea6f48441c436471e6479dbc192e194 # v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"

- name: Install coreutils (macOS only)
if: runner.os == 'macOS'
run: brew install coreutils

- name: Build worker tarball
working-directory: packages/worker
run: ./package.sh worker-${{ matrix.runner.platform }}.tar.gz ${{ matrix.runner.platform }}

- uses: ./.github/internal-actions/setup-gcloud

- name: Upload worker tarballs to GCP
if: github.ref == 'refs/heads/main' || inputs.environment != ''
working-directory: packages/worker
run: |
ARTIFACT_TARBALL="worker-${{ matrix.runner.platform }}.tar.gz"
GCP_TARBALL="worker-${{ matrix.runner.platform }}-sha1-$GITHUB_SHA.tar.gz"

gsutil cp $ARTIFACT_TARBALL gs://eas-build-worker-tarballs/$GCP_TARBALL

deploy:
runs-on: ubuntu-latest
needs:
- setup
- build
if: (!failure() && !cancelled() && inputs.environment != '')
permissions:
id-token: write
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- uses: ./.github/internal-actions/setup-gcloud

- name: Promote worker to ${{ inputs.environment }}
run: |
for platform in android ios; do
GCP_TARBALL="worker-$platform-sha1-$GITHUB_SHA.tar.gz"
WORKER_STAGING_TARBALL="worker-$platform-${{ inputs.environment }}.tar.gz"

gsutil cp gs://eas-build-worker-tarballs/$GCP_TARBALL gs://eas-build-worker-tarballs/$WORKER_STAGING_TARBALL
done
97 changes: 97 additions & 0 deletions .github/workflows/worker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: worker

on:
push:
branches: [main]
paths:
- 'packages/worker/**'
- .github/workflows/worker.yml
- .github/workflows/build-and-deploy-worker.yml
pull_request:
paths:
- 'packages/worker/**'
- .github/workflows/worker.yml
- .github/workflows/build-and-deploy-worker.yml

jobs:
worker-android-checks:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=3072'
JAVA_OPTS: '-Xms512m -Xmx2g'
GRADLE_OPTS: '-Xmx2g -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2g -XX:+HeapDumpOnOutOfMemoryError"'
permissions:
id-token: write
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- uses: ./.github/internal-actions/setup-gcloud

- uses: ./.github/internal-actions/direnv

- uses: volta-cli/action@5c175f92dea6f48441c436471e6479dbc192e194 # v4

- run: yarn install --frozen-lockfile --check-files

- name: Run integration tests
working-directory: packages/worker
run: direnv exec .direnv/test ./resources/ci-linux-integration-test.sh

worker-ios-checks:
runs-on: macos-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- uses: ./.github/internal-actions/setup-gcloud

- uses: ./.github/internal-actions/direnv

- uses: volta-cli/action@5c175f92dea6f48441c436471e6479dbc192e194 # v4

- run: yarn install --frozen-lockfile --check-files

- name: Run integration tests
working-directory: packages/worker
run: direnv exec .direnv/test ./resources/ci-macos-integration-test.sh

worker-build:
uses: ./.github/workflows/build-and-deploy-worker.yml
secrets: inherit
with:
environment: ''

deploy-worker-staging:
if: github.ref == 'refs/heads/main'
needs:
- worker-build
- worker-ios-checks
- worker-android-checks
uses: ./.github/workflows/build-and-deploy-worker.yml
secrets: inherit
with:
environment: staging

# deploy-worker-production:
# if: github.ref == 'refs/heads/main' && !failure() && !cancelled()
# needs:
# - deploy-worker-staging
# uses: ./.github/workflows/build-and-deploy-worker.yml
# secrets: inherit
# with:
# environment: production

# notify-slack:
# runs-on: expo-small
# needs:
# - deploy-worker-production
# if: github.ref == 'refs/heads/main' && always() && !cancelled()
# steps:
# - uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

# - name: Notify Slack
# uses: ./.github/actions/notify-slack-on-fail-or-recover
# with:
# channel: turtle-bots
# slack_token: ${{ secrets.SLACK_API_TOKEN }}
4 changes: 3 additions & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import type { Config } from 'jest';
import easCliConfig from './packages/eas-cli/jest.config';
// eslint-disable-next-line import/no-relative-packages
import easJsonConfig from './packages/eas-json/jest.config';
// eslint-disable-next-line import/no-relative-packages
import workerConfig from './packages/worker/jest.config.unit';

const config: Config = {
projects: [easCliConfig, easJsonConfig],
projects: [easCliConfig, easJsonConfig, workerConfig],
testPathIgnorePatterns: ['.*'],
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
collectCoverageFrom: ['<rootDir>/src/**/*.{ts,tsx,js,jsx}'],
Expand Down
2 changes: 1 addition & 1 deletion packages/eas-cli/src/utils/__tests__/image-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from 'path';

import { ImageNonPngError, ImageTransparencyError, ensurePNGIsNotTransparentAsync } from '../image';

const TEST_SERVER_PORT = 2137;
const TEST_SERVER_PORT = 9999;

const fixturesPath = path.join(__dirname, 'fixtures');
const transparentPngPath = path.join(fixturesPath, 'icon-alpha.png');
Expand Down
11 changes: 11 additions & 0 deletions packages/expo-cocoapods-proxy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/

# rspec failure tracking
.rspec_status
3 changes: 3 additions & 0 deletions packages/expo-cocoapods-proxy/.rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--format documentation
--color
--require spec_helper
8 changes: 8 additions & 0 deletions packages/expo-cocoapods-proxy/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Metrics/BlockLength:
Exclude:
- "spec/**/*"
Lint/AmbiguousBlockAssociation:
Exclude:
- "spec/**/*"
Metrics/MethodLength:
Max: 20
12 changes: 12 additions & 0 deletions packages/expo-cocoapods-proxy/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

source 'https://rubygems.org'

git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

# Specify your gem's dependencies in expo-cocoapods-proxy.gemspec
gemspec

gem 'rubocop', '~> 1.48', group: :development

gem 'cocoapods', '~> 1.12'
Loading
Loading