Skip to content

Commit

Permalink
Use xcode 15.3
Browse files Browse the repository at this point in the history
Update CHANGELOG

Use Release instead of MinSIzeRel
  • Loading branch information
nielsenko committed Apr 8, 2024
1 parent 8b86cff commit 3d02b62
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 62 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-native.yml
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
- name: Select XCode for MacOS
if: matrix.build == 'macos'
run: sudo xcode-select -s /Applications/Xcode_14.0.1.app
run: |
xcodes installed
sudo xcodes select 15.3
- name: Build
if: steps.check-cache.outputs.cache-hit != 'true'
Expand Down
76 changes: 37 additions & 39 deletions .github/workflows/ci.yml
Expand Up @@ -17,39 +17,39 @@ jobs:
name: Build Windows
uses: ./.github/workflows/build-native.yml
with:
runner: windows-latest
binary: windows
build: '["windows"]'
runner: windows-latest
binary: windows
build: '["windows"]'

build-macos:
name: Build MacOS
uses: ./.github/workflows/build-native.yml
with:
runner: macos-latest
binary: macos
build: '["macos"]'
runner: macos-14
binary: macos
build: '["macos"]'

build-linux:
name: Build Linux
uses: ./.github/workflows/build-native.yml
with:
runner: ubuntu-20.04 # Building on the lowest possible Linux (Ubuntu) version for compatibility
binary: linux
build: '["linux"]'
runner: ubuntu-20.04 # Building on the lowest possible Linux (Ubuntu) version for compatibility
binary: linux
build: '["linux"]'

build-android:
name: Build Android
uses: ./.github/workflows/build-native.yml
with:
runner: ubuntu-20.04
binary: android
build: '["android-x86", "android-x86_64", "android-armeabi-v7a", "android-arm64-v8a"]'
runner: ubuntu-20.04
binary: android
build: '["android-x86", "android-x86_64", "android-armeabi-v7a", "android-arm64-v8a"]'

build-ios:
name: Build IOS
uses: ./.github/workflows/build-native.yml
with:
runner: macos-latest
runner: macos-14
binary: ios
build: '["ios-device", "ios-simulator", "ios-catalyst"]'

Expand All @@ -63,7 +63,7 @@ jobs:
needs: build-ios
uses: ./.github/workflows/binary-combine-ios.yml

# Dart jobs
# Dart jobs

deploy-cluster-dart-windows:
name: Deploy Cluster for Dart Windows
Expand All @@ -80,7 +80,6 @@ jobs:
- deploy-cluster-dart-windows
secrets: inherit
with:
os: windows
runner: windows-latest
differentiator: dw${{ github.run_id }}${{ github.run_attempt }}

Expand Down Expand Up @@ -109,8 +108,7 @@ jobs:
- deploy-cluster-dart-macos
secrets: inherit
with:
os: macos
runner: macos-latest
runner: macos-13
differentiator: dm${{ github.run_id }}${{ github.run_attempt }}

cleanup-cluster-dart-macos:
Expand Down Expand Up @@ -138,9 +136,7 @@ jobs:
- deploy-cluster-dart-macos-arm
secrets: inherit
with:
os: macos
runner: macos-14
architecture: arm
differentiator: dma${{ github.run_id }}${{ github.run_attempt }}

cleanup-cluster-dart-macos-arm:
Expand Down Expand Up @@ -168,7 +164,6 @@ jobs:
- deploy-cluster-dart-linux
secrets: inherit
with:
os: linux
runner: ubuntu-latest
differentiator: dl${{ github.run_id }}${{ github.run_attempt }}

Expand All @@ -182,7 +177,7 @@ jobs:
with:
differentiator: dl${{ github.run_id }}${{ github.run_attempt }}

# Flutter jobs
# Flutter jobs
deploy-cluster-flutter-windows:
name: Deploy Cluster for Flutter Windows
uses: ./.github/workflows/deploy-baas.yml
Expand All @@ -202,7 +197,6 @@ jobs:
runner: windows-latest
differentiator: fw${{ github.run_id }}${{ github.run_attempt }}


