Skip to content

Commit

Permalink
Merge branch 'test-flutter-3.24' into 'main'
Browse files Browse the repository at this point in the history
CI: test Flutter 3.24.3 and Dart 3.5.3

See merge request objectbox/objectbox-dart!92
  • Loading branch information
greenrobot-team committed Oct 15, 2024
2 parents 6006737 + c8bfc08 commit 392bb30
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 46 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ permissions:

jobs:
generator:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
# Prefer running on Ubuntu over Dart Docker image
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 # v1.6.2
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # v1.6.5
with:
sdk: 3.3.0
sdk: 3.5.2
- name: Install ObjectBox C library
run: ./install.sh
run: ./install.sh --install # Install globally for generator integration tests
- name: Integration test
run: ./generator/test.sh

# make sure the init script doesn't stop working - it's not something we usually run during normal development
init-script:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
flutter-version: 3.19.1
flutter-version: 3.24.2
cache: true
- run: ./tool/init.sh

Expand All @@ -48,19 +48,19 @@ jobs:
os:
- windows-2022
- macos-13
- ubuntu-22.04
- ubuntu-24.04
sdk:
# Always include lowest supported version (see sdk key in objectbox and generator
# pubspec.yaml, but may be higher due to dependencies).
- 3.3.0
- 3.2.3
- 3.5.2
- 3.4.4
- 2.18.6
runs-on: ${{ matrix.os }}
steps:
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 # v1.6.2
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # v1.6.5
with:
sdk: ${{ matrix.sdk }}
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Generator Test
working-directory: generator
run: |
Expand Down Expand Up @@ -88,23 +88,23 @@ jobs:
matrix:
os:
- macos-13
- ubuntu-22.04
- ubuntu-24.04
- windows-2022 # Flutter 2.9 and newer need Visual Studio 2022 to build desktop.
flutter-version:
# Include lowest working version (use lowest tested Dart SDK as a guideline, see lib tests
# above; but may be higher due to dependency conflicts)
# https://docs.flutter.dev/development/tools/sdk/releases lists included Dart SDK.
- 3.19.1
- 3.24.2
- 3.7.12
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2.16.0
with:
flutter-version: ${{ matrix.flutter-version }}
cache: true
# windows-2022 defaults to Java 8, but Android Plugin requires at least 11.
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
- uses: actions/setup-java@b36c23c0d998641eff861008f374ee103c25ac73 # v4.4.0
with:
distribution: 'temurin'
java-version: '17'
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ permissions:

jobs:
analyze:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
# Prefer running on Ubuntu over Dart Docker image
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 # v1.6.2
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # v1.6.5
with:
sdk: 3.3.0
sdk: 3.5.2
- name: Get dependencies
run: |
dart pub get --directory=benchmark
Expand All @@ -43,11 +43,11 @@ jobs:
run: dart format --set-exit-if-changed --fix .

pana:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
checks: write # to publish the report
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: axel-op/dart-package-analyzer@7a6c3c66bce78d82b729a1ffef2d9458fde6c8d2 # v3
id: analysis # set an id for the current step
with:
Expand All @@ -64,15 +64,15 @@ jobs:
fi
coverage:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
checks: write # to publish the report
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
# Prefer running on Ubuntu over Dart Docker image
- uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 # v1.6.2
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 # v1.6.5
with:
sdk: 3.3.0
sdk: 3.5.2
- name: Install coverage tools
run: |
./tool/apt-install.sh lcov
Expand All @@ -96,13 +96,13 @@ jobs:
result_path: objectbox/coverage/lcov.info
min_coverage: 90
token: ${{ github.token }}
- uses: danielpalme/ReportGenerator-GitHub-Action@2a2d60ea1c7e811f54684179af6ac1ae8c1ce69a # v5.2.5
- uses: danielpalme/ReportGenerator-GitHub-Action@b7115d212c0f7814a0cb17fb43ec36983c707ccb # v5.3.10
with:
reports: 'objectbox/coverage/lcov.info'
targetdir: 'coveragereport'
reporttypes: 'HtmlInline' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
sourcedirs: 'objectbox'
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: CoverageReport # Artifact name
path: coveragereport # Directory containing files to upload
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ stages:
variables:
# Note: use specific tags as docker images may not always be pulled due to "if-not-present" pull policy.
# Thus, do not use tags like latest/beta, but check https://hub.docker.com/_/dart?tab=tags for latest.
DART_VERSION: '3.3.0'
DART_VERSION: '3.5.2'

# Make PUB_CACHE cacheable in GitLab;
# see also https://gitlab.com/gitlab-org/gitlab/-/merge_requests/77791/diffs and
Expand Down Expand Up @@ -59,21 +59,21 @@ test-generator:linux:x64:
tags: [ x64, linux, docker ]
image: dart:$DART_VERSION
script:
- ./install.sh
- ./install.sh --install # Install globally for generator integration tests
- ./generator/test.sh

# Runs generator and objectbox unit tests.
.test:
extends: .cache
stage: test
script:
- ./install.sh
# Generator tests
- cd generator
- dart pub get
- dart test
# ObjectBox tests
- cd ../objectbox_test
- ../install.sh
- dart pub get
- dart run build_runner build
# Set concurrency=1 to run only one test suite (== test file) at a time.
Expand All @@ -95,7 +95,7 @@ test-lib:linux:x64:
# pulled due to "if-not-present" pull policy. Check https://hub.docker.com/_/dart?tab=tags.
# Always include lowest supported version (see sdk key in objectbox and generator
# pubspec.yaml, but may be higher due to dependencies).
- DART_VERSION: [ '2.18.6', '3.2.3', '3.3.0' ]
- DART_VERSION: [ '2.18.6', '3.4.4', '3.5.2' ]

# Runs tests with coverage on the objectbox package.
# Note: As this requires to run tests, make sure this does not block the actual test jobs so test
Expand Down
2 changes: 1 addition & 1 deletion flutter_libs/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group 'io.objectbox.objectbox_flutter_libs'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
Expand Down
6 changes: 0 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,4 @@ cLibVersion=4.0.0
os=$(uname)
cLibArgs="$*"

# if there's no tty this is probably part of a docker build - therefore we install the c-api explicitly
if [[ "$os" != MINGW* ]] && [[ "$os" != CYGWIN* ]] && [[ "$cLibArgs" != *"--install"* ]]; then
tty -s || cLibArgs="${cLibArgs} --install"
fi


bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-c/main/download.sh) ${cLibArgs} ${cLibVersion}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
Expand Down
2 changes: 1 addition & 1 deletion sync_flutter_libs/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group 'io.objectbox.objectbox_sync_flutter_libs'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '1.7.0'
repositories {
google()
mavenCentral()
Expand Down

0 comments on commit 392bb30

Please sign in to comment.