From 4fd54cc42700e1448193a27ffb11c6cdf50cd520 Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Thu, 26 Sep 2024 08:10:53 +0200 Subject: [PATCH] Don't build SPM dependencies for UI tests --- .github/workflows/sync_end_to_end.yml | 9 +++++++++ .github/workflows/ui_tests.yml | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/workflows/sync_end_to_end.yml b/.github/workflows/sync_end_to_end.yml index d55dc24c8c..f78917cebb 100644 --- a/.github/workflows/sync_end_to_end.yml +++ b/.github/workflows/sync_end_to_end.yml @@ -102,6 +102,15 @@ jobs: with: debug: true + # This first bit is a hack to stop the app building package dependencies that isn't needed by the test runner + # Otherwise xcodebuild will attempt building BSK and linking GRDB framework that is incompatible with Xcode 15 + - name: Build test runner + run: | + rm -rf LocalPackages + rm -rf /Users/runner/work/macos-browser/macos-browser/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved + sed -i '' '/\/\* Begin XCSwiftPackageProductDependency section \*\//,/\/\* End XCSwiftPackageProductDependency section \*\//d' DuckDuckGo.xcodeproj/project.pbxproj + sed -i '' '/\/\* Begin XCRemoteSwiftPackageReference section \*\//,/\/\* End XCRemoteSwiftPackageReference section \*\//d' DuckDuckGo.xcodeproj/project.pbxproj + - name: Build Sync e2e tests run: | set -o pipefail && xcodebuild build-for-testing \ diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 1de4d8bd77..3d08c59987 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -104,6 +104,15 @@ jobs: echo "${{ matrix.xcode-version }}" > .xcode-version sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer + # This first bit is a hack to stop the app building package dependencies that isn't needed by the test runner + # Otherwise xcodebuild will attempt building BSK and linking GRDB framework that is incompatible with Xcode 15 + - name: Build test runner + run: | + rm -rf LocalPackages + rm -rf /Users/runner/work/macos-browser/macos-browser/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved + sed -i '' '/\/\* Begin XCSwiftPackageProductDependency section \*\//,/\/\* End XCSwiftPackageProductDependency section \*\//d' DuckDuckGo.xcodeproj/project.pbxproj + sed -i '' '/\/\* Begin XCRemoteSwiftPackageReference section \*\//,/\/\* End XCRemoteSwiftPackageReference section \*\//d' DuckDuckGo.xcodeproj/project.pbxproj + - name: Build for testing run: | set -o pipefail && xcodebuild build-for-testing \