cleanup-cluster-flutter-windows:
name: Cleanup Cluster for Flutter Windows
uses: ./.github/workflows/terminate-baas.yml
Expand All @@ -229,7 +223,7 @@ jobs:
secrets: inherit
with:
os: macos
runner: macos-13 # workaround to: https://github.com/flutter/flutter/issues/118469 latest is still macos-12 ¯\_(ツ)_/¯
runner: macos-14
differentiator: fm${{ github.run_id }}${{ github.run_attempt }}

cleanup-cluster-flutter-macos:
Expand Down Expand Up @@ -279,7 +273,7 @@ jobs:
differentiator: fi${{ github.run_id }}${{ github.run_attempt }}

flutter-tests-ios:
runs-on: macos-latest
runs-on: macos-14
name: Flutter Tests iOS
timeout-minutes: 45
needs:
Expand All @@ -296,7 +290,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: "recursive"

- name: Select XCode for MacOS
run: |
xcodes installed
sudo xcodes select 15.3
- name: Enable ccache
run: echo "PATH=/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
Expand All @@ -310,7 +309,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"

- name: Setup Melos
run: |
Expand All @@ -323,9 +322,9 @@ jobs:
- name: Launch Simulator
uses: futureware-tech/simulator-action@v3
with:
model: 'iPhone SE (3rd generation)'
os: 'iOS'
os_version: '>= 14.0'
model: "iPhone SE (3rd generation)"
os: "iOS"
os_version: ">= 14.0"

- name: Run tests on iOS Simulator
run: |
Expand Down Expand Up @@ -380,7 +379,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: "recursive"

- name: Enable KVM
run: |
Expand All @@ -394,7 +393,7 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
distribution: "temurin"
java-version: 11

- name: Fetch artifacts
Expand All @@ -406,7 +405,7 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"

- name: Setup Melos
run: |
Expand All @@ -417,7 +416,7 @@ jobs:
run: dart pub get

# Hack to free up space on the runner to ensure we have enough diskspace to run the emulator
- name: Remove unnecessary files (dotnet, etc.)
- name: Remove unnecessary files (dotnet, etc.)
run: |
sudo rm -rf /usr/share/dotnet
Expand Down Expand Up @@ -466,7 +465,6 @@ jobs:
only-summary: true
working-directory: packages/realm/tests


cleanup-cluster-flutter-android:
name: Cleanup Cluster for Flutter Android
uses: ./.github/workflows/terminate-baas.yml
Expand All @@ -477,7 +475,7 @@ jobs:
with:
differentiator: fa${{ github.run_id }}${{ github.run_attempt }}

# Generator jobs
# Generator jobs

generator:
strategy:
Expand All @@ -497,12 +495,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
submodules: "recursive"

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"

- name: Setup Melos
run: |
Expand Down Expand Up @@ -578,7 +576,7 @@ jobs:
runs-on: ubuntu-latest
if: always() && github.ref == 'refs/heads/main'
steps:
# Run this action to set env.WORKFLOW_CONCLUSION
# Run this action to set env.WORKFLOW_CONCLUSION
- uses: technote-space/workflow-conclusion-action@45ce8e0eb155657ab8ccf346ade734257fd196a5

