mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
Move xcresultparser to the Tools to avoid long recompilation times through brew
This commit is contained in:
+10
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"originHash" : "ec77bc40677bd20f99d813dea09781e534f4cb4539fb504b27d997b95f98d6d0",
|
||||
"originHash" : "eb16f7bcd7ef32b27433d7e2ee4cd129ad3c29e854c62696900658127333c78e",
|
||||
"pins" : [
|
||||
{
|
||||
"identity" : "pkl-swift",
|
||||
@@ -64,6 +64,15 @@
|
||||
"version" : "1.6.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "xcresultparser",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/a7ex/xcresultparser",
|
||||
"state" : {
|
||||
"revision" : "95ca65d0bd56250ccd16331f5b0480a1a2c0c5e9",
|
||||
"version" : "2.2.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "yams",
|
||||
"kind" : "remoteSourceControl",
|
||||
|
||||
+4
-2
@@ -10,7 +10,8 @@ var dependencies: [Package.Dependency] = [
|
||||
// .package(path: "../../../swift-command-line-tools"),
|
||||
.package(url: "https://github.com/swiftlang/swift-subprocess", .upToNextMinor(from: "0.3.0")),
|
||||
.package(url: "https://github.com/jpsim/Yams", .upToNextMinor(from: "6.2.2")),
|
||||
.package(url: "https://github.com/apple/swift-log", .upToNextMinor(from: "1.10.1"))
|
||||
.package(url: "https://github.com/apple/swift-log", .upToNextMinor(from: "1.10.1")),
|
||||
.package(url: "https://github.com/a7ex/xcresultparser", .upToNextMinor(from: "2.2.0"))
|
||||
]
|
||||
|
||||
if FileManager.default.fileExists(atPath: "Enterprise/Pipeline/Package.swift") {
|
||||
@@ -33,7 +34,8 @@ let package = Package(
|
||||
.product(name: "CommandLineTools", package: "swift-command-line-tools"),
|
||||
.product(name: "Subprocess", package: "swift-subprocess"),
|
||||
.product(name: "Yams", package: "Yams"),
|
||||
.product(name: "Logging", package: "swift-log")
|
||||
.product(name: "Logging", package: "swift-log"),
|
||||
.product(name: "XcresultparserLib", package: "xcresultparser")
|
||||
],
|
||||
path: "Tools/Sources",
|
||||
swiftSettings: [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ArgumentParser
|
||||
import Foundation
|
||||
import Subprocess
|
||||
import XcresultparserLib
|
||||
import Yams
|
||||
|
||||
struct CI: ParsableCommand {
|
||||
@@ -75,7 +76,11 @@ struct CI: ParsableCommand {
|
||||
}
|
||||
|
||||
do {
|
||||
try await run(.path("/bin/zsh"), ["-cu", "xcresultparser -q -o cobertura -t \(target) -p \(projectPath) \(resultBundlePath) > \(outputPath)"])
|
||||
let converter = try CoberturaCoverageConverter(with: URL(filePath: resultBundlePath),
|
||||
projectRoot: projectPath,
|
||||
coverageTargets: [target],
|
||||
strictPathnames: false)
|
||||
try converter.xmlString(quiet: true).write(toFile: outputPath, atomically: true, encoding: .utf8)
|
||||
logger.info("\n📊 Coverage report: \(outputPath)\n")
|
||||
} catch {
|
||||
logger.error("\n❌ Failed to collect coverage for \(resultBundle): \(error.localizedDescription)\n")
|
||||
@@ -95,7 +100,8 @@ struct CI: ParsableCommand {
|
||||
}
|
||||
|
||||
do {
|
||||
try await run(.path("/bin/zsh"), ["-cu", "xcresultparser -q -o junit -p \(projectPath) \(resultBundlePath) > \(outputPath)"])
|
||||
let junitXML = try JunitXML(with: URL(filePath: resultBundlePath), projectRoot: projectPath)
|
||||
try junitXML.xmlString.write(toFile: outputPath, atomically: true, encoding: .utf8)
|
||||
logger.info("📋 Test results: \(outputPath)")
|
||||
} catch {
|
||||
logger.error("\n❌ Failed to collect test results for \(resultBundle): \(error.localizedDescription)\n")
|
||||
|
||||
@@ -15,7 +15,7 @@ setup_github_actions_environment() {
|
||||
unset HOMEBREW_NO_INSTALL_FROM_API
|
||||
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
|
||||
|
||||
brew update && brew install xcodegen swiftlint swiftformat git-lfs pkl a7ex/homebrew-formulae/xcresultparser
|
||||
brew update && brew install xcodegen swiftlint swiftformat git-lfs pkl
|
||||
}
|
||||
|
||||
setup_github_actions_translations_environment() {
|
||||
@@ -30,7 +30,7 @@ setup_github_actions_translations_environment() {
|
||||
}
|
||||
|
||||
xcode_select_for_github_actions() {
|
||||
# We need to select it globally for other processes like xcresultparser and our custom tools to use the same Xcode version.
|
||||
# We need to select it globally for our custom tools to use the same Xcode version.
|
||||
sudo xcode-select -s /Applications/Xcode_26.5.0.app
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user