Skip to content

Commit

Permalink
Try a different strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
takameyer committed Jan 30, 2024
1 parent 121d116 commit d6f1a03
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/pr-realm-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
run: npm ci --ignore-scripts
- name: Bundle all packages
run: npm run bundle
- name: Generate JSI
if: ${{ (matrix.variant.os == 'ios') && (matrix.variant.os == 'android') }}
run: |
npm run bindgen:generate:jsi --workspace realm
# Due to a limitation in upload-artifact a redundant file is needed to force
# preserving paths (https://github.com/actions/upload-artifact/issues/174)
- name: Upload dist artifacts
Expand All @@ -48,6 +52,7 @@ jobs:
path: |
README.md
packages/*/dist
packages/realm/binding/jsi/jsi_init.cpp
build:
name: Build for ${{ matrix.variant.os }} ${{ matrix.variant.arch }}
Expand Down Expand Up @@ -187,25 +192,20 @@ jobs:
if: ${{ (matrix.variant.os != 'ios') && (matrix.variant.os != 'android') }}
run: npm run build:node:prebuild:${{matrix.variant.arch}} --workspace realm

- name: Generate JSI
if: ${{ (matrix.variant.os == 'ios') && (matrix.variant.os == 'android') }}
run: |
npm run bindgen:generate:jsi --workspace realm
# build the c++ library for Android
- name: Build Android
if: ${{ (matrix.variant.os == 'android') }}
run: npm run build:android --workspace realm -- --arch=${{matrix.variant.arch}}

# Due to a limitation in upload-artifact a redundant file is needed to force
# preserving paths (https://github.com/actions/upload-artifact/issues/174)
- name: Upload prebuild artifact
uses: actions/upload-artifact@v3
with:
name: realm-js-prebuilds
path: |
README.md
${{ matrix.variant.artifact-path }}
# - name: Upload prebuild artifact
# uses: actions/upload-artifact@v3
# with:
# name: realm-js-prebuilds
# path: |
# README.md
# ${{ matrix.variant.artifact-path }}

integration-tests:
name: Test ${{ matrix.variant.environment }} on ${{ matrix.variant.os }} (${{matrix.variant.target}})
Expand Down Expand Up @@ -311,10 +311,10 @@ jobs:
with:
name: realm-js-bundles

- name: Download prebuilds
uses: actions/download-artifact@v3
with:
name: realm-js-prebuilds
# - name: Download prebuilds
# uses: actions/download-artifact@v3
# with:
# name: realm-js-prebuilds

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -356,7 +356,9 @@ jobs:
env:
MOCHA_REMOTE_CONTEXT: ${{ steps.mocha-env.outputs.context }}
timeout-minutes: 75
run: npm run ${{ matrix.variant.target}} --prefix integration-tests/environments/${{ matrix.variant.environment }}
working-directory: ./integration-tests/environments/react-native
#run: npm run ${{ matrix.variant.target}} --prefix integration-tests/environments/${{ matrix.variant.environment }}
run: npx react-native run-ios --no-packager

- name: Setup Java Gradle cache for android test app
if: ${{ (matrix.variant.os == 'android') }}
Expand Down

0 comments on commit d6f1a03

Please sign in to comment.