这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 15 additions & 4 deletions .github/workflows/wda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,19 @@ jobs:

strategy:
matrix:
# '' is for iOS
target: ['', '_tvOS']
arch: [x86_64, arm64]
include:
- target: ''
arch: x86_64
simulator_name: Debug-iphonesimulator
- target: ''
arch: arm64
simulator_name: Debug-iphonesimulator
- target: '_tvOS'
arch: x86_64
simulator_name: Debug-appletvsimulator
- target: '_tvOS'
arch: arm64
simulator_name: Debug-appletvsimulator
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -89,10 +99,11 @@ jobs:
run: |
DESTINATION=$DESTINATION_SIM${{ matrix.target }} sh $GITHUB_WORKSPACE/Scripts/ci/build-sim.sh
env:
TARGET: ${{ matrix.target }}
SCHEME: WebDriverAgentRunner${{ matrix.target }}
ARCHS: ${{ matrix.arch }}
ZIP_PKG_NAME: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip"
DERIVED_DATA_PATH: wda_build
WD: wda_build/Build/Products/${{ matrix.simulator_name }}
- name: Upload the built generic app package for WebDriverAgentRunner${{ matrix.target }} with ${{ matrix.arch }}
uses: actions/upload-artifact@master
with:
Expand Down
30 changes: 11 additions & 19 deletions Scripts/ci/build-real.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
#!/bin/bash

# To run build script for CI

xcodebuild clean build-for-testing \
-project WebDriverAgent.xcodeproj \
-derivedDataPath $DERIVED_DATA_PATH \
-scheme $SCHEME \
-destination "$DESTINATION" \
CODE_SIGNING_ALLOWED=NO ARCHS=arm64

# Only .app is needed.

pushd $WD

# to remove test packages to refer to the device local instead of embedded ones
# XCTAutomationSupport.framework, XCTest.framewor, XCTestCore.framework,
# XCUIAutomation.framework, XCUnit.framework
rm -rf $SCHEME-Runner.app/Frameworks/XC*.framework

# Xcode 16 started generating 5.9MB of 'Testing.framework', but it might not be necessary for WDA
rm -rf $SCHEME-Runner.app/Frameworks/Testing.framework

# This library is used for Swift testing. WDA doesn't include Swift stuff, thus this is not needed.
# Xcode 16 generates a 2.6 MB file size. Xcode 15 was a 1 MB file size.
rm -rf $SCHEME-Runner.app/Frameworks/libXCTestSwiftSupport.dylib



zip -r $ZIP_PKG_NAME $SCHEME-Runner.app
# The reason why here excludes several frameworks are:
# - to remove test packages to refer to the device local instead of embedded ones
# XCTAutomationSupport.framework, XCTest.framewor, XCTestCore.framework,
# XCUIAutomation.framework, XCUnit.framework.
# This can be excluded only for real devices.
# - Xcode 16 started generating 5.9MB of 'Testing.framework', but it might not be necessary for WDA.
# - libXCTestSwiftSupport is used for Swift testing. WDA doesn't include Swift stuff, thus this is not needed.
zip -r $ZIP_PKG_NAME $SCHEME-Runner.app \
-x "$SCHEME-Runner.app/Frameworks/XC*.framework*" \
"$SCHEME-Runner.app/Frameworks/Testing.framework*" \
"$SCHEME-Runner.app/Frameworks/libXCTestSwiftSupport.dylib"
popd
mv $WD/$ZIP_PKG_NAME ./
18 changes: 9 additions & 9 deletions Scripts/ci/build-sim.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#!/bin/bash

# To run build script for CI

xcodebuild clean build-for-testing \
-project WebDriverAgent.xcodeproj \
-derivedDataPath wda_build \
-derivedDataPath $DERIVED_DATA_PATH \
-scheme $SCHEME \
-destination "$DESTINATION" \
CODE_SIGNING_ALLOWED=NO ARCHS=$ARCHS

# simulator needs to build entire build files
pushd $WD

pushd wda_build
# to remove unnecessary space consuming files
rm -rf Build/Intermediates.noindex
zip -r $ZIP_PKG_NAME Build
# The reason why here excludes several frameworks are:
# - Xcode 16 started generating 5.9MB of 'Testing.framework', but it might not be necessary for WDA.
# - libXCTestSwiftSupport is used for Swift testing. WDA doesn't include Swift stuff, thus this is not needed.
zip -r $ZIP_PKG_NAME $SCHEME-Runner.app \
-x "$SCHEME-Runner.app/Frameworks/Testing.framework*" \
"$SCHEME-Runner.app/Frameworks/libXCTestSwiftSupport.dylib"
popd
mv wda_build/$ZIP_PKG_NAME ./
mv $WD/$ZIP_PKG_NAME ./