Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMoch committed Oct 23, 2024
1 parent c282346 commit a8205b7
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 192 deletions.
34 changes: 0 additions & 34 deletions .github/actions/setup-bun/action.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/actions/setup-node/action.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
- master
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- './packages/react-native-video/android/**'
- 'examples/bare/android/**'
- 'yarn.lock'
- 'examples/bare/yarn.lock'
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- './packages/react-native-video/android/**'
- 'examples/bare/android/**'
- 'yarn.lock'
- 'examples/bare/yarn.lock'
Expand Down
151 changes: 59 additions & 92 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,71 +7,60 @@ on:
- master
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- 'packages/react-native-video/ios/**'
- '*.podspec'
- 'examples/bare/ios/**'
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- 'packages/react-native-video/ios/**'
- '*.podspec'
- 'examples/bare/ios/**'

jobs:
build:
build:
name: Build iOS Example App
runs-on: macos-latest
defaults:
run:
working-directory: examples/bare/ios

steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install node_modules at Root
uses: ./.github/actions/setup-node
with:
working-directory: ./

- name: Build Library
working-directory: ./
run: yarn build

- name: Install node_modules at Example
uses: ./.github/actions/setup-node
with:
working-directory: examples/bare
- name: Install npm dependencies (with bun)
run: bun install

- name: Restore buildcache
uses: mikehardy/buildcache-action@v2
continue-on-error: true

- name: Setup Ruby (bundle)
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
ruby-version: 2.7.2
bundler-cache: true
working-directory: examples/bare/ios

- name: Install xcpretty
run: gem install xcpretty

- name: Restore Pods cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
examples/bare/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
path: examples/bare/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Generate Native Project
working-directory: examples/bare/ios
run: pod install

- name: Install Pods
working-directory: examples/bare/ios
run: pod install

- name: Install xcpretty
run: gem install xcpretty

- name: Build App
working-directory: examples/bare/ios
run: "set -o pipefail && xcodebuild \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace BareExample.xcworkspace \
Expand All @@ -81,62 +70,51 @@ jobs:
-destination 'platform=iOS Simulator,name=iPhone 14' \
build \
CODE_SIGNING_ALLOWED=NO | xcpretty"

build-with-ads:
name: Build iOS Example App With Ads
name: Build iOS Example App
runs-on: macos-latest
defaults:
run:
working-directory: examples/bare/ios

steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install node_modules at Root
uses: ./.github/actions/setup-node
with:
working-directory: ./

- name: Build Library
working-directory: ./
run: yarn build

- name: Install node_modules at Example
uses: ./.github/actions/setup-node
with:
working-directory: examples/bare
- name: Install npm dependencies (with bun)
run: bun install

- name: Restore buildcache
uses: mikehardy/buildcache-action@v2
continue-on-error: true

- name: Setup Ruby (bundle)
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
ruby-version: 2.7.2
bundler-cache: true
working-directory: examples/bare/ios

- name: Install xcpretty
run: gem install xcpretty

- name: Restore Pods cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
examples/bare/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
path: examples/bare/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Generate Native Project
working-directory: examples/bare/ios
run: export RNV_SAMPLE_ENABLE_ADS=true && pod install

- name: Install Pods
run: export RNV_SAMPLE_ENABLE_ADS=true && pod install

- name: Install xcpretty
run: gem install xcpretty
working-directory: examples/bare/ios
run: export RNV_SAMPLE_ENABLE_ADS=true && pod install

- name: Build App
run: "set -o pipefail && export RNV_SAMPLE_ENABLE_ADS=true && xcodebuild \
working-directory: examples/bare/ios
run: "set -o pipefail && xcodebuild \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace BareExample.xcworkspace \
-scheme BareExample \
Expand All @@ -145,62 +123,51 @@ jobs:
-destination 'platform=iOS Simulator,name=iPhone 14' \
build \
CODE_SIGNING_ALLOWED=NO | xcpretty"

build-with-caching:
name: Build iOS Example App With Caching
build-with-caching:
name: Build iOS Example App
runs-on: macos-latest
defaults:
run:
working-directory: examples/bare/ios

steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install node_modules at Root
uses: ./.github/actions/setup-node
with:
working-directory: ./

- name: Build Library
working-directory: ./
run: yarn build

- name: Install node_modules at Example
uses: ./.github/actions/setup-node
with:
working-directory: examples/bare
- name: Install npm dependencies (with bun)
run: bun install

- name: Restore buildcache
uses: mikehardy/buildcache-action@v2
continue-on-error: true

- name: Setup Ruby (bundle)
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.10
ruby-version: 2.7.2
bundler-cache: true
working-directory: examples/bare/ios

- name: Install xcpretty
run: gem install xcpretty

- name: Restore Pods cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
examples/bare/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
path: examples/bare/ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock', '**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Generate Native Project
working-directory: examples/bare/ios
run: export RNV_SAMPLE_VIDEO_CACHING=true && pod install

- name: Install Pods
working-directory: examples/bare/ios
run: export RNV_SAMPLE_VIDEO_CACHING=true && pod install

- name: Install xcpretty
run: gem install xcpretty

- name: Build App
run: "set -o pipefail && export RNV_SAMPLE_VIDEO_CACHING=true && xcodebuild \
working-directory: examples/bare/ios
run: "set -o pipefail && xcodebuild \
-derivedDataPath build -UseModernBuildSystem=YES \
-workspace BareExample.xcworkspace \
-scheme BareExample \
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ on:
- master
paths:
- '.github/workflows/check-android.yml'
- 'android/**'
- './packages/react-native-video/android/**'
pull_request:
paths:
- '.github/workflows/check-android.yml'
- 'android/**'
- './packages/react-native-video/android/**'

jobs:
Kotlin-Lint:
Expand All @@ -20,15 +20,15 @@ jobs:
- run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.0.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/
- name: run ktlint
working-directory: ./android/
working-directory: ./packages/react-native-video/android/
run: |
ktlint --reporter=checkstyle,output=build/ktlint-report.xml --relative --editorconfig=./.editorconfig
continue-on-error: true
- uses: yutailang0119/action-ktlint@v3
with:
report-path: ./android/build/*.xml
report-path: ./packages/react-native-video/android/build/*.xml
continue-on-error: false
- uses: actions/upload-artifact@v3
with:
name: ktlint-report
path: ./android/build/*.xml
path: ./packages/react-native-video/android/build/*.xml
Loading

0 comments on commit a8205b7

Please sign in to comment.