Skip to content

Commit

Permalink
split into files
Browse files Browse the repository at this point in the history
  • Loading branch information
henninghall committed Dec 12, 2023
1 parent c260b90 commit 7db2827
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 64 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Build ios

on:
workflow_call:
workflow_dispatch:

jobs:
build-ios:
name: Build
runs-on: macos-13

steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
id: cache
with:
path: |
${{ env.APP_PATH }}
${{ env.APP_PATH }}.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', env.EXAMPLE_SRC ) }}

- uses: actions/setup-node@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
node-version: 14.18.1
cache: 'yarn'

- name: Install npm dependencies (example project)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/
run: yarn install --frozen-lockfile

- name: Install npm dependencies (root)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./
run: yarn install --frozen-lockfile

- name: Setup Ruby
if: steps.cache.outputs.cache-hit != 'true'
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: ./examples/${{ env.PROJECT_NAME }}/

- name: setup-cocoapods
if: steps.cache.outputs.cache-hit != 'true'
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.11.3

- name: Install CocoaPods
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/
run: |
yarn pods
- name: Select Xcode
if: steps.cache.outputs.cache-hit != 'true'
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer

- name: Build
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/ios/
run: |
set -o pipefail && xcodebuild \
-workspace "${{ env.PROJECT_NAME }}.xcworkspace" \
-scheme "${{ env.PROJECT_NAME }}" \
-destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \
-derivedDataPath "DerivedData" \
-configuration "Release" \
| tee xcodebuild.log
67 changes: 3 additions & 64 deletions .github/workflows/e2e-tests-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,70 +15,9 @@ env:

jobs:
build-ios:
name: Build
runs-on: macos-13

steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
id: cache
with:
path: |
${{ env.APP_PATH }}
${{ env.APP_PATH }}.dSYM
key: ${{ runner.os }}-${{ hashFiles('src/**', 'ios/**', env.EXAMPLE_SRC ) }}

- uses: actions/setup-node@v3
if: steps.cache.outputs.cache-hit != 'true'
with:
node-version: 14.18.1
cache: 'yarn'

- name: Install npm dependencies (example project)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/
run: yarn install --frozen-lockfile

- name: Install npm dependencies (root)
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./
run: yarn install --frozen-lockfile

- name: Setup Ruby
if: steps.cache.outputs.cache-hit != 'true'
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: ./examples/${{ env.PROJECT_NAME }}/

- name: setup-cocoapods
if: steps.cache.outputs.cache-hit != 'true'
uses: maxim-lobanov/setup-cocoapods@v1
with:
version: 1.11.3

- name: Install CocoaPods
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/
run: |
yarn pods
- name: Select Xcode
if: steps.cache.outputs.cache-hit != 'true'
run: sudo xcode-select -s /Applications/Xcode_$(<.xcode-version).app/Contents/Developer

- name: Build
if: steps.cache.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/ios/
run: |
set -o pipefail && xcodebuild \
-workspace "${{ env.PROJECT_NAME }}.xcworkspace" \
-scheme "${{ env.PROJECT_NAME }}" \
-destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \
-derivedDataPath "DerivedData" \
-configuration "Release" \
| tee xcodebuild.log
name: Build iOS
uses: ./.github/workflows/build-ios.yml
secrets: inherit

e2e-ios:
name: e2e tests
Expand Down

0 comments on commit 7db2827

Please sign in to comment.