-
-
Notifications
You must be signed in to change notification settings - Fork 7
Self hosted runners config #91
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
base: e2e-env-actions
Are you sure you want to change the base?
Changes from 1 commit
dde6d53
8f5b198
a1f7d18
2ead7cb
5b810c9
060107e
d378d7d
59141c3
727c028
b3b5adf
ef89e45
f5f175e
724c5f4
bcf27ba
75cfa50
617b798
5da1540
d13e55e
95fbc50
d15d786
d354252
03eade1
486f5d1
914cbff
c35da38
5a428da
4364187
93a7c6e
1c024c7
9a1f3b3
b622c5f
c526726
b39d2cf
3447281
a345f7c
b532e7f
4f03564
ed3592d
51c3ae9
4eec245
e95f53d
6ac80cb
394f14c
ddac3ee
450b8ec
fbaeb7a
432e82a
6090afa
5906de6
fb91d27
cd05aec
8144a84
9e5ee8b
2f1cdf9
197371d
1d567b7
f1d2c36
4880f7b
722d146
b891d84
d5a5606
0580b8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,132 @@ runs: | |
| - run: echo "Setup E2E Environment started" | ||
| shell: bash | ||
|
|
||
| ## Android Setup (early for fail-fast) ## | ||
|
|
||
| # Set Android environment variables (self-hosted runner has SDK pre-installed) | ||
| - name: Set Android environment variables | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| echo "ANDROID_HOME=/opt/android-sdk" >> "$GITHUB_ENV" | ||
| echo "ANDROID_SDK_ROOT=/opt/android-sdk" >> "$GITHUB_ENV" | ||
| shell: bash | ||
|
|
||
| - name: Configure Android Signing Certificates | ||
| if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} | ||
| uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions | ||
| with: | ||
| aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} | ||
| aws-region: 'us-east-2' | ||
| platform: 'android' | ||
| environment: ${{ inputs.environment }} | ||
|
|
||
| ## JDK Setup | ||
| - name: Setup Java | ||
| if: ${{ inputs.platform == 'android' }} | ||
| uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 | ||
| with: | ||
| java-version: ${{ inputs.jdk-version }} | ||
| distribution: ${{ inputs.jdk-distribution }} | ||
|
|
||
| - name: Install required emulator dependencies | ||
| if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| libpulse0 \ | ||
| libglu1-mesa \ | ||
| libnss3 \ | ||
| libxss1 | ||
|
|
||
| echo "✅ Linux dependencies installed successfully" | ||
| shell: bash | ||
|
|
||
| ## Android SDK Setup | ||
|
|
||
| - name: Install Android SDK packages | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| echo "Accepting SDK licenses..." | ||
| printf 'y\n%.0s' {1..10} | "/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager" --licenses | ||
|
|
||
| echo "Installing Android SDK components..." | ||
| "/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager" --install \ | ||
| "platform-tools" \ | ||
| "platforms;android-${{ inputs.android-api-level }}" \ | ||
| "build-tools;34.0.0" \ | ||
| "emulator" \ | ||
| "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" | ||
|
|
||
| echo "Updating SDK packages..." | ||
| "/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager" --update | ||
|
|
||
| echo "✅ Android SDK packages installed successfully" | ||
| shell: bash | ||
|
|
||
| ## NDK Setup | ||
|
|
||
| - name: Debug Android SDK Paths | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| echo "ANDROID_HOME: $ANDROID_HOME" | ||
| echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" | ||
| shell: bash | ||
|
|
||
| - name: Install Android NDK | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| "/opt/android-sdk/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" | ||
| shell: bash | ||
|
|
||
| - name: Add Android tools to PATH | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| echo "/opt/android-sdk/platform-tools" >> "$GITHUB_PATH" | ||
| echo "/opt/android-sdk/emulator" >> "$GITHUB_PATH" | ||
| echo "/opt/android-sdk/cmdline-tools/latest/bin" >> "$GITHUB_PATH" | ||
| shell: bash | ||
|
|
||
| - name: Add NDK related toolchains to PATH | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| NDK_TOOLCHAIN="/opt/android-sdk/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" | ||
| echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" | ||
| echo "/opt/android-sdk/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" | ||
| shell: bash | ||
|
|
||
| ## Launch AVD | ||
|
|
||
| - name: Set ANDROID_AVD_HOME for downstream steps | ||
| if: ${{ inputs.platform == 'android'}} | ||
| shell: bash | ||
| run: | | ||
| echo "ANDROID_AVD_HOME=$HOME/.android/avd" >> "$GITHUB_ENV" | ||
| mkdir -p "$HOME/.android/avd" | ||
|
|
||
| - name: Create Android Virtual Device (AVD) | ||
| if: ${{ inputs.platform == 'android'}} | ||
| run: | | ||
| IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" | ||
| echo "Creating AVD with image: $IMAGE" | ||
| echo "no" | "/opt/android-sdk/cmdline-tools/latest/bin/avdmanager" create avd \ | ||
| --name "${{ inputs.android-avd-name }}" \ | ||
| --package "$IMAGE" \ | ||
| --device "${{ inputs.android-device }}" | ||
| shell: bash | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Android SDK Path Issues in CIThe
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Android Setup Bugs: KVM Permissions Removed, Environment Variables IgnoredThe Android setup in
Locations (1) |
||
| ## iOS Platform Setup ## | ||
|
|
||
| - name: Configure iOS Signing Certificates | ||
| if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} | ||
| uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions | ||
| with: | ||
| aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} | ||
| aws-region: 'us-east-2' | ||
| platform: 'ios' | ||
| environment: ${{ inputs.environment }} | ||
|
|
||
| ## Node.js & JavaScript Dependencies Setup ## | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
|
|
@@ -135,14 +261,6 @@ runs: | |
| "$FOUNDRY_BIN/foundryup" | ||
|
|
||
| ## IOS Setup ## | ||
| - name: Configure iOS Signing Certificates | ||
| if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} | ||
| uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions | ||
| with: | ||
| aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} | ||
| aws-region: 'us-east-2' | ||
| platform: 'ios' | ||
| environment: ${{ inputs.environment }} | ||
|
|
||
| ## Ruby Setup & Cache Management | ||
| - name: Setup Ruby | ||
|
|
@@ -213,108 +331,3 @@ runs: | |
| if: ${{ inputs.platform == 'ios' }} | ||
| run: xcrun simctl list devices | ||
| shell: bash | ||
|
|
||
| ## Android Setup ## | ||
|
|
||
| ## JDK Setup | ||
| - name: Setup Java | ||
| if: ${{ inputs.platform == 'android' }} | ||
| uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 | ||
| with: | ||
| java-version: ${{ inputs.jdk-version }} | ||
| distribution: ${{ inputs.jdk-distribution }} | ||
|
|
||
| - name: Configure Android Signing Certificates | ||
| if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} | ||
| uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions | ||
| with: | ||
| aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} | ||
| aws-region: 'us-east-2' | ||
| platform: 'android' | ||
| environment: ${{ inputs.environment }} | ||
|
|
||
| ## Android SDK Setup | ||
|
|
||
| - name: Install required emulator dependencies | ||
| if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y \ | ||
| libpulse0 \ | ||
| libglu1-mesa \ | ||
| libnss3 \ | ||
| libxss1 | ||
|
|
||
| echo "✅ Linux dependencies installed successfully" | ||
| shell: bash | ||
|
|
||
| - name: Install Android SDK packages | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| echo "Accepting SDK licenses..." | ||
| printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses | ||
|
|
||
| echo "Installing Android SDK components..." | ||
| "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install \ | ||
| "platform-tools" \ | ||
| "platforms;android-${{ inputs.android-api-level }}" \ | ||
| "build-tools;34.0.0" \ | ||
| "emulator" \ | ||
| "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" \ | ||
|
|
||
| echo "Updating SDK packages..." | ||
| "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update | ||
|
|
||
| echo "✅ Android SDK packages installed successfully" | ||
| shell: bash | ||
|
|
||
| ## NDK Setup | ||
|
|
||
| - name: Debug Android SDK Paths | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| echo "ANDROID_HOME: $ANDROID_HOME" | ||
| echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" | ||
| shell: bash | ||
|
|
||
| - name: Install Android NDK | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" | ||
| shell: bash | ||
|
|
||
| - name: Add Android tools to PATH | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| echo "$ANDROID_HOME/platform-tools" >> "$GITHUB_PATH" | ||
| echo "$ANDROID_HOME/emulator" >> "$GITHUB_PATH" | ||
| echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" | ||
| shell: bash | ||
|
|
||
| - name: Add NDK related toolchains to PATH | ||
| if: ${{ inputs.platform == 'android' }} | ||
| run: | | ||
| NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" | ||
| echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" | ||
| echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" | ||
| shell: bash | ||
|
|
||
| ## Launch AVD | ||
|
|
||
| - name: Set ANDROID_AVD_HOME for downstream steps | ||
| if: ${{ inputs.platform == 'android'}} | ||
| shell: bash | ||
| run: | | ||
| echo "ANDROID_AVD_HOME=$HOME/.android/avd" >> "$GITHUB_ENV" | ||
| mkdir -p "$HOME/.android/avd" | ||
|
|
||
| - name: Create Android Virtual Device (AVD) | ||
| if: ${{ inputs.platform == 'android'}} | ||
| run: | | ||
| IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" | ||
| echo "Creating AVD with image: $IMAGE" | ||
| echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ | ||
| --name "${{ inputs.android-avd-name }}" \ | ||
| --package "$IMAGE" \ | ||
| --device "${{ inputs.android-device }}" | ||
| shell: bash | ||
Uh oh!
There was an error while loading. Please reload this page.