Skip to content

Commit

Permalink
Try to build iOS #2
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Apr 7, 2021
1 parent 73d47e7 commit 5c39f4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
10 changes: 0 additions & 10 deletions .github/templates/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ with:
key: #@ key
#@ end

#@ def storeCache(key):
name: Store cache
uses: actions/cache@v2
with:
path: ./wrappers/build/**
key: #@ key
#@ end

#@ def cacheCondition():
#@overlay/match missing_ok=True
if: steps.check-cache.outputs.cache-hit != 'true'
Expand All @@ -50,10 +42,8 @@ steps:
- name: Build wrappers
run: #@ actualCommand
_: #@ template.replace(cacheCondition())
- #@ template.replace([overlay.apply(storeCache(cacheKey), cacheCondition())])
#@ end


---
name: build and test
on:
Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ jobs:
- name: Build wrappers
run: ./wrappers/build-macos.sh --configuration=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${{ github.event_name == 'pull_request' && 'ON' || 'OFF' }}
if: steps.check-cache.outputs.cache-hit != 'true'
- name: Store cache
uses: actions/cache@v2
with:
path: ./wrappers/build/**
key: wrappers-macos-Release-${{ github.event_name == 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}}
if: steps.check-cache.outputs.cache-hit != 'true'
build-wrappers-ios:
runs-on: macos-latest
name: Build iOS wrappers
Expand All @@ -46,9 +40,3 @@ jobs:
- name: Build wrappers
run: ./wrappers/build-ios.sh --configuration=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=${{ github.event_name == 'pull_request' && 'ON' || 'OFF' }}
if: steps.check-cache.outputs.cache-hit != 'true'
- name: Store cache
uses: actions/cache@v2
with:
path: ./wrappers/build/**
key: wrappers-ios-Release-${{ github.event_name == 'pull_request' && 'ON' || 'OFF' }}-${{hashFiles('./wrappers/**')}}
if: steps.check-cache.outputs.cache-hit != 'true'
8 changes: 4 additions & 4 deletions wrappers/build-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ function build() {

# This is a workaround for CMAKE_IOS_INSTALL_COMBINED removing @rpath from LC_DYLIB_ID.
# Reported here: https://cmake.org/pipermail/cmake/2018-October/068316.html
rm build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers
xcrun lipo -create cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphoneos/realm-wrappers.framework/realm-wrappers \
cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphonesimulator/realm-wrappers.framework/realm-wrappers \
-output build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers
rm "$SCRIPT_DIRECTORY"/build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers
xcrun lipo -create "$SCRIPT_DIRECTORY"/cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphoneos/realm-wrappers.framework/realm-wrappers \
"$SCRIPT_DIRECTORY"/cmake/iOS/src/$REALM_CMAKE_CONFIGURATION-iphonesimulator/realm-wrappers.framework/realm-wrappers \
-output "$SCRIPT_DIRECTORY"/build/iOS/$REALM_CMAKE_CONFIGURATION/realm-wrappers.framework/realm-wrappers
}

build

0 comments on commit 5c39f4f

Please sign in to comment.