Skip to content

Commit

Permalink
Merge pull request #104 from SCENEE/fix-framework-build
Browse files Browse the repository at this point in the history
Fix framework build
  • Loading branch information
scenee authored Jan 21, 2021
2 parents f0331d4 + b67132f commit 0146d03
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
CERTS_PASS: ${{ secrets.CERTS_PASS }}
DECORD_KEY: ${{ secrets.DECORD_KEY }}

# xcode12_3:
# runs-on: macOS-latest
# steps:
# - uses: actions/checkout@v1
# - name: "Testing on Xcode 12.3"
# run: test/travis_ci.sh
# env:
# DEVELOPER_DIR: /Applications/Xcode_12.3.app
# CERTS_PASS: ${{ secrets.CERTS_PASS }}
# DECORD_KEY: ${{ secrets.DECORD_KEY }}
#
xcode12_3:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- name: "Testing on Xcode 12.3"
run: test/travis_ci.sh
env:
DEVELOPER_DIR: /Applications/Xcode_12.3.app
CERTS_PASS: ${{ secrets.CERTS_PASS }}
DECORD_KEY: ${{ secrets.DECORD_KEY }}

5 changes: 5 additions & 0 deletions sample/SampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = J3D7L9FHSS;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -338,6 +339,8 @@
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = J3D7L9FHSS;
EXCLUDED_ARCHS = "";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -496,6 +499,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = SampleFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand All @@ -520,6 +524,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = SampleFramework/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down
12 changes: 6 additions & 6 deletions test/build.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ load test_helper
[[ ! "${output}" =~ "\[[ \*]*\]" ]]
[[ ! "${output}" =~ "Time:" ]]
file ./SampleFramework.framework/SampleFramework | grep -q arm.*
file ./SampleFramework.framework/SampleFramework | grep -q x86_64
file ./SampleFramework.framework/SampleFramework | grep -q i386
ls ./SampleFramework.framework/Modules/SampleFramework.swiftmodule | grep -q arm*
ls ./SampleFramework.framework/Modules/SampleFramework.swiftmodule | grep -q x86_64.*
ls ./SampleFramework.framework/Modules/SampleFramework.swiftmodule | grep -q i386.*
}

@test "relax build framework --progress" {
Expand All @@ -26,9 +26,9 @@ load test_helper

[[ -f ./SampleFramework.framework/SampleFramework ]]
file ./SampleFramework.framework/SampleFramework | grep -q arm.*
file ./SampleFramework.framework/SampleFramework | grep -q -v x86_64
file ./SampleFramework.framework/SampleFramework | grep -q -v i386
ls ./SampleFramework.framework/Modules/SampleFramework.swiftmodule | grep -q arm*
ls ./SampleFramework.framework/Modules/SampleFramework.swiftmodule | grep -q -v x86_64.*
ls ./SampleFramework.framework/Modules/SampleFramework.swiftmodule | grep -q -v i386.*
}

@test "relax build framework --framework" {
Expand All @@ -43,7 +43,7 @@ load test_helper
[[ -d ./Sample.framework ]]
[[ -f ./Sample.framework.zip ]]
file ./Sample.framework/Sample | grep -q arm.*
file ./Sample.framework/Sample | grep -q x86_64
file ./Sample.framework/Sample | grep -q i386
}

@test "relax build staticlib --framework Sample --no-simulator" {
Expand All @@ -54,7 +54,7 @@ load test_helper
[[ -f ./Sample.framework.zip ]]

file ./Sample.framework/Sample | grep -q arm.*
file ./Sample.framework/Sample | grep -q -v x86_64
file ./Sample.framework/Sample | grep -q -v i386
}

@test "relax build: check workspace restoration" {
Expand Down
2 changes: 1 addition & 1 deletion test/package.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ load test_helper
run relax export development
run relax package development artifact
assert_success
[[ -f artifact/Sample\ App.ipa ]]; \
[[ $(find artifact -name "Sample*.ipa") ]]; \
[[ -f artifact/Sample\ App.xcarchive.zip ]]
}

Expand Down
2 changes: 1 addition & 1 deletion test/resign.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ load test_helper
run relax resign -k relax.keychain -i "com.scenee.SampleApp" -p "Relax AdHoc" -c "iPhone Distribution: Shin Yamamoto (J3D7L9FHSS)" "$(relax show development ipa)"
assert_success

run relax validate "Sample App-resigned.ipa"
run relax validate "$(find . -name "*-resigned.ipa")"
assert_success
}

Expand Down

0 comments on commit 0146d03

Please sign in to comment.