docs(example): use npmjs.com package vs github ref in example #479
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
js-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
name: Yarn Cache | |
id: yarn-cache | |
with: | |
path: .yarn/cache | |
key: ${{ runner.os }}-android-yarn-v1-${{ hashFiles('yarn.lock') }} | |
restore-keys: ${{ runner.os }}-js-yarn-v1 | |
- name: Install dependencies | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
retry_wait_seconds: 30 | |
max_attempts: 3 | |
command: yarn install | |
- name: Run tests | |
run: yarn test | |
android-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
name: Yarn Cache | |
id: yarn-cache | |
with: | |
path: .yarn/cache | |
key: ${{ runner.os }}-android-yarn-v1-${{ hashFiles('yarn.lock') }} | |
restore-keys: ${{ runner.os }}-android-yarn-v1 | |
- name: Install dependencies | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
retry_wait_seconds: 30 | |
max_attempts: 3 | |
command: yarn install --frozen-lockfile | |
- name: Install JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build android example app | |
run: yarn example:install && yarn example:devcopy && yarn example:install && cd RNFBSDKExample && cd android && ./gradlew assembleDebug | |
ios-build: | |
runs-on: macos-14 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: iOS build configured to use current node | |
run: echo "export NODE_BINARY=`which node`" > RNFBSDKExample/ios/.xcode.env.local | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3 | |
- name: Install cocoapods | |
run: gem install cocoapods | |
- name: Install xcbeautify | |
run: brew install xcbeautify | |
- uses: hendrikmuhs/ccache-action@v1 | |
name: Xcode Compile Cache | |
with: | |
key: ${{ runner.os }}-v1 # makes a unique key w/related restore key internally | |
max-size: 750M | |
- uses: actions/cache@v4 | |
name: Yarn Cache | |
id: yarn-cache | |
with: | |
path: .yarn/cache | |
key: ${{ runner.os }}-ios-yarn-v1-${{ hashFiles('yarn.lock') }} | |
restore-keys: ${{ runner.os }}-yarn-v1 | |
- uses: actions/cache@v4 | |
name: Cache Pods | |
id: pods-cache | |
with: | |
path: RNFBSDKExample/ios/Pods | |
key: ${{ runner.os }}-pods-v1-${{ hashFiles('RNFBSDKExample/ios/Podfile.lock') }} | |
restore-keys: ${{ runner.os }}-pods-v1 | |
- name: Install dependencies | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
retry_wait_seconds: 30 | |
max_attempts: 3 | |
command: yarn && yarn example:install | |
- name: Build ios example app | |
run: | | |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | |
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros | |
export CCACHE_FILECLONE=true | |
export CCACHE_DEPEND=true | |
export CCACHE_INODECACHE=true | |
export SKIP_BUNDLING=1 | |
export RCT_NO_LAUNCH_PACKAGER=1 | |
set -o pipefail | |
yarn example:devcopy && yarn example:install && cd RNFBSDKExample/ios | |
xcodebuild -scheme RNFBSDKExample -workspace RNFBSDKExample.xcworkspace VALID_ARCHS=\"`uname -m`\" ONLY_ACTIVE_ARCH=YES -sdk iphonesimulator -configuration Debug | xcbeautify |