Skip to content

Commit

Permalink
[CI] Add iOS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Houssein committed Dec 10, 2023
1 parent 2100f28 commit 7e46356
Showing 1 changed file with 94 additions and 52 deletions.
146 changes: 94 additions & 52 deletions .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Android Main CI
name: Main CI

on:
pull_request:
Expand All @@ -9,26 +9,79 @@ on:
- 'main'

jobs:
detekt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17

- name: Run Detekt
run: ./gradlew detekt

- name: Run Lint
run: ./gradlew lint

unit-tests:
name: Run Unit Tests with coverage
runs-on: ubuntu-latest
# detekt:
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v3
# - name: Set up JDK
# uses: actions/setup-java@v3
# with:
# distribution: 'adopt'
# java-version: 17
#
# - name: Run Detekt
# run: ./gradlew detekt
#
# - name: Run Lint
# run: ./gradlew lint
#
# unit-tests:
# name: Run Unit Tests with coverage
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Set up JDK
# uses: actions/setup-java@v3
# with:
# distribution: 'adopt'
# java-version: 17
#
# - name: Run Release Unit Tests
# run: bash ./gradlew koverMergedReport
#
# - name: Upload coverage report
# uses: actions/upload-artifact@v3
# with:
# name: coverage-report
# path: build/reports/kover/merged/html/index.html
#
# Android:
# name: Android Build
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout
# uses: actions/checkout@v3
#
# - name: Set up JDK
# uses: actions/setup-java@v3
# with:
# distribution: 'adopt'
# java-version: 17
#
# - name: Build app
# run: bash ./gradlew assemble
#
# - name: Upload Release APK
# uses: actions/upload-artifact@v3
# with:
# name: apk
# path: ./android/app/build/outputs/apk/release/app-release.apk
#
# - name: Upload mapping file
# uses: actions/upload-artifact@v3
# with:
# name: mapping
# path: ./android/app/build/outputs/mapping/release/mapping.txt

iOS:
name: iOS Build
runs-on: macOS-latest
timeout-minutes: 15

steps:
- name: Checkout
Expand All @@ -40,40 +93,29 @@ jobs:
distribution: 'adopt'
java-version: 17

- name: Run Release Unit Tests
run: bash ./gradlew koverMergedReport
- name: Build shared modules
run: ./gradlew :shared:core:sharedModules:generateDummyFramework
working-directory: ${{ github.workspace }}

- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: build/reports/kover/merged/html/index.html
- name: Install cocoapods
run: gem install cocoapods

apk:
name: Generate APK
runs-on: ubuntu-latest
- name: Install dependencies
run: pod install
working-directory: ./CryptoAppiOS

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17

- name: Build app
run: bash ./gradlew assemble

- name: Upload Release APK
uses: actions/upload-artifact@v3
with:
name: apk
path: ./android/app/build/outputs/apk/release/app-release.apk
- name: Build
working-directory: ./CryptoAppiOS
run: |
xcodebuild -scheme CryptoAppiOS -workspace ./CryptoAppiOS/CryptoAppiOS.xcworkspace \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO \
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.1' \
-derivedDataPath \
build
- name: Upload mapping file
- name: Upload iOS APP
uses: actions/upload-artifact@v3
working-directory: ./CryptoAppiOS
with:
name: mapping
path: ./android/app/build/outputs/mapping/release/mapping.txt
name: ios_app
path: ./build/Build/Products/Debug-iphoneos/CryptoAppiOS.app

0 comments on commit 7e46356

Please sign in to comment.