Skip to content

Commit

Permalink
xclogparser 0.2.40
Browse files Browse the repository at this point in the history
xclogparser: add version patch and linuxbrew zlib patch

Signed-off-by: Rui Chen <[email protected]>

xclogparser: update test

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
BrewTestBot authored and chenrui333 committed Dec 17, 2024
1 parent 08b6625 commit 1b49137
Showing 1 changed file with 58 additions and 5 deletions.
63 changes: 58 additions & 5 deletions Formula/x/xclogparser.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
class Xclogparser < Formula
desc "Tool to parse the SLF serialization format used by Xcode"
homepage "https://github.com/MobileNativeFoundation/XCLogParser"
url "https://github.com/MobileNativeFoundation/XCLogParser/archive/refs/tags/v0.2.39.tar.gz"
sha256 "b225891b94bbdb549ddbc9ffe838ad87f73ef7cc79934e3e23969bb1220eafd9"
url "https://github.com/MobileNativeFoundation/XCLogParser/archive/refs/tags/v0.2.40.tar.gz"
sha256 "b8bd40342ab3918c00ccc174e929a05de2a3cd196dff9ae3ef3dc8a21e0413b7"
license "Apache-2.0"

bottle do
Expand All @@ -18,13 +18,33 @@ class Xclogparser < Formula
depends_on xcode: "13.0"

uses_from_macos "swift"
uses_from_macos "zlib"

# version patch, upstream pr ref, https://github.com/MobileNativeFoundation/XCLogParser/pull/223
patch do
url "https://github.com/MobileNativeFoundation/XCLogParser/commit/430107e1e6ec9d54ddaa301d64596c7311f7c966.patch?full_index=1"
sha256 "5a4613af2ead387887e508032673d4fbb9afbf66fd919e9b16cf42b5b453218d"
end

# patch to use linuxbrew zlib, upstream pr ref, https://github.com/1024jp/GzipSwift/pull/71
patch :DATA

def install

Check failure on line 32 in Formula/x/xclogparser.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Ventura (13) on Apple Silicon!

warning: /Users/brew/Library/org.swift.swiftpm/configuration is not accessible or not writable, disabling user-level cache features. warning: /Users/brew/Library/org.swift.swiftpm/security is not accessible or not writable, disabling user-level cache features. Fetching https://github.com/1024jp/GzipSwift [1/1549] Fetching gzipswift Fetched https://github.com/1024jp/GzipSwift (0.49s) error: package 'gzipswift' @ 29f62534648e6334678b6d7b14c6f7e618715944 is using Swift tools version 6.0.0 but the installed version is 5.9.0 in https://github.com/1024jp/GzipSwift ==> Formula Path: /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/x/xclogparser.rb ==> Configuration HOMEBREW_VERSION: 4.4.12-10-g39a40e9 ORIGIN: https://github.com/Homebrew/brew HEAD: 39a40e9873b42ab886ab6cd59a05d20b58019e01 Last commit: 6 hours ago Branch: master Core tap HEAD: d7a863d210fc9d7ce4cca584a664cd3206ec3c80 Core tap last commit: 6 minutes ago Core tap JSON: 17 Dec 17:45 UTC Core cask tap JSON: 17 Dec 17:45 UTC HOMEBREW_PREFIX: /opt/homebrew HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_LOGS: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs HOMEBREW_MAKE_JOBS: 4 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_NO_INSTALL_FROM_API: set HOMEBREW_SORBET_RUNTIME: set HOMEBREW_VERIFY_ATTESTATIONS: set Homebrew Ruby: 3.3.6 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby CPU: quad-core 64-bit dunno Clang: 15.0.0 build 1500 Git: 2.39.3 => /usr/bin/git Curl: 8.7.1 => /usr/bin/curl macOS: 13.7-arm64 CLT: 15.1.0.0.1.1700200546 Xcode: 15.2 Rosetta 2: false ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j4 CMAKE_PREFIX_PATH: /opt/homebrew CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13 HOMEBREW_MAKE_JOBS: 4 HOMEBREW_GIT: /usr/bin/git HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk PATH: /opt/homebrew/Library/Homebrew/shims/mac/super:/usr/bin:/bin:/usr/sbin:/sbin Logs: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs/xclogparser/00.options.out /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs/xclogparser/01.swift READ THIS: https://docs.brew.sh/Troubleshooting ::error::xclogparser 0.2.40 did not build

Check failure on line 32 in Formula/x/xclogparser.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

`brew install --verbose --formula --build-bottle xclogparser` failed on macOS Ventura (13)!

