mirror of
https://github.com/selfxyz/self.git
synced 2026-01-09 14:48:06 -05:00
chore: Using Namespace.so for MacOS Runners (#1500)
* chore: update CI workflows to include Java setup and modify runner environments
- Added Java installation checks and setup steps to multiple CI workflows to ensure Java is available for builds.
- Changed runner environments for iOS builds from `macos-latest-large` to `namespace-profile-apple-silicon-6cpu` for better resource management.
- Updated push triggers for CI workflows to include specific branches and paths for more controlled execution.
* refactor: streamline AES-GCM encryption tag validation in encryptAES256GCM function
- Removed redundant checks for the AES-GCM authentication tag, simplifying the code while maintaining functionality.
- Updated the return structure to directly convert the authentication tag to a binary format, enhancing clarity and efficiency.
* chore: add Actionlint configuration for custom runner labels
* chore: update mobile deployment workflows for testing configuration
* chore: included a step to set the INSTALL_JAVA environment variable to false
* chore: update logging in setup-native-source script for improved debugging
* chore: simplify mobile CI workflow by removing redundant iOS and Android build steps
- Removed extensive iOS and Android build steps from the mobile CI workflow, as build verification is now handled by the mobile-e2e.yml workflow.
* chore: update mobile workflows to remove push triggers for improved clarity
- Removed push triggers from mobile CI, E2E, and bundle analysis workflows to streamline execution and focus on pull request events.
- This change enhances workflow clarity and reduces unnecessary runs on branch pushes.
* Revert "chore: simplify mobile CI workflow by removing redundant iOS and Android build steps"
This reverts commit 30d5f585c2.
* Updated the conditions for running iOS and Android build jobs to only trigger on workflow dispatch events, reducing unnecessary executions.
* chore: enhance mobile CI workflows with push triggers for improved execution control
- Added push triggers for dev, staging, and main branches in mobile bundle analysis, E2E, and demo E2E workflows to ensure builds are triggered on relevant changes.
- Included conditions for running iOS E2E tests based on issue comments, allowing for more flexible testing workflows.
* Addind workflow_dispatch option
* chore: refine mobile E2E workflows by removing issue comment triggers
- Eliminated issue comment event triggers from mobile E2E workflows to streamline execution and focus on workflow dispatch and push events.
- This change enhances clarity and reduces unnecessary complexity in the CI process.
* chore: remove checkout action from npm publish workflow
- Eliminated the checkout action from the npm publish workflow to streamline the process and reduce unnecessary steps.
- This change aims to enhance the efficiency of the CI pipeline.
This commit is contained in:
10
.github/actionlint.yaml
vendored
Normal file
10
.github/actionlint.yaml
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Actionlint configuration to register custom runner labels
|
||||
# This prevents actionlint warnings about unrecognized runner labels
|
||||
|
||||
# Custom runner labels used in this repository
|
||||
labels:
|
||||
# Namespace-managed Apple Silicon runners
|
||||
- namespace-profile-apple-silicon-6cpu
|
||||
|
||||
# High-memory runners for circuit compilation
|
||||
- "128ram"
|
||||
35
.github/workflows/mobile-bundle-analysis.yml
vendored
35
.github/workflows/mobile-bundle-analysis.yml
vendored
@@ -8,7 +8,21 @@ env:
|
||||
NODE_ENV: "production"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- staging
|
||||
- main
|
||||
paths:
|
||||
- "app/**"
|
||||
- "packages/mobile-sdk-alpha/**"
|
||||
- ".github/workflows/mobile-bundle-analysis.yml"
|
||||
- ".github/actions/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
- staging
|
||||
- main
|
||||
paths:
|
||||
- "app/**"
|
||||
- "packages/mobile-sdk-alpha/**"
|
||||
@@ -18,7 +32,7 @@ on:
|
||||
|
||||
jobs:
|
||||
analyze-android:
|
||||
runs-on: macos-latest-large
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Read and sanitize Node.js version
|
||||
@@ -83,7 +97,9 @@ jobs:
|
||||
working-directory: ./app
|
||||
|
||||
analyze-ios:
|
||||
runs-on: macos-latest-large
|
||||
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
|
||||
# runs-on: macos-latest-large
|
||||
runs-on: namespace-profile-apple-silicon-6cpu
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Read and sanitize Node.js version
|
||||
@@ -122,6 +138,21 @@ jobs:
|
||||
with:
|
||||
path: app/ios/Pods
|
||||
lockfile: app/ios/Podfile.lock
|
||||
- name: Check Java installation
|
||||
run: |
|
||||
echo "INSTALL_JAVA=false" >> "$GITHUB_ENV"
|
||||
if command -v java &> /dev/null && java -version &> /dev/null; then
|
||||
echo "Java already installed: $(java -version 2>&1 | head -n 1)"
|
||||
else
|
||||
echo "Java not found or not working, will install..."
|
||||
echo "INSTALL_JAVA=true" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- name: Setup Java environment
|
||||
if: env.INSTALL_JAVA == 'true'
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
- name: Generate token for self repositories
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
|
||||
uses: ./.github/actions/generate-github-token
|
||||
|
||||
43
.github/workflows/mobile-ci.yml
vendored
43
.github/workflows/mobile-ci.yml
vendored
@@ -203,7 +203,10 @@ jobs:
|
||||
yarn test:ci
|
||||
working-directory: ./app
|
||||
build-ios:
|
||||
runs-on: macos-latest-large
|
||||
# This is mostly covered in mobile-e2e.yml so we don't need to run it here frequently
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
# runs-on: macos-latest-large
|
||||
runs-on: namespace-profile-apple-silicon-6cpu
|
||||
needs: build-deps
|
||||
timeout-minutes: 60
|
||||
env:
|
||||
@@ -251,6 +254,21 @@ jobs:
|
||||
echo "Xcode path:"
|
||||
xcode-select -p
|
||||
|
||||
- name: Check Java installation
|
||||
run: |
|
||||
echo "INSTALL_JAVA=false" >> "$GITHUB_ENV"
|
||||
if command -v java &> /dev/null && java -version &> /dev/null; then
|
||||
echo "Java already installed: $(java -version 2>&1 | head -n 1)"
|
||||
else
|
||||
echo "Java not found or not working, will install..."
|
||||
echo "INSTALL_JAVA=true" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- name: Setup Java environment
|
||||
if: env.INSTALL_JAVA == 'true'
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
@@ -267,8 +285,7 @@ jobs:
|
||||
- name: Cache Ruby gems
|
||||
uses: ./.github/actions/cache-bundler
|
||||
with:
|
||||
# TODO(jcortejoso): Confirm the path of the bundle cache
|
||||
path: app/ios/vendor/bundle
|
||||
path: app/vendor/bundle
|
||||
lock-file: app/Gemfile.lock
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-${{ env.GH_GEMS_CACHE_VERSION }}-ruby${{ env.RUBY_VERSION }}
|
||||
- name: Cache Pods
|
||||
@@ -297,6 +314,14 @@ jobs:
|
||||
key: ${{ runner.os }}-xcode-index-${{ env.XCODE_VERSION }}-${{ hashFiles('app/ios/Podfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-xcode-index-${{ env.XCODE_VERSION }}-
|
||||
- name: Generate token for self repositories
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
|
||||
uses: ./.github/actions/generate-github-token
|
||||
id: github-token
|
||||
with:
|
||||
app-id: ${{ vars.GH_WORKFLOWS_CROSS_ACCESS_ID }}
|
||||
private-key: ${{ secrets.GH_WORKFLOWS_CROSS_ACCESS_KEY }}
|
||||
configure-netrc: "true"
|
||||
- name: Install Mobile Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Cache Built Dependencies
|
||||
@@ -306,6 +331,8 @@ jobs:
|
||||
cache-version: ${{ env.GH_CACHE_VERSION }}-${{ env.NODE_VERSION_SANITIZED }}
|
||||
- name: Build dependencies (cache miss)
|
||||
# if: steps.built-deps.outputs.cache-hit != 'true'
|
||||
env:
|
||||
SELFXYZ_APP_TOKEN: ${{ steps.github-token.outputs.token || '' }}
|
||||
run: |
|
||||
echo "Cache miss for built dependencies. Building now..."
|
||||
yarn workspace @selfxyz/mobile-app run build:deps
|
||||
@@ -315,14 +342,6 @@ jobs:
|
||||
bundle config set --local path 'vendor/bundle'
|
||||
bundle install --jobs 4 --retry 3
|
||||
working-directory: ./app
|
||||
- name: Generate token for self repositories
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
|
||||
uses: ./.github/actions/generate-github-token
|
||||
id: github-token
|
||||
with:
|
||||
app-id: ${{ vars.GH_WORKFLOWS_CROSS_ACCESS_ID }}
|
||||
private-key: ${{ secrets.GH_WORKFLOWS_CROSS_ACCESS_KEY }}
|
||||
configure-netrc: "true"
|
||||
- name: Install iOS Dependencies
|
||||
uses: nick-fields/retry@v3
|
||||
with:
|
||||
@@ -405,6 +424,8 @@ jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-deps
|
||||
# This is mostly covered in mobile-e2e.yml so we don't need to run it here frequently
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
timeout-minutes: 60
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
18
.github/workflows/mobile-deploy.yml
vendored
18
.github/workflows/mobile-deploy.yml
vendored
@@ -265,7 +265,8 @@ jobs:
|
||||
|
||||
build-ios:
|
||||
needs: [bump-version]
|
||||
runs-on: macos-latest-large
|
||||
# runs-on: macos-latest-large
|
||||
runs-on: namespace-profile-apple-silicon-6cpu
|
||||
permissions:
|
||||
contents: read
|
||||
actions: write
|
||||
@@ -430,6 +431,21 @@ jobs:
|
||||
fi
|
||||
|
||||
echo "✅ Lock files exist"
|
||||
- name: Check Java installation
|
||||
run: |
|
||||
echo "INSTALL_JAVA=false" >> "$GITHUB_ENV"
|
||||
if command -v java &> /dev/null && java -version &> /dev/null; then
|
||||
echo "Java already installed: $(java -version 2>&1 | head -n 1)"
|
||||
else
|
||||
echo "Java not found or not working, will install..."
|
||||
echo "INSTALL_JAVA=true" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- name: Setup Java environment
|
||||
if: env.INSTALL_JAVA == 'true'
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
- name: Generate token for self repositories
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
|
||||
uses: ./.github/actions/generate-github-token
|
||||
|
||||
28
.github/workflows/mobile-e2e.yml
vendored
28
.github/workflows/mobile-e2e.yml
vendored
@@ -17,6 +17,15 @@ env:
|
||||
MAESTRO_VERSION: 1.41.0
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- staging
|
||||
- main
|
||||
paths:
|
||||
- "app/**"
|
||||
- "packages/mobile-sdk-alpha/**"
|
||||
- ".github/workflows/mobile-e2e.yml"
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
@@ -26,6 +35,7 @@ on:
|
||||
- "app/**"
|
||||
- "packages/mobile-sdk-alpha/**"
|
||||
- ".github/workflows/mobile-e2e.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
android-build-test:
|
||||
@@ -229,7 +239,8 @@ jobs:
|
||||
|
||||
e2e-ios:
|
||||
timeout-minutes: 120
|
||||
runs-on: macos-latest-large
|
||||
# runs-on: macos-latest-large
|
||||
runs-on: namespace-profile-apple-silicon-6cpu
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-ios-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
@@ -273,6 +284,21 @@ jobs:
|
||||
- name: Toggle Yarn hardened mode for trusted PRs
|
||||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }}
|
||||
run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV
|
||||
- name: Check Java installation
|
||||
run: |
|
||||
echo "INSTALL_JAVA=false" >> "$GITHUB_ENV"
|
||||
if command -v java &> /dev/null && java -version &> /dev/null; then
|
||||
echo "Java already installed: $(java -version 2>&1 | head -n 1)"
|
||||
else
|
||||
echo "Java not found or not working, will install..."
|
||||
echo "INSTALL_JAVA=true" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- name: Setup Java environment
|
||||
if: env.INSTALL_JAVA == 'true'
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
- name: Generate token for self repositories
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
|
||||
uses: ./.github/actions/generate-github-token
|
||||
|
||||
31
.github/workflows/mobile-sdk-demo-e2e.yml
vendored
31
.github/workflows/mobile-sdk-demo-e2e.yml
vendored
@@ -19,6 +19,15 @@ env:
|
||||
E2E_TESTING: 1
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- staging
|
||||
- main
|
||||
paths:
|
||||
- "packages/mobile-sdk-demo/**"
|
||||
- "packages/mobile-sdk-alpha/**"
|
||||
- ".github/workflows/mobile-sdk-demo-e2e.yml"
|
||||
pull_request:
|
||||
branches:
|
||||
- dev
|
||||
@@ -28,6 +37,7 @@ on:
|
||||
- "packages/mobile-sdk-demo/**"
|
||||
- "packages/mobile-sdk-alpha/**"
|
||||
- ".github/workflows/mobile-sdk-demo-e2e.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
android-e2e:
|
||||
@@ -202,7 +212,11 @@ jobs:
|
||||
|
||||
ios-e2e:
|
||||
timeout-minutes: 60
|
||||
runs-on: macos-latest-large
|
||||
# runs-on: macos-latest-large
|
||||
runs-on: namespace-profile-apple-silicon-6cpu
|
||||
if: |
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
github.event_name == 'push'
|
||||
name: iOS E2E Tests Demo App
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-ios-${{ github.ref }}
|
||||
@@ -244,6 +258,21 @@ jobs:
|
||||
- name: Toggle Yarn hardened mode for trusted PRs
|
||||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }}
|
||||
run: echo "YARN_ENABLE_HARDENED_MODE=0" >> $GITHUB_ENV
|
||||
- name: Check Java installation
|
||||
run: |
|
||||
echo "INSTALL_JAVA=false" >> "$GITHUB_ENV"
|
||||
if command -v java &> /dev/null && java -version &> /dev/null; then
|
||||
echo "Java already installed: $(java -version 2>&1 | head -n 1)"
|
||||
else
|
||||
echo "Java not found or not working, will install..."
|
||||
echo "INSTALL_JAVA=true" >> "$GITHUB_ENV"
|
||||
fi
|
||||
- name: Setup Java environment
|
||||
if: env.INSTALL_JAVA == 'true'
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "temurin"
|
||||
java-version: ${{ env.JAVA_VERSION }}
|
||||
- name: Generate token for self repositories
|
||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
|
||||
uses: ./.github/actions/generate-github-token
|
||||
|
||||
1
.github/workflows/npm-publish.yml
vendored
1
.github/workflows/npm-publish.yml
vendored
@@ -161,7 +161,6 @@ jobs:
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Dependencies
|
||||
uses: ./.github/actions/yarn-install
|
||||
- name: Build package
|
||||
|
||||
Reference in New Issue
Block a user