Skip to content

Release: version 4.5.4 #510

Release: version 4.5.4

Release: version 4.5.4 #510

name: ReactNativeSlider-CI
on:
push:
branches:
- 'main'
- 'release/**'
pull_request:
types: [opened, reopened, synchronize]
jobs:
install:
name: Install dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Cache node modules
id: cache-package-npm
uses: actions/cache@v4
env:
cache-name: cached-ci-npm-deps
with:
path: ./package/node_modules
key: ${{ hashFiles('./package/package.json') }}
- name: Install required dependencies on cache miss (npm)
if: steps.cache-package-npm.outputs.cache-hit != 'true'
run: |
npm install
verify-package-sources:
name: Lint the sources
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Pull npm dependencies
uses: actions/cache@v4
with:
path: ./package/node_modules
key: ${{ hashFiles('./package/package.json') }}
- name: Run ESLint on the sources
run: cd package && npx eslint src
- name: Run TypeScript on the sources
run: cd package && npx tsc --noEmit
test:
name: Run the unit tests
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Pull npm dependencies
uses: actions/cache@v4
with:
path: ./package/node_modules
key: ${{ hashFiles('./package/package.json') }}
- name: Run unit tests
run: cd package && npx jest src
verify-example-sources:
name: Verify example app sources
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Run ESLint on the sources
run: cd example && npx eslint .
- name: Run TypeScript on the sources
run: cd example && npx tsc --noEmit
build-android-app:
name: Build example app Android
runs-on: ubuntu-latest
needs: [verify-example-sources]
steps:
- uses: actions/checkout@v4
- name: Pull the npm dependencies
run: npm install
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Build the Android OS app
run: cd example/android && ./gradlew assembleDebug
build-android-app-new-arch:
name: Build example app Android (Fabric)
runs-on: ubuntu-latest
needs: [build-android-app]
steps:
- uses: actions/checkout@v4
- name: Pull the npm dependencies
run: npm install
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Use new arch config
id: cache-new-arch-gradle
uses: actions/cache@v4
env:
cache-name: cached-gradle-new-arch-prop
with:
path: example/android/gradle.properties
key: gradle-prop-new-arch-config
- name: Build the Android OS app
run: cd example/android && ./gradlew assembleDebug
build-iOS-app:
name: Build example app iOS
runs-on: macos-latest
needs: [verify-example-sources]
steps:
- uses: actions/checkout@v4
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cached-ios-npm-deps
with:
path: example/node_modules
key: ${{ hashFiles('./example/package-lock.json') }}-${{ hashFiles('./package/package-lock.json') }}
- name: Install required dependencies on cache miss (npm)
if: steps.cache-npm.outputs.cache-hit != 'true'
run: |
npm install
- name: Cache Pods
id: cache-pods
uses: actions/cache@v4
env:
cache-name: cached-ios-pods-deps
with:
path: example/ios/Pods
key: ${{ hashFiles('./example/ios/Podfile.lock') }}
- name: Install required dependencies on cache miss (Pods)
if: steps.cache-pods.outputs.cache-hit != 'true'
run: |
cd example/ios && pod install
- name: Reinstall Pods only if using cached ones
if: steps.cache-pods.outputs.cache-hit == 'true'
run: cd example/ios && pod install
- name: Use the current package sources in build
run: cd example && npm run refresh-package
- name: Build iOS
run: |
xcodebuild -workspace example.xcworkspace -scheme example -destination "platform=iOS Simulator" CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO SKIP_BUNDLING=TRUE build | xcbeautify --renderer github-actions
working-directory: example/ios
build-iOS-new-arch-app:
name: Build example app iOS (Fabric)
runs-on: macos-latest
needs: [build-iOS-app]
steps:
- uses: actions/checkout@v4
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cached-ios-npm-deps
with:
path: example/node_modules
key: new-arch-${{ hashFiles('./example/package-lock.json') }}-${{ hashFiles('./package/package-lock.json') }}
- name: Install required dependencies on cache miss (npm)
if: steps.cache-npm.outputs.cache-hit != 'true'
run: |
npm install
- name: Cache Pods
id: cache-pods
uses: actions/cache@v4
env:
cache-name: cached-ios-pods-deps
with:
path: example/ios/Pods
key: new-arch-${{ hashFiles('./example/ios/Podfile.lock') }}
- name: Use the current package sources in build
run: cd example && npm run refresh-package
- name: Install required dependencies on cache miss (Pods)
if: steps.cache-pods.outputs.cache-hit != 'true'
run: |
cd example/ios && RCT_NEW_ARCH_ENABLED=1 pod install
- name: Reinstall Pods only if using cached ones
if: steps.cache-pods.outputs.cache-hit == 'true'
run: cd example/ios && RCT_NEW_ARCH_ENABLED=1 pod install
- name: Build iOS - Fabric
run: |
xcodebuild -workspace example.xcworkspace -scheme example -destination "platform=iOS Simulator" CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO SKIP_BUNDLING=TRUE build | xcbeautify --renderer github-actions
working-directory: example/ios
build-Windows-app:
name: Build example app Windows
runs-on: windows-2022
needs: [verify-example-sources]
steps:
- name: Ensure the cross-platform Git on Windows
run: git config --global core.autocrlf false
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
- name: Restore NuGet packages
run: nuget restore .\example\windows\example.sln
- name: Build the Windows OS app
run: cd example; npx react-native run-windows --arch x64 --no-launch --no-deploy --logging --sln .\windows\example.sln --proj .\windows\example\example.vcxproj