Skip to content

Commit

Permalink
Merge branch 'main' into ni/progress-notifications
Browse files Browse the repository at this point in the history
* main:
  Add vNext Changelog header (#1717)
  [Release 3.0.0] (#1716)
  libraryVersion moved to realm_libary.dart (take 2)
  libraryVersion moved to realm_libary.dart
  Update CHANGELOG (#1715)
  Github composite action for setting up flutter on runner (#1710)
  RDART-866: kn/decimal128 web support (#1713)
  Reduce expected gain of memEquals for test stability
  Refresh after awaiting download to stabilize tests
  RDART-866: Minimal web support (#1699)
  RDART-1052: Update realm-core to v14.9.0 (#1704)
  RDART-1020: Fix writeAsync behaviour (#1666)
  RDART-999: Fix flutter test dlopen (#1623)
  RDART-1045: Expose setrlimit ios (#1700)
  RDART-962: Use xcode 15.4 (#1548)
  RDART-1039: Drop catalyst support. Flutter doesn't support it (#1696)

# Conflicts:
#	packages/realm_dart/src/realm-core
  • Loading branch information
nirinchev committed Jun 12, 2024
2 parents c3a6142 + 510a4fa commit 729c3b6
Show file tree
Hide file tree
Showing 164 changed files with 2,753 additions and 1,097 deletions.
87 changes: 87 additions & 0 deletions .github/actions/setup-runner/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Setup runner
description: Setup the runner with the necessary tools and dependencies.

inputs:
flutter-version:
description: Flutter version to use.
default: stable
cache-key:
description: Cache key to use for restoring and saving the cache.
default: ${{ hashFiles('**/pubspec.yaml') }}

runs:
using: "composite"
steps:
- name: Setup environment
# By forcing puro (and hence the pub-cache) onto the same drive as the checkout,
# we can avoid symlink issue between local and network drives on windows.
id: setup
shell: bash
run: |
export PURO_ROOT=$(dirname $GITHUB_WORKSPACE)/puro
mkdir -p $PURO_ROOT
echo $PURO_ROOT/bin >> $GITHUB_PATH
echo $PURO_ROOT/shared/pub_cache/bin/ >> $GITHUB_PATH
echo $PURO_ROOT/envs/default/flutter/bin/ >> $GITHUB_PATH
echo PURO_ROOT=$PURO_ROOT >> $GITHUB_ENV
echo PUB_CACHE=$PURO_ROOT/shared/pub_cache >> $GITHUB_ENV
echo MELOS_SDK_PATH=$PURO_ROOT/envs/default/flutter/ >> $GITHUB_ENV
echo "week=$(date +'%Y-%U')" >> $GITHUB_OUTPUT
- name: Restore cache
# TODO: Avoid skipping restore on Windows
# (see https://github.com/pingbird/puro/issues/87)
if: runner.os != 'Windows'
id: restore
uses: actions/cache/restore@v4
with:
path: ${{ env.PURO_ROOT }}
key: setup-runner-${{ runner.os }}-${{ runner.arch }}-${{ steps.setup.outputs.week }}-${{ inputs.cache-key }}
restore-keys: setup-runner-${{ runner.os }}-${{ runner.arch }}-

- name: Install puro (posix)
# See https://puro.dev/
# Skip on any cache hit (partial or full)
if: runner.os != 'Windows' && steps.restore.outputs.cache-matched-key == ''
shell: bash
run: curl -sS -o- https://puro.dev/install.sh | PURO_VERSION="1.4.6" bash

- name: Install puro (windows)
# We always install on windows, as we currently don't restore a cache (see TODO above)
if: runner.os == 'Windows' && steps.restore.outputs.cache-matched-key == ''
shell: pwsh
run: >-
Invoke-WebRequest
-Uri "https://puro.dev/builds/1.4.6/windows-x64/puro.exe"
-OutFile "$Env:PURO_ROOT";
&"$Env:PURO_ROOT\puro.exe" install-puro --promote
- name: Upgrade puro and flutter
shell: bash
run: |
puro upgrade-puro
puro use --global ${{ inputs.flutter-version }}
puro upgrade ${{ inputs.flutter-version }}
puro gc
- name: Activate melos
if: steps.restore.outputs.cache-matched-key == ''
shell: bash
run: puro pub global run melos --version || puro pub global activate melos

- name: Melos bootstrap
shell: bash
run: puro pub global run melos bootstrap

- name: Save cache
# Saving on feature branches will only benefit reruns, so we don't bother.
# Feature branches inherit the cache from the main branch anyway.
# This saves on cache storage.
if: github.ref == 'refs/heads/main' && steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{ env.PURO_ROOT }}
key: ${{ steps.restore.outputs.cache-primary-key }}
2 changes: 2 additions & 0 deletions .github/workflows/binary-combine-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:
with:
name: librealm-android-x86_64
path: packages/realm_dart/binary/android

- name: Fetch armeabi-v7a build
uses: actions/download-artifact@v4
with:
name: librealm-android-armeabi-v7a
path: packages/realm_dart/binary/android

- name: Fetch arm64-v8a build
uses: actions/download-artifact@v4
with:
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/binary-combine-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,18 @@ jobs:
with:
name: librealm-ios-device
path: binary/ios

- name: Fetch simulator build
uses: actions/download-artifact@v4
with:
name: librealm-ios-simulator
path: binary/ios
- name: Fetch catalyst build
uses: actions/download-artifact@v4
with:
name: librealm-ios-catalyst
path: binary/ios

- name: Build .xcframework
run: |
xcodebuild -create-xcframework \
-framework ./binary/ios/Release-iphoneos/realm_dart.framework \
-framework ./binary/ios/Release-iphonesimulator/realm_dart.framework \
-framework ./binary/ios/Release-maccatalyst/realm_dart.framework \
-output ./binary/ios/realm_dart.xcframework
rm -rf ./binary/ios/Release-*
Expand All @@ -48,5 +43,4 @@ jobs:
name: |
librealm-ios-device
librealm-ios-simulator
librealm-ios-catalyst
failOnError: false
8 changes: 5 additions & 3 deletions .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ jobs:
if: startsWith(matrix.build, 'android')
run: echo "ANDROID_NDK=$ANDROID_NDK_LATEST_HOME" >> $GITHUB_ENV

- name: Downgrade XCode for MacOS
if: matrix.build == 'macos'
run: sudo xcodes select 14.3.1
- name: Select XCode for MacOS
if: runner.os == 'macOS'
run: |
xcodes installed
sudo xcodes select 15.4
- name: Build
if: steps.check-cache.outputs.cache-hit != 'true'
Expand Down
Loading

0 comments on commit 729c3b6

Please sign in to comment.