Skip to content

Commit

Permalink
Merge pull request #360 from bitmovin/add-ci-checks-for-integration-t…
Browse files Browse the repository at this point in the history
…est-build

Add CI checks for integration test build
  • Loading branch information
rolandkakonyi authored Dec 18, 2023
2 parents fe684d5 + 19508ea commit d3205d6
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 14 deletions.
29 changes: 21 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ jobs:
run: ./gradlew assembleDebug --build-cache
working-directory: example/android

- name: Build Android integration test host app
run: ./gradlew assembleDebug --build-cache
working-directory: integration_test/android

test-build-ios:
name: Build iOS
runs-on: macOS-12
Expand All @@ -191,6 +195,9 @@ jobs:
- name: Install node_modules (example/)
run: yarn install --frozen-lockfile --cwd example

- name: Install node_modules (integration_test/)
run: yarn install --frozen-lockfile --cwd integration_test

- name: Install dependencies
run: brew bundle install

Expand All @@ -201,15 +208,14 @@ jobs:
path: |
.cocoapods-cache
example/ios/Pods
key: pods-${{ hashFiles('example/ios/Podfile.lock') }}
integration_test/ios/Pods
key: pods-${{ hashFiles('example/ios/Podfile.lock') }}-${{ hashFiles('integration_test/ios/Podfile.lock') }}
restore-keys: pods-

- name: Install pods
run: |
pod repo remove trunk
pod repo add bitmovin https://github.com/bitmovin/cocoapod-specs.git || pod repo update bitmovin
pod install --repo-update
working-directory: example/ios
yarn pods
env:
CP_HOME_DIR: ${{ github.workspace }}/.cocoapods-cache

Expand All @@ -220,6 +226,7 @@ jobs:
path: |
.cocoapods-cache
example/ios/Pods
integration_test/ios/Pods
key: ${{ steps.pods-cache-restore.outputs.cache-primary-key }}

- name: Build iOS example
Expand All @@ -228,6 +235,12 @@ jobs:
env:
NSUnbufferedIO: YES

- name: Build iOS integration test host app
run: set -o pipefail && xcodebuild -workspace IntegrationTest.xcworkspace -scheme IntegrationTest -configuration Debug build CODE_SIGNING_ALLOWED='NO' | xcpretty
working-directory: integration_test/ios
env:
NSUnbufferedIO: YES

test-build-tvos:
name: Build tvOS
runs-on: macOS-12
Expand Down Expand Up @@ -262,15 +275,14 @@ jobs:
path: |
.cocoapods-cache
example/ios/Pods
key: pods-${{ hashFiles('example/ios/Podfile.lock') }}
integration_test/ios/Pods
key: pods-${{ hashFiles('example/ios/Podfile.lock') }}-${{ hashFiles('integration_test/ios/Podfile.lock') }}
restore-keys: pods-

- name: Install pods
run: |
pod repo remove trunk
pod repo add bitmovin https://github.com/bitmovin/cocoapod-specs.git || pod repo update bitmovin
pod install --repo-update
working-directory: example/ios
yarn example pods
env:
CP_HOME_DIR: ${{ github.workspace }}/.cocoapods-cache

Expand All @@ -281,6 +293,7 @@ jobs:
path: |
.cocoapods-cache
example/ios/Pods
integration_test/ios/Pods
key: ${{ steps.pods-cache-restore.outputs.cache-primary-key }}

- name: Build tvOS example
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/create-sdk-update-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,33 @@ jobs:
registry-url: 'https://registry.npmjs.org/'
cache: 'yarn'

- name: Restore Pods cache
id: pods-cache-restore
uses: actions/cache/restore@v3
with:
path: |
.cocoapods-cache
example/ios/Pods
integration_test/ios/Pods
key: pods-${{ hashFiles('example/ios/Podfile.lock') }}-${{ hashFiles('integration_test/ios/Podfile.lock') }}
restore-keys: pods-

- name: Bump iOS player SDK version
if: ${{ inputs.sdk_name == 'ios' }}
run: |
sed -i '' 's/s.dependency "BitmovinPlayer", ".*/s.dependency "BitmovinPlayer", "${{ inputs.version_number }}"/g' RNBitmovinPlayer.podspec
yarn install --frozen-lockfile --cwd example
cd example/ios
pod repo add bitmovin https://github.com/bitmovin/cocoapod-specs.git
pod update BitmovinPlayer
yard bootstrap
- name: Save Pods cache
if: steps.pods-cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: |
.cocoapods-cache
example/ios/Pods
integration_test/ios/Pods
key: ${{ steps.pods-cache-restore.outputs.cache-primary-key }}

- name: Bump Android player SDK version
if: ${{ inputs.sdk_name == 'android' }}
Expand All @@ -65,7 +84,7 @@ jobs:
- name: Commit version bump
run: |
git add RNBitmovinPlayer.podspec android/build.gradle example/ios/Podfile.lock
git add RNBitmovinPlayer.podspec android/build.gradle example/ios/Podfile.lock integration_test/ios/Podfile.lock
git commit -m "chore(${{ inputs.sdk_name }}): update ${{ inputs.sdk_name }} player version to ${{ inputs.version_number }}"
git push origin ${{ steps.branching.outputs.branch_name }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/start-release-train.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,12 @@ jobs:
path: |
.cocoapods-cache
example/ios/Pods
key: pods-${{ hashFiles('example/ios/Podfile.lock') }}
integration_test/ios/Pods
key: pods-${{ hashFiles('example/ios/Podfile.lock') }}-${{ hashFiles('integration_test/ios/Podfile.lock') }}
restore-keys: pods-

- name: Set up CocoaPods
run: |
pod repo remove trunk
pod repo add bitmovin https://github.com/bitmovin/cocoapod-specs.git || pod repo update bitmovin
working-directory: example/ios
env:
Expand All @@ -98,6 +98,7 @@ jobs:
path: |
.cocoapods-cache
example/ios/Pods
integration_test/ios/Pods
key: ${{ steps.pods-cache-restore.outputs.cache-primary-key }}

- name: Commit changelog version bump
Expand Down

0 comments on commit d3205d6

Please sign in to comment.