warning: /Users/brew/Library/org.swift.swiftpm/configuration is not accessible or not writable, disabling user-level cache features. warning: /Users/brew/Library/org.swift.swiftpm/security is not accessible or not writable, disabling user-level cache features. Fetching https://github.com/1024jp/GzipSwift [1/1549] Fetching gzipswift Fetched https://github.com/1024jp/GzipSwift (0.67s) error: package 'gzipswift' @ 29f62534648e6334678b6d7b14c6f7e618715944 is using Swift tools version 6.0.0 but the installed version is 5.9.0 in https://github.com/1024jp/GzipSwift ==> Formula Path: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/x/xclogparser.rb ==> Configuration HOMEBREW_VERSION: 4.4.12-10-g39a40e9 ORIGIN: https://github.com/Homebrew/brew HEAD: 39a40e9873b42ab886ab6cd59a05d20b58019e01 Last commit: 6 hours ago Branch: master Core tap HEAD: d7a863d210fc9d7ce4cca584a664cd3206ec3c80 Core tap last commit: 9 minutes ago Core tap JSON: 17 Dec 17:47 UTC Core cask tap JSON: 17 Dec 17:47 UTC HOMEBREW_PREFIX: /usr/local HOMEBREW_BOOTSNAP: set HOMEBREW_CACHE: /Users/brew/Library/Caches/Homebrew HOMEBREW_CASK_OPTS: [] HOMEBREW_COLOR: set HOMEBREW_CURL_PATH: /usr/bin/curl HOMEBREW_FAIL_LOG_LINES: 150 HOMEBREW_GITHUB_API_TOKEN: set HOMEBREW_GIT_EMAIL: [email protected] HOMEBREW_GIT_NAME: BrewTestBot HOMEBREW_GIT_PATH: /usr/bin/git HOMEBREW_LOGS: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs HOMEBREW_MAKE_JOBS: 6 HOMEBREW_NO_AUTO_UPDATE: set HOMEBREW_NO_EMOJI: set HOMEBREW_NO_ENV_HINTS: set HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set HOMEBREW_NO_INSTALL_FROM_API: set HOMEBREW_SORBET_RUNTIME: set HOMEBREW_VERIFY_ATTESTATIONS: set Homebrew Ruby: 3.3.6 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/3.3.6/bin/ruby CPU: hexa-core 64-bit penryn Clang: 15.0.0 build 1500 Git: 2.39.3 => /usr/bin/git Curl: 8.7.1 => /usr/bin/curl macOS: 13.7-x86_64 CLT: 15.1.0.0.1.1700200546 Xcode: 15.2 ==> ENV HOMEBREW_CC: clang HOMEBREW_CXX: clang++ MAKEFLAGS: -j6 CMAKE_PREFIX_PATH: /usr/local CMAKE_INCLUDE_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers CMAKE_LIBRARY_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/13 HOMEBREW_MAKE_JOBS: 6 HOMEBREW_GIT: /usr/bin/git HOMEBREW_SDKROOT: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.sdk PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/bin:/bin:/usr/sbin:/sbin Logs: /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs/xclogparser/00.options.out /Users/brew/actions-runner/_work/homebrew-core/homebrew-core/bottles/logs/xclogparser/01.swift READ THIS: https://docs.brew.sh/Troubleshooting ::error::xclogparser 0.2.40 did not build
system "swift", "build", "-c", "release", "--disable-sandbox"
args = if OS.mac?
["--disable-sandbox"]
else
["--static-swift-stdlib"]
end
system "swift", "build", *args, "--configuration", "release"
bin.install ".build/release/xclogparser"
end

test do
assert_match version.to_s, shell_output("#{bin}/xclogparser version")

# skip tests for linux build and sequoia macos build due to the test file issue
return if OS.linux? || (OS.mac? && MacOS.version == :sequoia)

resource "homebrew-test_log" do
url "https://github.com/chenrui333/github-action-test/releases/download/2024.04.14/test.xcactivitylog"
sha256 "3ac25e3160e867cc2f4bdeb06043ff951d8f54418d877a9dd7ad858c09cfa017"
Expand All @@ -33,7 +53,40 @@ def install
resource("homebrew-test_log").stage(testpath)
output = shell_output("#{bin}/xclogparser dump --file #{testpath}/test.xcactivitylog")
assert_match "Target 'helloworldTests' in project 'helloworld'", output

assert_match version.to_s, shell_output("#{bin}/xclogparser version")
end
end

__END__
diff --git a/Package.resolved b/Package.resolved
index 900fb44..cc4b2bc 100644
--- a/Package.resolved
+++ b/Package.resolved
@@ -11,12 +11,12 @@
}
},
{
- "package": "Gzip",
+ "package": "GzipSwift",
"repositoryURL": "https://github.com/1024jp/GzipSwift",
"state": {
"branch": null,
- "revision": "ba0b6cb51cc6202f896e469b87d2889a46b10d1b",
- "version": "5.1.1"
+ "revision": "29f62534648e6334678b6d7b14c6f7e618715944",
+ "version": null
}
},
{
diff --git a/Package.swift b/Package.swift
index 98f46e7..068b3db 100644
--- a/Package.swift
+++ b/Package.swift
@@ -11,7 +11,7 @@ let package = Package(
.library(name: "XCLogParser", targets: ["XCLogParser"])
],
dependencies: [
- .package(url: "https://github.com/1024jp/GzipSwift", from: "5.1.0"),
+ .package(url: "https://github.com/1024jp/GzipSwift", revision: "29f62534648e6334678b6d7b14c6f7e618715944"),
.package(url: "https://github.com/krzyzanowskim/CryptoSwift.git", .exact("1.3.3")),
.package(url: "https://github.com/kylef/PathKit.git", from: "1.0.1"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.0"),

0 comments on commit 1b49137

Please sign in to comment.