Skip to content

Commit

Permalink
Merge branch 'master' into ni/progress-notifications
Browse files Browse the repository at this point in the history
* master:
  RCOCOA-2305: Update base url to point to services.cloud.mongodb.com (#8537)
  Update docs URL (#8538)
  RCOCOA-2310: Fix a crash when receiving 401/403 when opening a watch stream (#8536)
  Add core version to build-binaries workflow (#8525)
  Add an empty changelog section
  Upgrade to core 14.4.1 (#8526)
  Release v10.49.0
  Upgrade to core 14 (#8496)
  RCOCOA-2308: Add GHA workflow for core prebuilds (#8517)
  Release 10.48.1
  Add NSPrivacyAccessedAPICategoryDiskSpace to the privacy manifest (#8511)
  🔄 Synced file(s) with realm/ci-actions (#8520)
  Add build-binaries workflow (#8515)
  Only commit the changelog in the add empty changelog release step (#8505)
  Release 10.48.0
  Introduce `_customRealmProperties()` to all Realm Objects to allow for client-generated RLMProperties (via Swift Macros) (#8490)
  Update packaging for Xcode 15.3 (#8502)

# Conflicts:
#	Realm/RLMAsyncTask.mm
#	Realm/RLMSyncSession.mm
  • Loading branch information
nirinchev committed Apr 10, 2024
2 parents c7ecd1c + 2f0274f commit 62e9dcf
Show file tree
Hide file tree
Showing 51 changed files with 890 additions and 309 deletions.
121 changes: 121 additions & 0 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Build Core binaries
on:
workflow_dispatch:
inputs:
core-version:
type: string
required: false
default: ''
description: Core version to use to generate the binaries. It should either be a tag or the version returned by (git describe). If not provided, the version in dependencies.list will be used.

jobs:
build-packages:
runs-on: macos-14
name: Build Core ${{ inputs.core-version }} for ${{ matrix.target }}
outputs:
core-version: ${{ steps.get-core-version.outputs.version }}
strategy:
matrix:
target: [macosx, iphoneos, iphonesimulator, appletvos, appletvsimulator, watchos, watchsimulator, maccatalyst]
xcode: ["14.3.1"]
include:
- target: xros
xcode: "15.2.0"
- target: xrsimulator
xcode: "15.2.0"
steps:
- uses: actions/checkout@v4

- name: Switch to Xcode ${{ matrix.xcode }}
uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: ${{ matrix.xcode }}

- name: Get Core Version
id: get-core-version
run: |
REALM_CORE_VERSION=${{ inputs.core-version }}
if [[ -z $REALM_CORE_VERSION ]]; then
REALM_CORE_VERSION=$(sed -n 's/^REALM_CORE_VERSION=\(.*\)$/\1/p' dependencies.list)
fi
echo "version=$REALM_CORE_VERSION" >> "$GITHUB_OUTPUT"
- name: Clone Core
uses: actions/checkout@v4
with:
repository: realm/realm-core
path: core
submodules: recursive
fetch-depth: 0
fetch-tags: true

- name: Checkout Core@${{ steps.get-core-version.outputs.version }}
run: git checkout ${{ steps.get-core-version.outputs.version }} --recurse-submodules -f
working-directory: core

- name: Build for ${{ matrix.target }}
run: sh tools/${{ matrix.target != 'macosx' && format('build-apple-device.sh -p {0} -c Release', matrix.target) || 'build-cocoa.sh -bm' }} -v ${{ steps.get-core-version.outputs.version }}
working-directory: core

- name: Archive binaries
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.target }}
path: core/realm-Release-*.tar.gz

combine-xcframework:
runs-on: macos-14
name: Publish xcframework for Core ${{ inputs.core-version }}
environment:
name: Prebuilds
url: ${{ steps.upload-to-s3.outputs.url }}
needs:
- build-packages
steps:
- uses: actions/checkout@v4

- name: Clone Core
uses: actions/checkout@v4
with:
repository: realm/realm-core
path: core
fetch-depth: 0
fetch-tags: true

- name: Checkout Core@${{ needs.build-packages.outputs.core-version }}
run: git checkout ${{ needs.build-packages.outputs.core-version }}
working-directory: core

- name: Download binaries
uses: actions/download-artifact@v4
with:
path: core

- name: Combine xcframework
run: |
mv binaries-*/* ./
sh tools/build-cocoa.sh -v ${{ needs.build-packages.outputs.core-version }}
mkdir ../release
mv realm-monorepo-xcframework-${{ needs.build-packages.outputs.core-version }}.tar.xz ../release/
working-directory: core

- name: Archive xcframework
uses: actions/upload-artifact@v4
with:
name: Realm-${{ needs.build-packages.outputs.core-version }}.xcframework.tar.xz
path: release

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_S3_SECRET_KEY }}
aws-region: us-east-1

- name: Upload release folder to S3
id: upload-to-s3
run: |
s3_folder="static.realm.io/downloads/core/${{ needs.build-packages.outputs.core-version }}/cocoa"
aws s3 sync --acl public-read . "s3://$s3_folder"
echo "url=https://$s3_folder/realm-monorepo-xcframework-${{ needs.build-packages.outputs.core-version }}.tar.xz" >> $GITHUB_OUTPUT
working-directory: release
24 changes: 24 additions & 0 deletions .github/workflows/lock-threads.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: 'Lock Threads'

on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:

permissions:
issues: write
pull-requests: write
discussions: write

concurrency:
group: lock-threads

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v5
with:
issue-inactive-days: 30
pr-inactive-days: 30
log-output: true
28 changes: 16 additions & 12 deletions .github/workflows/master-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ on:
- "master"
- "release/**"
env:
XCODE_VERSION: "['14.2', '14.3.1', '15.1', '15.2']"
XCODE_VERSION: "['14.2', '14.3.1', '15.1', '15.2', '15.3']"
# Github actions doesn't have Xcode 15.3 on any runners yet, so we can't run
# installation tests for it
XCODE_TEST_VERSIONS: "['14.2', '14.3.1', '15.1', '15.2']"
PLATFORM: "['ios', 'osx', 'watchos', 'tvos', 'catalyst', 'visionos']"
BUILD_PLATFORM: "['ios', 'iossimulator', 'osx', 'watchos', 'watchossimulator', 'tvos', 'tvossimulator', 'catalyst', 'visionos', 'visionossimulator']"
DOC_VERSION: '15.2'
Expand All @@ -31,6 +34,7 @@ jobs:
needs: [cleanup]
outputs:
XCODE_VERSIONS_MATRIX: ${{ env.XCODE_VERSION }}
XCODE_TEST_VERSIONS_MATRIX: ${{ env.XCODE_TEST_VERSIONS }}
BUILD_PLATFORM_MATRIX: ${{ env.BUILD_PLATFORM }}
PLATFORM_MATRIX: ${{ env.PLATFORM }}
VERSION: ${{ steps.get-version.outputs.VERSION }}
Expand All @@ -47,7 +51,7 @@ jobs:
version="$(sed -n 's/^VERSION=\(.*\)$/\1/p' "${GITHUB_WORKSPACE}/dependencies.list")"
echo "VERSION=$version" >> $GITHUB_OUTPUT
build-docs:
runs-on: macos-13
runs-on: macos-14
name: Package docs
needs: prepare
steps:
Expand All @@ -65,7 +69,7 @@ jobs:
name: realm-docs
path: docs/realm-docs.zip
build-examples:
runs-on: macos-13
runs-on: macos-14
name: Package examples
needs: prepare
steps:
Expand All @@ -78,7 +82,7 @@ jobs:
name: realm-examples
path: realm-examples.zip
build-product: # Creates framework for each platform, xcode version, target and configuration
runs-on: macos-13
runs-on: macos-14
name: Package framework
needs: prepare
strategy:
Expand Down Expand Up @@ -177,7 +181,7 @@ jobs:
path: xcode-cloud-build-${{ steps.build-run.outputs.BUILD_RUN_ID }}.zip
compression-level: 0
package-xcframework-platform: # Creates xcframework for each platform and xcode version
runs-on: macos-13
runs-on: macos-14
name: Package xcframework for platform
needs: [build-product, prepare]
strategy:
Expand All @@ -194,7 +198,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Select Xcode Version
run: sudo xcode-select -switch /Applications/Xcode_${{ matrix.xcode-version }}.app
run: sudo xcode-select -switch /Applications/Xcode_${{ env.RELEASE_VERSION }}.app
- name: Restore frameworks
uses: actions/download-artifact@v4
with:
Expand All @@ -207,7 +211,7 @@ jobs:
name: realm-${{ matrix.platform }}-${{ matrix.xcode-version }}
path: realm-${{ matrix.platform }}-${{ matrix.xcode-version }}.zip
package-release: # Creates xcframework for each platform and xcode version
runs-on: macos-13
runs-on: macos-14
name: Package release file
needs: [package-xcframework-platform, prepare]
steps:
Expand All @@ -231,7 +235,7 @@ jobs:
name: realm-swift-${{ needs.prepare.outputs.VERSION }}
path: pkg/realm-swift-${{ needs.prepare.outputs.VERSION }}.zip
test-package-examples:
runs-on: macos-13
runs-on: macos-14
name: Test examples
needs: [package-release, prepare]
steps:
Expand All @@ -245,7 +249,7 @@ jobs:
- name: Test examples
run: sh -x build.sh release-test-examples
test-ios-static:
runs-on: macos-13
runs-on: macos-14
name: Run tests on iOS with configuration Static
needs: package-release
steps:
Expand All @@ -255,7 +259,7 @@ jobs:
- name: Test ios static
run: sh -x build.sh test-ios-static
test-osx-static:
runs-on: macos-13
runs-on: macos-14
name: Run tests on macOS
needs: package-release
steps:
Expand All @@ -267,7 +271,7 @@ jobs:
export REALM_DISABLE_METADATA_ENCRYPTION=1
sh -x build.sh test-osx
test-installation:
runs-on: macos-13
runs-on: macos-14
name: Run installation test
needs: [package-release, prepare]
strategy:
Expand Down Expand Up @@ -317,7 +321,7 @@ jobs:
PLATFORM: 'osx'
strategy:
matrix:
xcode-version: ${{ fromJSON(needs.prepare.outputs.XCODE_VERSIONS_MATRIX) }}
xcode-version: ${{ fromJSON(needs.prepare.outputs.XCODE_TEST_VERSIONS_MATRIX) }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish release
on: workflow_dispatch
env:
XCODE_VERSION: "['14.2', '14.3.1', '15.1', '15.2']"
TEST_XCODE_VERSION: '15.1'
XCODE_VERSION: "['14.2', '14.3.1', '15.1', '15.2', '15.3']"
TEST_XCODE_VERSION: '15.2'
jobs:
prepare:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
- run: brew install s3cmd
- run: bundle exec ./build.sh publish-update-checker
test-installation:
runs-on: macos-13
runs-on: macos-14
name: Run installation test for ${{ matrix.platform }}, ${{ matrix.installation }} and ${{ matrix.linkage }}
needs: [create-release, prepare, publish-cocoapods]
strategy:
Expand Down Expand Up @@ -168,13 +168,11 @@ jobs:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Add template to changelog
run: |
sh build.sh add-empty-changelog
- name: Auto-commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: 'CHANGELOG.md'
commit_message: 'Add an empty changelog section'

0 comments on commit 62e9dcf

Please sign in to comment.