[Gradle][Tests] Remove unnecessary arch -x86_64 usage for arm Mac
This commit is contained in:
committed by
Space Team
parent
f4d2283f87
commit
6d7e17e60c
+1
-20
@@ -1727,7 +1727,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
|||||||
runCommand(
|
runCommand(
|
||||||
this, "xcodebuild",
|
this, "xcodebuild",
|
||||||
"-sdk", "iphonesimulator",
|
"-sdk", "iphonesimulator",
|
||||||
"-arch", "x86_64",
|
|
||||||
"-configuration", "Release",
|
"-configuration", "Release",
|
||||||
"-workspace", "$name.xcworkspace",
|
"-workspace", "$name.xcworkspace",
|
||||||
"-scheme", name,
|
"-scheme", name,
|
||||||
@@ -1889,20 +1888,6 @@ class CocoaPodsIT : BaseGradleIT() {
|
|||||||
if (cocoapodsInstallationAllowed) {
|
if (cocoapodsInstallationAllowed) {
|
||||||
println("Installing CocoaPods...")
|
println("Installing CocoaPods...")
|
||||||
gem("install", "--install-dir", cocoapodsInstallationRoot.absolutePath, "cocoapods")
|
gem("install", "--install-dir", cocoapodsInstallationRoot.absolutePath, "cocoapods")
|
||||||
if (hostIsArmMac) {
|
|
||||||
// Force running CocoaPods via `arch -x86_64` on ARM MacOS to workaround problems with libffi.
|
|
||||||
// https://stackoverflow.com/questions/64901180/running-cocoapods-on-apple-silicon-m1
|
|
||||||
cocoapodsBinPath.mkdirs()
|
|
||||||
val wrapper = cocoapodsBinPath.resolve("pod")
|
|
||||||
wrapper.writeText(
|
|
||||||
"""
|
|
||||||
#!/bin/bash
|
|
||||||
arch -x86_64 "${cocoapodsInstallationRoot.absolutePath}/bin/pod" ${'$'}@
|
|
||||||
""".trimIndent()
|
|
||||||
)
|
|
||||||
wrapper.setExecutable(true)
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
fail(
|
fail(
|
||||||
"""
|
"""
|
||||||
@@ -1957,11 +1942,7 @@ class CocoaPodsIT : BaseGradleIT() {
|
|||||||
private fun gem(vararg args: String): String {
|
private fun gem(vararg args: String): String {
|
||||||
// On ARM MacOS, run gem using arch -x86_64 to workaround problems with libffi.
|
// On ARM MacOS, run gem using arch -x86_64 to workaround problems with libffi.
|
||||||
// https://stackoverflow.com/questions/64901180/running-cocoapods-on-apple-silicon-m1
|
// https://stackoverflow.com/questions/64901180/running-cocoapods-on-apple-silicon-m1
|
||||||
val command = if (hostIsArmMac) {
|
val command = listOf("gem", *args)
|
||||||
listOf("arch", "-x86_64", "gem", *args)
|
|
||||||
} else {
|
|
||||||
listOf("gem", *args)
|
|
||||||
}
|
|
||||||
println("Run command: ${command.joinToString(separator = " ")}")
|
println("Run command: ${command.joinToString(separator = " ")}")
|
||||||
val result = runProcess(command, File("."), options = BuildOptions(forceOutputToStdout = true))
|
val result = runProcess(command, File("."), options = BuildOptions(forceOutputToStdout = true))
|
||||||
check(result.isSuccessful) {
|
check(result.isSuccessful) {
|
||||||
|
|||||||
Reference in New Issue
Block a user