Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Integration with XcodeGen #392

Merged
merged 14 commits into from
Jun 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Build

on:
workflow_dispatch:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

env:
platform: ${{ 'iOS Simulator' }}

jobs:
spm:
name: SPM integration
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: brew install xcodegen
- name: Generate project
run: make spm
- name: Build
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild build -scheme R2TestApp -destination "platform=$platform,name=$device"

spm_lcp:
name: SPM integration (LCP)
runs-on: macos-latest
environment: LCP
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: brew install xcodegen
- name: Generate project
run: make spm lcp=${{ secrets.LCP_URL_CARTHAGE }}
- name: Build
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild build -scheme R2TestApp -destination "platform=$platform,name=$device"

# Carthage is failing before Big Sur.
# carthage:
# name: Carthage integration
# runs-on: macos-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Install dependencies
# run: brew install xcodegen
# - name: Generate project
# run: make carthage
# - name: Build
# run: |
# device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
# xcodebuild build -scheme R2TestApp -destination "platform=$platform,name=$device"

cocoapods:
name: CocoaPods integration
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: brew install xcodegen
- name: Generate project
run: make cocoapods
- name: Build
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild build -workspace R2TestApp.xcworkspace -scheme R2TestApp -destination "platform=$platform,name=$device"

cocoapods_lcp:
name: CocoaPods integration (LCP)
runs-on: macos-latest
environment: LCP
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: brew install xcodegen
- name: Generate project
run: make cocoapods lcp=${{ secrets.LCP_URL_COCOAPODS }}
- name: Build
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild build -workspace R2TestApp.xcworkspace -scheme R2TestApp -destination "platform=$platform,name=$device"

dev:
name: Submodules integration
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: brew install xcodegen
- name: Generate project
run: make dev
- name: Build
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild build -scheme R2TestApp -destination "platform=$platform,name=$device"

dev_lcp:
name: Submodules integration (LCP)
runs-on: macos-latest
environment: LCP
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: brew install xcodegen
- name: Generate project
run: make dev lcp=${{ secrets.LCP_URL_CARTHAGE }}
- name: Build
run: |
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}'`
xcodebuild build -scheme R2TestApp -destination "platform=$platform,name=$device"
39 changes: 12 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ DerivedData/
!default.perspectivev3
xcuserdata/

# Xcode projects are generated with https://github.com/yonaskolb/XcodeGen
*.xcodeproj
*.xcworkspace

## Other
*.moved-aside
*.xccheckout
Expand All @@ -39,30 +43,11 @@ playground.xcworkspace
# Package.pins
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
Carthage
/Carthage/Build
/Carthage
/Cartfile
/Podfile
/Pods
/project.yml
/Cartfile.resolved
/Podfile.lock
15 changes: 15 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[submodule "Packages/r2-shared-swift"]
path = Integrations/Submodules/r2-shared-swift
url = https://github.com/readium/r2-shared-swift.git
[submodule "Packages/r2-streamer-swift"]
path = Integrations/Submodules/r2-streamer-swift
url = https://github.com/readium/r2-streamer-swift.git
[submodule "Packages/r2-navigator-swift"]
path = Integrations/Submodules/r2-navigator-swift
url = https://github.com/readium/r2-navigator-swift.git
[submodule "Packages/r2-lcp-swift"]
path = Integrations/Submodules/r2-lcp-swift
url = https://github.com/readium/r2-lcp-swift.git
[submodule "Packages/r2-opds-swift"]
path = Integrations/Submodules/r2-opds-swift
url = https://github.com/readium/r2-opds-swift.git
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions Cartfile

This file was deleted.

14 changes: 0 additions & 14 deletions Cartfile.resolved

This file was deleted.

11 changes: 11 additions & 0 deletions Integrations/Carthage/Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Third-party dependencies used in the Test App itself.
github "onevcat/Kingfisher" ~> 5.15.8
github "jdg/MBProgressHUD" ~> 1.2.0
github "stephencelis/SQLite.swift" ~> 0.12.2
github "scinfu/SwiftSoup" ~> 2.3.2

# Readium 2 dependencies
github "readium/r2-shared-swift" ~> 2.0.0
github "readium/r2-streamer-swift" ~> 2.0.0
github "readium/r2-navigator-swift" ~> 2.0.0
github "readium/r2-opds-swift" ~> 2.0.0
12 changes: 12 additions & 0 deletions Integrations/Carthage/Cartfile+lcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Third-party dependencies used in the Test App itself.
github "onevcat/Kingfisher" ~> 5.15.8
github "jdg/MBProgressHUD" ~> 1.2.0
github "stephencelis/SQLite.swift" ~> 0.12.2
github "scinfu/SwiftSoup" ~> 2.3.2

# Readium 2 dependencies
github "readium/r2-shared-swift" ~> 2.0.0
github "readium/r2-streamer-swift" ~> 2.0.0
github "readium/r2-navigator-swift" ~> 2.0.0
github "readium/r2-opds-swift" ~> 2.0.0
github "readium/r2-lcp-swift" ~> 2.0.0
33 changes: 33 additions & 0 deletions Integrations/Carthage/project+lcp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: R2TestApp
options:
bundleIdPrefix: org.readium
targets:
R2TestApp:
type: application
platform: iOS
deploymentTarget: "10.0"
sources:
- path: Sources
excludes:
- Resources/Samples
- path: Sources/Resources/Samples
type: folder
dependencies:
- carthage: R2LCPClient
- framework: Carthage/Build/CryptoSwift.xcframework
- framework: Carthage/Build/Fuzi.xcframework
- framework: Carthage/Build/GCDWebServer.xcframework
- framework: Carthage/Build/Kingfisher.xcframework
- framework: Carthage/Build/MBProgressHUD.xcframework
- framework: Carthage/Build/Minizip.xcframework
- framework: Carthage/Build/R2Navigator.xcframework
- framework: Carthage/Build/R2Shared.xcframework
- framework: Carthage/Build/R2Streamer.xcframework
- framework: Carthage/Build/ReadiumLCP.xcframework
- framework: Carthage/Build/ReadiumOPDS.xcframework
- framework: Carthage/Build/SQLite.xcframework
- framework: Carthage/Build/SwiftSoup.xcframework
- framework: Carthage/Build/ZIPFoundation.xcframework
settings:
LIBRARY_SEARCH_PATHS: $(PROJECT_DIR)/Carthage
OTHER_SWIFT_FLAGS: -DLCP
29 changes: 29 additions & 0 deletions Integrations/Carthage/project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: R2TestApp
options:
bundleIdPrefix: org.readium
targets:
R2TestApp:
type: application
platform: iOS
deploymentTarget: "10.0"
sources:
- path: Sources
excludes:
- Resources/Samples
- path: Sources/Resources/Samples
type: folder
dependencies:
- framework: Carthage/Build/CryptoSwift.xcframework
- framework: Carthage/Build/Fuzi.xcframework
- framework: Carthage/Build/GCDWebServer.xcframework
- framework: Carthage/Build/Kingfisher.xcframework
- framework: Carthage/Build/MBProgressHUD.xcframework
- framework: Carthage/Build/Minizip.xcframework
- framework: Carthage/Build/R2Navigator.xcframework
- framework: Carthage/Build/R2Shared.xcframework
- framework: Carthage/Build/R2Streamer.xcframework
- framework: Carthage/Build/ReadiumOPDS.xcframework
- framework: Carthage/Build/SQLite.xcframework
- framework: Carthage/Build/SwiftSoup.xcframework
settings:
LIBRARY_SEARCH_PATHS: $(PROJECT_DIR)/Carthage
27 changes: 27 additions & 0 deletions Integrations/CocoaPods/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
platform :ios, '10.3.1'

target 'R2TestApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

pod 'R2Shared', podspec: 'https://raw.githubusercontent.com/readium/r2-shared-swift/develop/R2Shared.podspec'
pod 'R2Streamer', podspec: 'https://raw.githubusercontent.com/readium/r2-streamer-swift/develop/R2Streamer.podspec'
pod 'R2Navigator', podspec: 'https://raw.githubusercontent.com/readium/r2-navigator-swift/develop/R2Navigator.podspec'
pod 'ReadiumOPDS', podspec: 'https://raw.githubusercontent.com/readium/r2-opds-swift/develop/ReadiumOPDS.podspec'
pod 'ReadiumLCP', podspec: 'https://raw.githubusercontent.com/readium/r2-lcp-swift/develop/ReadiumLCP.podspec'

pod 'GCDWebServer', podspec: 'https://raw.githubusercontent.com/readium/GCDWebServer/3.6.3/GCDWebServer.podspec'
pod 'Kingfisher'
pod 'MBProgressHUD'
pod 'SQLite.swift'
pod 'SwiftSoup'
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.1.4'
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
28 changes: 28 additions & 0 deletions Integrations/CocoaPods/Podfile+lcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
platform :ios, '10.3.1'

target 'R2TestApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

pod 'R2Shared', podspec: 'https://raw.githubusercontent.com/readium/r2-shared-swift/develop/R2Shared.podspec'
pod 'R2Streamer', podspec: 'https://raw.githubusercontent.com/readium/r2-streamer-swift/develop/R2Streamer.podspec'
pod 'R2Navigator', podspec: 'https://raw.githubusercontent.com/readium/r2-navigator-swift/develop/R2Navigator.podspec'
pod 'ReadiumOPDS', podspec: 'https://raw.githubusercontent.com/readium/r2-opds-swift/develop/ReadiumOPDS.podspec'
pod 'ReadiumLCP', podspec: 'https://raw.githubusercontent.com/readium/r2-lcp-swift/develop/ReadiumLCP.podspec'
pod 'R2LCPClient', podspec: 'LCP_URL'

pod 'GCDWebServer', podspec: 'https://raw.githubusercontent.com/readium/GCDWebServer/3.6.3/GCDWebServer.podspec'
pod 'Kingfisher'
pod 'MBProgressHUD'
pod 'SQLite.swift'
pod 'SwiftSoup'
end

post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '5.1.4'
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
Loading