Compare commits
9 Commits
v0.3.0-rc2
...
v0.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 41829e769f | |||
| e3261d9bb1 | |||
| b6318e9785 | |||
| 5a77ab1766 | |||
| faec67a2ff | |||
| 3e309f2b64 | |||
| 88f4d30735 | |||
| 4fbb063094 | |||
| d25b4e0e06 |
@@ -1,10 +1,51 @@
|
||||
# XCRemoteCache
|
||||
<p align="center">
|
||||
<img src="docs/img/logo.png" width="75%">
|
||||
</p>
|
||||
|
||||
XCRemoteCache is a remote cache tool for Xcode projects. It reuses target artifacts generated on a remote machine, served from a simple REST server.
|
||||
_XCRemoteCache is a remote cache tool for Xcode projects. It reuses target artifacts generated on a remote machine, served from a simple REST server._
|
||||
|
||||
[](https://github.com/spotify/XCRemoteCache/workflows/CI/badge.svg)
|
||||
[](LICENSE)
|
||||
|
||||
- [How and Why?](#how-and-why-)
|
||||
* [Accurate target input files](#accurate-target-input-files)
|
||||
+ [New file added to the target](#new-file-added-to-the-target)
|
||||
* [Debug symbols](#debug-symbols)
|
||||
* [Performance optimizations](#performance-optimizations)
|
||||
* [Focused targets](#focused-targets)
|
||||
- [How to integrate XCRemoteCache with your Xcode project?](#how-to-integrate-xcremotecache-with-your-xcode-project)
|
||||
* [1. Download XCRemoteCache](#1-download-xcremotecache)
|
||||
* [A. Automatic integration](#a-automatic-integration)
|
||||
+ [2. Create a minimal XCRemoteCache configuration](#2-create-a-minimal-xcremotecache-configuration)
|
||||
+ [3. Run automatic integration script](#3-run-automatic-integration-script)
|
||||
- [3a. Producer side](#3a-producer-side)
|
||||
- [3b. Consumer side](#3b-consumer-side)
|
||||
* [A full list of `xcprepare integrate` supported options](#a-full-list-of-xcprepare-integrate-supported-options)
|
||||
* [B. Manual integration](#b-manual-integration)
|
||||
+ [2. Configure XCRemoteCache](#2-configure-xcremotecache)
|
||||
+ [3. Call xcprepare](#3-call-xcprepare)
|
||||
+ [4. Integrate with the Xcode project](#4-integrate-with-the-xcode-project)
|
||||
+ [5. Configure LLDB source-map (Optional)](#5-configure-lldb-source-map-optional)
|
||||
+ [6. Producer mode - Artifacts generation](#6-producer-mode---artifacts-generation)
|
||||
- [6a. Configure producer mode](#6a-configure-producer-mode)
|
||||
- [6b. Fill the cache](#6b-fill-the-cache)
|
||||
- [6c. Mark commit sha](#6c-mark-commit-sha)
|
||||
- [A full list of configuration parameters:](#a-full-list-of-configuration-parameters)
|
||||
- [Backend cache server](#backend-cache-server)
|
||||
* [Sample REST cache server from a docker image](#sample-rest-cache-server-from-a-docker-image)
|
||||
* [Amazon S3 and Google Cloud Storage](#amazon-s3-and-google-cloud-storage)
|
||||
- [CocoaPods plugin](#cocoapods-plugin)
|
||||
- [Requirements](#requirements)
|
||||
- [Limitations](#limitations)
|
||||
- [FAQ](#faq)
|
||||
- [Development](#development)
|
||||
- [Release](#release)
|
||||
* [Building release package](#building-release-package)
|
||||
- [Contributing](#contributing)
|
||||
- [Code of conduct](#code-of-conduct)
|
||||
- [License](#license)
|
||||
- [Security Issues?](#security-issues)
|
||||
|
||||
## How and Why?
|
||||
|
||||
The caching mechanism is based on remote artifacts that should be generated and uploaded to the cache server for each commit on a `master` branch, preferably as a part of CI/CD step. Xcode products are not portable between different Xcode versions, each XCRemoteCache artifact is linked with a specific Xcode build number that generated it. To support multiple Xcode versions, artifacts generation should happen for each Xcode version.
|
||||
@@ -330,6 +371,7 @@ Head over to our [cocoapods-plugin](cocoapods-plugin/README.md) docs to see how
|
||||
|
||||
## Limitations
|
||||
|
||||
* Swift Package Manager (SPM) projects are not supported
|
||||
* Filenames with `_vers.c` suffix are reserved and cannot be used as a source file
|
||||
* All compilation files should be referenced via the git repo root. Referencing `/AbsolutePath/someOther.swift` or `../../someOther.swift` that resolve to the location outside of the git repo root is prohibited.
|
||||
|
||||
@@ -343,10 +385,15 @@ Follow the [Development](docs/Development.md) guide. It has all the information
|
||||
|
||||
## Release
|
||||
|
||||
To build a release zip package, call:
|
||||
To release a version, in [Releases](https://github.com/spotify/XCRemoteCache/releases) draft a new release with `v0.3.0{-rc0}` tag format.
|
||||
Packages with binaries will be automatically uploaded to the GitHub [Releases](https://github.com/spotify/XCRemoteCache/releases) page.
|
||||
|
||||
### Building release package
|
||||
|
||||
To build a release zip package for a single platform (e.g. `x86_64-apple-macosx`, `arm64-apple-macosx`), call:
|
||||
|
||||
```shell
|
||||
CONFIG=Release rake build
|
||||
rake 'build[release, x86_64-apple-macosx]'
|
||||
```
|
||||
|
||||
The zip package will be generated at `releases/XCRemoteCache.zip`.
|
||||
|
||||
@@ -26,6 +26,7 @@ module CocoapodsXCRemoteCacheModifier
|
||||
FAKE_SRCROOT = "/#{'x' * 10 }"
|
||||
LLDB_INIT_COMMENT="#RemoteCacheCustomSourceMap"
|
||||
LLDB_INIT_PATH = "#{ENV['HOME']}/.lldbinit"
|
||||
FAT_ARCHIVE_NAME_INFIX = 'arm64-x86_64'
|
||||
|
||||
CUSTOM_CONFIGURATION_KEYS = [
|
||||
'enabled',
|
||||
@@ -196,15 +197,18 @@ module CocoapodsXCRemoteCacheModifier
|
||||
release_url = 'https://api.github.com/repos/spotify/XCRemoteCache/releases/latest'
|
||||
asset_url = nil
|
||||
|
||||
open(release_url, :http_basic_authentication => credentials) do |f|
|
||||
asset_url = JSON.parse(f.read)['assets'][0]['url']
|
||||
URI.open(release_url) do |f|
|
||||
assets_array = JSON.parse(f.read)['assets']
|
||||
# Pick fat archive
|
||||
asset_array = assets_array.detect{|arr| arr['name'].include?(FAT_ARCHIVE_NAME_INFIX)}
|
||||
asset_url = asset_array['url']
|
||||
end
|
||||
|
||||
if asset_url.nil?
|
||||
throw "Downloading XCRemoteCache failed"
|
||||
end
|
||||
|
||||
open(asset_url, :http_basic_authentication => credentials, "accept" => 'application/octet-stream') do |f|
|
||||
URI.open(asset_url, "accept" => 'application/octet-stream') do |f|
|
||||
File.open(local_package_location, "wb") do |file|
|
||||
file.puts f.read
|
||||
end
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
Reference in New Issue
Block a user