Compare commits

...

9 Commits

Author SHA1 Message Date
Bartosz Polaczyk 41829e769f Merge pull request #12 from spotify/20211116-cocoapods-artifact
Download XCRemoteCache binary from GitHub for CocoaPods
2021-11-16 08:49:27 +01:00
Bartosz Polaczyk e3261d9bb1 Download XCRemoteCache binary from GitHub 2021-11-16 08:12:03 +01:00
Bartosz Polaczyk b6318e9785 Merge pull request #11 from polac24/add-logo
Add logo and TOC
2021-11-14 19:24:49 +01:00
Bartosz Polaczyk 5a77ab1766 Add TOC 2021-11-14 15:50:28 +01:00
Bartosz Polaczyk faec67a2ff Add logo image 2021-11-14 15:37:54 +01:00
Bartosz Polaczyk 3e309f2b64 Merge pull request #6 from spotify/readme-spm-limitation
Document releasing process and add SPM limitation
2021-10-22 09:47:47 +02:00
Bartosz Polaczyk 88f4d30735 Be explicit about tag formatting
Co-authored-by: Vadim Smal <kenshin312@gmail.com>
2021-10-20 14:31:21 +02:00
Bartosz Polaczyk 4fbb063094 Update release package creation snippet 2021-10-18 07:52:30 +02:00
Bartosz Polaczyk d25b4e0e06 Document releasing process and add SPM limitations 2021-10-15 14:23:54 +02:00
3 changed files with 58 additions and 7 deletions
+51 -4
View File
@@ -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._
[![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)
- [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
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB