-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
194 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,72 @@ | ||
name: OpenDocumentReader-iOS | ||
on: [push] | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: test | ||
runs-on: macos-11 | ||
runs-on: macos-14 | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: pods | ||
- uses: maxim-lobanov/setup-xcode@v1 | ||
with: | ||
xcode-version: "15.4" | ||
|
||
- name: install pods | ||
run: pod install | ||
|
||
# https://stackoverflow.com/a/57758679/198996 | ||
- name: bundler | ||
- name: install bundler | ||
run: gem install bundler:1.17.3 | ||
- name: fastlane | ||
- name: install fastlane | ||
run: bundle install | ||
|
||
- name: pip | ||
run: python3 -m ensurepip | ||
- name: conan | ||
run: pip3 install conan==1.64.1 | ||
- name: conan repo | ||
run: | | ||
conan remote clean | ||
conan remote add odr https://artifactory.opendocument.app/artifactory/api/conan/conan | ||
conan remote add conancenter https://center.conan.io | ||
- name: install conan | ||
run: pip3 install conan | ||
|
||
- name: conan remote | ||
run: conan remote add --index 0 odr https://artifactory.opendocument.app/artifactory/api/conan/conan | ||
- name: conan login | ||
run: conan remote login odr admin --password ${{ secrets.ARTIFACTORY }} | ||
|
||
- name: conan profile | ||
run: conan profile detect | ||
|
||
- name: conan install | ||
run: > | ||
conan install conan/ | ||
--output-folder=conan-output | ||
--build=missing | ||
--profile:host=conan/profiles/ios-simulator-arm64 | ||
-s build_type=Release | ||
-s "&:build_type=RelWithDebInfo" | ||
-s "odrcore/*:build_type=RelWithDebInfo" | ||
- name: conan patch | ||
run: bash conan/patch.sh | ||
|
||
- name: run tests | ||
run: bundle exec fastlane tests | ||
# - uses: actions/upload-artifact@v2 | ||
# if: ${{ always() }} | ||
# with: | ||
# name: logs | ||
# path: | | ||
# /Users/runner/Library/Developer/Xcode/DerivedData/OpenDocumentReader-*/ | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: logs | ||
path: | | ||
/Users/runner/Library/Developer/Xcode/DerivedData/OpenDocumentReader-*/ | ||
- name: upload binaries to conan repo | ||
run: conan upload "*" --check --confirm --remote odr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/ODR Full.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
OpenDocumentReader.xcodeproj/xcshareddata/xcschemes/ODR Lite.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from conan import ConanFile | ||
from conan.tools.apple import XcodeDeps, XcodeToolchain | ||
|
||
class Pkg(ConanFile): | ||
settings = "os", "compiler", "arch", "build_type" | ||
options = {"configuration": ["Debug", "Debug Lite", "Release", "Release Lite"]} | ||
default_options = {"configuration": "Debug"} | ||
requires = "odrcore/3.0.0" | ||
|
||
def generate(self): | ||
xcode = XcodeDeps(self) | ||
xcode.configuration = self.options.configuration | ||
xcode.generate() | ||
|
||
tc = XcodeToolchain(self) | ||
tc.configuration = self.options.configuration | ||
tc.generate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
echo "patch conan generated xcconfig files" | ||
|
||
# patch xcconfig - see https://github.com/conan-io/conan/issues/16526 | ||
sed -i '' -E 's/\]\[arch=arm64\]\[/][/g;t' conan-output/*.xcconfig | ||
sed -i '' -E 's/\]\[arch=x86_64\]\[/][/g;t' conan-output/*.xcconfig | ||
|
||
echo "done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include(default) | ||
|
||
[settings] | ||
os=iOS | ||
os.sdk=iphone | ||
os.version=14.0 | ||
os.sdk=iphoneos | ||
arch=armv8 | ||
build_type=Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
include(default) | ||
|
||
[settings] | ||
os=iOS | ||
os.version=14.0 | ||
os.sdk=iphonesimulator | ||
arch=armv8 | ||
build_type=Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
include(default) | ||
|
||
[settings] | ||
os=iOS | ||
os.sdk=iphonesimulator | ||
os.version=14.0 | ||
os.sdk=iphonesimulator | ||
arch=x86_64 | ||
build_type=Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
# https://stackoverflow.com/a/246128/198996 | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
cd $DIR/.. | ||
|
||
# device | ||
for configuration in "Debug" "Debug Lite" "Release" "Release Lite"; do | ||
conan install conan/ \ | ||
--output-folder=conan-output \ | ||
--build=missing \ | ||
--profile:host=conan/profiles/ios \ | ||
-s build_type=Release \ | ||
-s "&:build_type=Release" \ | ||
-s "odrcore/*:build_type=RelWithDebInfo" \ | ||
-o "configuration=${configuration}" | ||
done | ||
|
||
# simulator | ||
for arch in "arm64" "x64"; do | ||
for configuration in "Debug" "Debug Lite" "Release" "Release Lite"; do | ||
conan install conan/ \ | ||
--output-folder=conan-output \ | ||
--build=missing \ | ||
--profile:host=conan/profiles/ios-simulator-${arch} \ | ||
-s build_type=Release \ | ||
-s "&:build_type=Release" \ | ||
-s "odrcore/*:build_type=RelWithDebInfo" \ | ||
-o "configuration=${configuration}" | ||
done | ||
done | ||
|
||
bash conan/patch.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.debug lite.xcconfig" | ||
#include "conanbuildinfo.xcconfig" | ||
|
||
#include "conan-output/conan_config.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.debug.xcconfig" | ||
#include "conanbuildinfo.xcconfig" | ||
|
||
#include "conan-output/conan_config.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.release lite.xcconfig" | ||
#include "conanbuildinfo.xcconfig" | ||
|
||
#include "conan-output/conan_config.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#include "Pods/Target Support Files/Pods-OpenDocumentReader/Pods-OpenDocumentReader.release.xcconfig" | ||
#include "conanbuildinfo.xcconfig" | ||
|
||
#include "conan-output/conan_config.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.