diff --git a/.github/workflows/buildandtest.yml b/.github/workflows/buildandtest.yml index fbd43ab0af..ad81491e2b 100644 --- a/.github/workflows/buildandtest.yml +++ b/.github/workflows/buildandtest.yml @@ -17,12 +17,12 @@ jobs: job_test: name: Test - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -36,12 +36,12 @@ jobs: job_lint: name: Lint - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -66,28 +66,49 @@ jobs: clang --version clang-format --version - - name: Install Swiftly + - name: Install Swiftly and Swift run: | - SWIFTLY_FILE="swiftly-$(uname -m).tar.gz" - curl -sL https://download.swift.org/swiftly/linux/swiftly-x86_64.tar.gz -o $SWIFTLY_FILE - tar zxf $SWIFTLY_FILE + # Install Swift dependencies first + sudo apt-get update + sudo apt-get -y install libcurl4-openssl-dev libz3-dev libncurses-dev libedit-dev libxml2-dev + + ARCH=$(uname -m) + SWIFTLY_FILE="swiftly-${ARCH}.tar.gz" + curl -sL "https://download.swift.org/swiftly/linux/swiftly-${ARCH}.tar.gz" -o "$SWIFTLY_FILE" + tar zxf "$SWIFTLY_FILE" ./swiftly init --quiet-shell-followup . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" hash -r - sudo apt-get -y install libcurl4-openssl-dev + + # Install Swift 6.0 (compatible with SwiftLint 0.63.2) + swiftly install 6.0 + swift --version + + # Export Swift toolchain path for SwiftLint's SourceKit + SWIFT_BIN=$(which swift) + SWIFT_TOOLCHAIN=$(dirname $(dirname "$SWIFT_BIN")) + SOURCEKIT_PATH=$(find "${SWIFT_TOOLCHAIN}" -name "libsourcekitdInProc.so" -print -quit 2>/dev/null) + if [ -n "$SOURCEKIT_PATH" ]; then + echo "LINUX_SOURCEKIT_LIB_PATH=$(dirname "$SOURCEKIT_PATH")" >> $GITHUB_ENV + else + echo "ERROR: libsourcekitdInProc.so not found under ${SWIFT_TOOLCHAIN}" + exit 1 + fi - name: Lint - run: yarn lint + run: | + . "${SWIFTLY_HOME_DIR:-$HOME/.local/share/swiftly}/env.sh" + yarn lint job_check_integrity: name: Check package integrity - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -106,12 +127,12 @@ jobs: job_build: name: Build - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -148,14 +169,14 @@ jobs: job_type_check: name: Type Check Typescript 3.8 - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [job_build, diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} env: YARN_ENABLE_IMMUTABLE_INSTALLS: false steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -181,12 +202,12 @@ jobs: run: yarn type-check job_circular_dep_check: name: Circular Dependency Check - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [job_build, diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -210,7 +231,7 @@ jobs: job_bundle: name: Bundle - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [job_test, job_build, diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} strategy: @@ -221,7 +242,7 @@ jobs: dev: [true, false] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index 9e8f8aa179..6d3bc6be6f 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -16,7 +16,7 @@ jobs: uses: ./.github/workflows/skip-ci.yml codegen: - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} strategy: @@ -36,7 +36,7 @@ jobs: --targetPlatform ios steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false diff --git a/.github/workflows/e2e-v2.yml b/.github/workflows/e2e-v2.yml index ad5dabeb29..8b9c6dd609 100644 --- a/.github/workflows/e2e-v2.yml +++ b/.github/workflows/e2e-v2.yml @@ -52,7 +52,7 @@ jobs: name: iOS appPlain: performance-tests/test-app-plain.ipa - platform: android - runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04", "runner_group_id:10"] + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] name: Android appPlain: performance-tests/TestAppPlain/android/app/build/outputs/apk/release/app-release.apk steps: @@ -205,7 +205,7 @@ jobs: rn-version: '0.84.0' runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"] - platform: android - runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04", "runner_group_id:10"] + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] exclude: # exclude JSC for new RN versions (keeping the matrix manageable) - rn-version: '0.84.0' @@ -332,9 +332,9 @@ jobs: include: - platform: ios rn-version: '0.84.0' - runs-on: macos-26 + runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"] - platform: android - runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04", "runner_group_id:10"] + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 diff --git a/.github/workflows/native-tests.yml b/.github/workflows/native-tests.yml index 29afab853c..60f1afd8c6 100644 --- a/.github/workflows/native-tests.yml +++ b/.github/workflows/native-tests.yml @@ -26,14 +26,14 @@ jobs: test-ios: name: ios - runs-on: macos-15 + runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"] needs: [diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - name: Enable Corepack - run: npm i -g corepack + run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -44,6 +44,16 @@ jobs: - name: Install SDK JS Dependencies run: yarn install + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3.0' + env: + # Disable rbenv to avoid .ruby-version conflicts + RBENV_VERSION: system + + - name: Install CocoaPods + run: gem install cocoapods + - name: Install App Pods working-directory: packages/core/RNSentryCocoaTester run: pod install @@ -56,6 +66,10 @@ jobs: env: SCHEME: RNSentryCocoaTester CONFIGURATION: Release + # Fix for Xcode 26+ with MetalToolchain: use default Xcode toolchain to avoid + # missing Swift compatibility libraries (swiftCompatibility56, etc.) + # See: https://github.com/actions/runner-images/issues/13135 + TOOLCHAINS: com.apple.dt.toolchain.XcodeDefault run: | # Find first available iPhone simulator from latest iOS runtime DEVICE_ID=$(xcrun simctl list devices available iPhone -j | jq -r ' @@ -83,7 +97,7 @@ jobs: test-android: name: android - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] needs: [diff_check] if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ad72b0347..4f8e04a7c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ permissions: jobs: release: - runs-on: ubuntu-latest + runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04", "runner_group_id:10"] name: Release a new version steps: - name: Get auth token @@ -33,7 +33,7 @@ jobs: token: ${{ steps.token.outputs.token }} fetch-depth: 0 - - run: npm i -g corepack + - run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: diff --git a/.github/workflows/sample-application-expo.yml b/.github/workflows/sample-application-expo.yml index a304dc7e33..5cbdf706a6 100644 --- a/.github/workflows/sample-application-expo.yml +++ b/.github/workflows/sample-application-expo.yml @@ -43,24 +43,25 @@ jobs: build-type: ['dev', 'production'] include: - platform: ios - runs-on: ["ghcr.io/cirruslabs/macos-sequoia-xcode:16.4", "runner_group_id:10"] + runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"] - platform: android - runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04", "runner_group_id:10"] + runs-on: ubuntu-latest - platform: web - runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04", "runner_group_id:10"] + runs-on: ubuntu-latest exclude: - platform: 'android' ios-use-frameworks: 'dynamic-frameworks' steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Enable Corepack (NPM) + if: ${{ matrix.platform != 'ios' }} + run: npm i -g corepack + - name: Enable Corepack + if: ${{ matrix.platform == 'ios' }} run: corepack enable - - name: Install Ninja - if: ${{ matrix.platform == 'android' }} - run: sudo apt-get update && sudo apt-get install -y ninja-build - - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -125,6 +126,11 @@ jobs: - name: Build iOS App if: ${{ matrix.platform == 'ios' }} working-directory: samples/expo/ios + env: + # Fix for Xcode 26+ with MetalToolchain: use default Xcode toolchain to avoid + # missing Swift compatibility libraries (swiftCompatibility56, etc.) + # See: https://github.com/actions/runner-images/issues/13135 + TOOLCHAINS: com.apple.dt.toolchain.XcodeDefault run: | [[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug' echo "Building $CONFIG" diff --git a/.github/workflows/sample-application.yml b/.github/workflows/sample-application.yml index 26c49289fb..9b64df36cf 100644 --- a/.github/workflows/sample-application.yml +++ b/.github/workflows/sample-application.yml @@ -52,11 +52,11 @@ jobs: build-type: ['dev', 'production'] include: - platform: ios - runs-on: ["ghcr.io/cirruslabs/macos-sequoia-xcode:16.4", "runner_group_id:10"] + runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"] - platform: macos runs-on: ["ghcr.io/cirruslabs/macos-sequoia-xcode:16.4", "runner_group_id:10"] - platform: android - runs-on: ["ghcr.io/cirruslabs/ubuntu-runner-amd64:22.04", "runner_group_id:10"] + runs-on: ubuntu-latest exclude: - platform: 'android' ios-use-frameworks: 'dynamic-frameworks' @@ -69,13 +69,14 @@ jobs: steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - name: Enable Corepack (NPM) + if: ${{ matrix.platform == 'android' }} + run: npm i -g corepack + - name: Enable Corepack + if: ${{ matrix.platform != 'android' }} run: corepack enable - - name: Install Ninja - if: ${{ matrix.platform == 'android' }} - run: sudo apt-get update && sudo apt-get install -y ninja-build - - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 with: package-manager-cache: false @@ -135,6 +136,11 @@ jobs: - name: Build iOS App if: ${{ matrix.platform == 'ios' }} working-directory: ${{ env.REACT_NATIVE_SAMPLE_PATH }} + env: + # Fix for Xcode 26+ with MetalToolchain: use default Xcode toolchain to avoid + # missing Swift compatibility libraries (swiftCompatibility56, etc.) + # See: https://github.com/actions/runner-images/issues/13135 + TOOLCHAINS: com.apple.dt.toolchain.XcodeDefault run: | [[ "${{ matrix.build-type }}" == "production" ]] && export CONFIG='Release' || export CONFIG='Debug' @@ -210,7 +216,7 @@ jobs: matrix: include: - platform: ios - runs-on: macos-15 + runs-on: ["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"] rn-architecture: 'new' ios-use-frameworks: 'no-frameworks' build-type: 'production' @@ -228,10 +234,6 @@ jobs: with: version: ${{env.MAESTRO_VERSION}} - - name: Install Ninja - if: ${{ matrix.platform == 'android' }} - run: sudo apt-get update && sudo apt-get install -y ninja-build - - name: Download iOS App Archive if: ${{ matrix.platform == 'ios' }} uses: actions/download-artifact@v7 @@ -258,7 +260,12 @@ jobs: unzip ${{ env.ANDROID_APP_ARCHIVE_PATH }} rm app-androidTest.apk + - name: Enable Corepack (NPM) + if: ${{ matrix.platform == 'android' }} + run: npm i -g corepack + - name: Enable Corepack + if: ${{ matrix.platform != 'android' }} run: corepack enable - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 diff --git a/.github/workflows/testflight.yml b/.github/workflows/testflight.yml index ac48600ec2..aacc915ef1 100644 --- a/.github/workflows/testflight.yml +++ b/.github/workflows/testflight.yml @@ -3,7 +3,7 @@ on: push: branches: - main - - alwx/ci/macos-tahoe-cl-runners + - alwx/experiment/cirrus-labs-for-everythin pull_request: paths: diff --git a/.swiftlint.yml b/.swiftlint.yml index efdb728bf9..67291fe397 100755 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -50,13 +50,13 @@ only_rules: - number_separator - opening_brace - operator_usage_whitespace - - operator_whitespace + - function_name_whitespace - overridden_super_call - private_outlet - private_unit_test - prohibited_super_call - redundant_nil_coalescing - - redundant_optional_initialization + - implicit_optional_initialization - redundant_string_enum_value - redundant_void_return - return_arrow_whitespace diff --git a/scripts/swiftlint.sh b/scripts/swiftlint.sh index bd0cb23f3f..cce2bc42d4 100755 --- a/scripts/swiftlint.sh +++ b/scripts/swiftlint.sh @@ -21,10 +21,10 @@ if [ -z "$SWIFT_PATH" ]; then exit 1 fi -LINUX_BIN="https://github.com/realm/SwiftLint/releases/download/0.61.0/swiftlint_linux_amd64.zip" -LINUX_SHA="sha256:02f4f580bbb27fb618dbfa24ce2f14c926461c85c26941289f58340151b63ae4" -DARWIN_BIN="https://github.com/realm/SwiftLint/releases/download/0.61.0/portable_swiftlint.zip" -DARWIN_SHA="sha256:2342f3784307a02117e18f745fcd350c6acc6cab0e521c0c0e01c32a53a3b274" +LINUX_BIN="https://github.com/realm/SwiftLint/releases/download/0.63.2/swiftlint_linux_amd64.zip" +LINUX_SHA="sha256:dd1017cfd20a1457f264590bcb5875a6ee06cd75b9a9d4f77cd43a552499143b" +DARWIN_BIN="https://github.com/realm/SwiftLint/releases/download/0.63.2/portable_swiftlint.zip" +DARWIN_SHA="sha256:c59a405c85f95b92ced677a500804e081596a4cae4a6a485af76065557d6ed29" if [[ "$OSTYPE" == "darwin"* ]]; then EXPECTED_SHA="$DARWIN_SHA"