- uses: act10ns/slack@ed1309ab9862e57e9e583e51c7889486b9a00b0f
Expand All @@ -587,7 +585,7 @@ jobs:
with:
status: ${{ env.WORKFLOW_CONCLUSION }}
webhook-url: ${{ secrets.SLACK_DART_WEBHOOK }}
channel: '#realm-github-dart'
channel: "#realm-github-dart"
message: |
*<https://github.com/realm/realm-dart/actions/runs/${{ github.run_id }}/attempts/${{ github.run_attempt }}|_{{workflow}}_ run id: ${{ github.run_id }} has status _{{jobStatus}}_ >*
<{{refUrl}}|`{{ref}}` - {{description}}>
Expand Down
32 changes: 14 additions & 18 deletions .github/workflows/dart-desktop-tests.yml
Expand Up @@ -3,18 +3,10 @@ name: Dart desktop tests
on:
workflow_call:
inputs:
os:
description: OS to execute on.
required: true
type: string
runner:
description: GitHub runner image to execute on.
required: true
type: string
architecture:
description: Architecture to execute on.
required: false
type: string
differentiator:
description: Differentiator for the BaaS container.
required: true
Expand All @@ -28,7 +20,7 @@ env:
jobs:
dart-tests:
runs-on: ${{ inputs.runner }}
name: Dart tests on ${{inputs.os }} ${{ inputs.architecture }}
name: Dart tests on ${{ inputs.runner }}
timeout-minutes: 45

steps:
Expand All @@ -37,17 +29,21 @@ jobs:
with:
submodules: false

- name: Set RUNNER_OS
# there is no such thing as ${{ tolower(runner.os) }}, hence this abomination ¯\_(ツ)_/¯
run: echo ${{ runner.os }} | awk '{print "RUNNER_OS=" tolower($0)}' >> $GITHUB_ENV
shell: bash

- name: Fetch artifacts
uses: actions/download-artifact@v4
with:
name: librealm-${{ inputs.os }}
path: packages/realm_dart/binary/${{ inputs.os }}
name: librealm-${{ env.RUNNER_OS }}
path: packages/realm_dart/binary/${{ env.RUNNER_OS }}

- name : Setup Dart SDK
- name: Setup Dart SDK
uses: dart-lang/setup-dart@main
with:
sdk: stable
architecture: ${{ inputs.architecture == 'arm' && 'arm64' || 'x64'}}

- name: Setup Melos
run: |
Expand All @@ -57,17 +53,17 @@ jobs:
- name: Bump ulimit on macos
run: ulimit -n 10240
if: ${{ contains(inputs.os, 'macos') }}
if: ${{ contains(runner.os, 'macos') }}

- name: Run tests
run: ${{ inputs.architecture == 'arm' && 'arch -arm64 ' || '' }}melos test:unit
- name: Run tests ${{ runner.name }} ${{ runner.arch }}
run: melos test:unit

# TODO: Publish all reports
- name: Publish Test Report
uses: dorny/test-reporter@v1.8.0
if: success() || failure()
with:
name: Test Results Dart ${{ inputs.os }} ${{ inputs.architecture }}
name: Test Results Dart ${{ runner.name }} ${{ runner.arch }}
path: test-results.json
reporter: dart-json
only-summary: true
Expand All @@ -89,4 +85,4 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: realm_dart
path-to-lcov: ./coverage/lcov.info
parallel: true
parallel: true
3 changes: 2 additions & 1 deletion CHANGELOG.md
Expand Up @@ -13,6 +13,7 @@

### Internal
* Using Core 14.4.1.
* Native library build with XCode 15 for macOS and iOS.

## 2.0.0 (2024-03-20)

Expand Down Expand Up @@ -51,7 +52,7 @@
@override
String toString() => 'Stuff{id: $id}';
}
final realm = Realm(Configuration.local([Stuff.schema]));
void main(List<String> arguments) {
final s = realm.write(() => realm.add(Stuff(1), update: true));
Expand Down
2 changes: 1 addition & 1 deletion packages/realm_dart/CMakePresets.json
Expand Up @@ -168,7 +168,7 @@
"configurePreset": "macos",
"nativeToolOptions": [
"-destination",
"platform=macOS"
"generic/platform=macOS"
],
"configuration": "Debug"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/realm_dart/scripts/build-macos.sh
Expand Up @@ -7,4 +7,4 @@ set -o pipefail
cd "$(dirname "$0")/.."

cmake --preset macos
cmake --build --preset macos --config MinSizeRel -- -destination "generic/platform=macOS"
cmake --build --preset macos --config Release -- -destination "generic/platform=macOS"

0 comments on commit 3d02b62

Please sign in to comment.