Compare commits

...

18 Commits

Author SHA1 Message Date
Bartosz Polaczyk 75bac3293a Merge pull request #227 from CharlieSuP1/master
prebuild should run artifactsOrganizer.prepare(artifact:) method even  if artifacts exists locally
2024-07-09 19:43:02 -07:00
Bartosz Polaczyk 8c89e88716 Merge pull request #234 from BalestraPatrick/patch-1
Remove references to Spotify FOSS Slack
2024-07-09 19:42:11 -07:00
Bartosz Polaczyk 0f97aa120f Merge pull request #238 from Coder-Star/bug/action
fix: archive build, the ACTION value is install
2024-07-09 19:41:39 -07:00
CoderStar 9f5c455ea6 fix: archive build, the ACTION value is install 2024-07-09 14:53:53 +08:00
Bartosz Polaczyk 86e64d3eab Merge pull request #239 from polac24/bump-xcode-143
Bump CI to Xcode 14.3.1/macOS14
2024-07-03 07:19:45 -07:00
Bartosz Polaczyk 832e0ffeb0 Install nginx on CI 2024-07-02 23:23:16 -07:00
Bartosz Polaczyk 4db65a9bc5 Bump macOS to 14 2024-07-02 23:05:18 -07:00
Bartosz Polaczyk 34e8c0b911 Update release.yaml 2024-07-02 22:57:14 -07:00
Bartosz Polaczyk acd866c242 Update docs.yaml 2024-07-02 22:57:02 -07:00
Bartosz Polaczyk 2e6729ecaa Bump ci.yaml 2024-07-02 22:56:22 -07:00
Patrick Balestra a05fa9cab5 Remove references to Spotify FOSS Slack
The FOSS Slack is being shut down. We will continue use GitHub issues, discussions, etc. for receiving feedback and bug reports.
2024-01-10 13:28:41 +01:00
Bartosz Polaczyk 487a58aba0 Merge pull request #230 from grigorye/bug/shell-hangup-due-to-unread-pipe
Fixed task hang up in shellInternal due to unread error pipe.
2023-11-22 09:22:27 -08:00
Grigory Entin 62ace6a24f Fixed errorData generation.
Co-authored-by: Bartosz Polaczyk <polac24@gmail.com>
2023-11-21 09:54:22 +01:00
Grigory Entin 0290557197 Fixed task hang up in shellInternal due to unread error pipe. 2023-11-20 15:42:12 +01:00
supeng.charlie 68b1f76cd4 prebuild should run artifactsOrganizer.prepare(artifact:) method even if artifacts exists locally 2023-09-19 17:55:44 +08:00
Bartosz Polaczyk 64472d58bf Merge pull request #225 from polac24/fix-spaces-libtool
Support spaces in libtools paths
2023-08-17 08:54:47 +02:00
Bartosz Polaczyk 3d96dddc91 Fix linting 2023-08-16 14:23:13 +02:00
Bartosz Polaczyk deb6adcb70 Support spaces in libtools paths 2023-08-16 13:13:14 +02:00
10 changed files with 27 additions and 13 deletions
+4 -2
View File
@@ -13,14 +13,16 @@ jobs:
args: --strict
macOS:
runs-on: macos-12
runs-on: macos-14
env:
XCODE_VERSION: ${{ '14.2' }}
XCODE_VERSION: ${{ '14.3.1' }}
steps:
- name: Select Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app"
- name: Checkout
uses: actions/checkout@v1
- name: Install nginx
run: brew install nginx
- name: Build and Run
run: rake build[release]
- name: Test
+2 -2
View File
@@ -7,9 +7,9 @@ on:
jobs:
docs:
runs-on: macos-12
runs-on: macos-14
env:
XCODE_VERSION: ${{ '14.2' }}
XCODE_VERSION: ${{ '14.3.1' }}
steps:
- uses: actions/checkout@v2
- name: Select Xcode
+2 -2
View File
@@ -6,9 +6,9 @@ on:
jobs:
macOS:
name: Add macOS binaries to release
runs-on: macos-12
runs-on: macos-14
env:
XCODE_VERSION: ${{ '14.2' }}
XCODE_VERSION: ${{ '14.3.1' }}
steps:
- name: Select Xcode
run: "sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app"
-3
View File
@@ -7,7 +7,6 @@ _XCRemoteCache is a remote cache tool for Xcode projects. It reuses target artif
[![Build Status](https://github.com/spotify/XCRemoteCache/workflows/CI/badge.svg)](https://github.com/spotify/XCRemoteCache/workflows/CI/badge.svg)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![Slack](https://slackin.spotify.com/badge.svg)](https://slackin.spotify.com)
[![Docs](https://github.com/spotify/XCRemoteCache/workflows/Docs/badge.svg)](https://spotify.github.io/XCRemoteCache/documentation/xcremotecache/)
- [How and Why?](#how-and-why)
@@ -499,8 +498,6 @@ The zip package will be generated at `releases/XCRemoteCache.zip`.
Create a [new issue](https://github.com/spotify/XCRemoteCache/issues/new) with as many details as possible.
Reach us at the `#xcremotecache` channel in [Slack](https://slackin.spotify.com/).
## Contributing
We feel that a welcoming community is important and we ask that you follow Spotify's
@@ -91,6 +91,7 @@ class Prebuild {
switch artifactPreparationResult {
case .artifactExists(let artifactDir):
infoLog("Artifact exists locally at \(artifactDir)")
_ = try artifactsOrganizer.prepare(artifact: artifactDir)
try artifactsOrganizer.activate(extractedArtifact: artifactDir)
case .preparedForArtifact(let artifactPackage):
infoLog("Downloading artifact to \(artifactPackage)")
+2 -2
View File
@@ -84,13 +84,13 @@ private func shellInternal(_ cmd: String, args: [String] = [], stdout: PipeLike?
task.currentDirectoryPath = dir
}
task.launch()
let errorData = (stderr != nil) ? nil : errorHandle.fileHandleForReading.readDataToEndOfFile()
task.waitUntilExit()
if task.terminationStatus != 0 {
if stderr != nil {
guard let errorData = errorData else {
// Error stream was captured so cannot inspect its content
throw ShellError.statusError("Failed command", task.terminationStatus)
}
let errorData = errorHandle.fileHandleForReading.readDataToEndOfFile()
let errorString = String(data: errorData, encoding: .utf8)?.trim() ?? "No error returned from the process."
throw ShellError.statusError(
"status \(task.terminationStatus): \(errorString)", task.terminationStatus
@@ -37,7 +37,7 @@ class ActionSpecificCacheHitLogger: CacheHitLogger {
case .index:
hitCounter = .indexingTargetHitCount
missCounter = .indexingTargetMissCount
case .build:
case .build, .archive:
hitCounter = .targetCacheHit
missCounter = .targetCacheMiss
case .unknown:
@@ -25,6 +25,8 @@ enum BuildActionType: String, Codable {
case build
/// An extra build, exclusive for indexing (Introduced in Xcode 13)
case index = "indexbuild"
/// Archive build
case archive = "install"
/// Unknown type, probably incompatible Xcode version used
case unknown
}
@@ -47,7 +47,8 @@ public class XCLibtoolHelper {
case "-dependency_info":
dependencyInfo = args[i + 1]
i += 1
case let input where args[i].starts(with: "/") && ["", "a"].contains(URL(string: args[i])?.pathExtension):
case let input where input.starts(with: "/") &&
["", "a"].contains(URL(fileURLWithPath: input).pathExtension):
// Assume always absolute paths to the library
// Support for static frameworks (no extension) and static libraries (.a)
inputLibraries.append(input)
@@ -74,4 +74,15 @@ class XCLibtoolHelperTests: XCTestCase {
inputs: ["/arch1/static", "/arch2/static"]
))
}
func testRecognizesPathsWithSpaces() throws {
let mode = try XCLibtoolHelper.buildMode(
args: ["-static", "-o", "/universal/static", "/arch/with space/static"]
)
XCTAssertEqual(mode, .createUniversalBinary(
output: "/universal/static",
inputs: ["/arch/with space/static"]
))
}
}