Merge branch '90-android-plugin-8-compat' into 'main' #1774
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
# Avoid duplicate builds for pull requests, allow manual trigger. | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
# Minimal access by default | |
permissions: | |
contents: read | |
jobs: | |
generator: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
# Prefer running on Ubuntu over Dart Docker image | |
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1.6.0 | |
with: | |
sdk: 3.1.3 | |
- name: Install ObjectBox C-API | |
run: ./install.sh | |
- 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 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: subosito/flutter-action@cc97e1648fff6ca5cc647fa67f47e70f7895510b # v2.11.0 | |
with: | |
flutter-version: 3.13.6 | |
cache: true | |
- run: ./tool/init.sh | |
lib: | |
strategy: | |
fail-fast: false # To see all Dart SDKs that fail, also sometimes with more helpful errors. | |
matrix: | |
os: | |
- windows-2022 | |
- macos-13 | |
- ubuntu-22.04 | |
sdk: | |
# Always include lowest supported version (see sdk key in objectbox and generator | |
# pubspec.yaml, but may be higher due to dependencies). | |
- 3.1.3 | |
- 3.0.3 | |
- 2.18.6 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d # v1.6.0 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Generator Test | |
working-directory: generator | |
run: | | |
../tool/pub.sh get | |
../tool/pub.sh run test | |
- name: Install ObjectBox C-API | |
working-directory: objectbox_test | |
run: ../install.sh | |
- name: Library Test | |
working-directory: objectbox_test | |
run: | | |
../tool/pub.sh get | |
../tool/pub.sh run build_runner build | |
../tool/pub.sh run test | |
flutter-integration-test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-13 | |
- ubuntu-22.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.13.6 | |
- 3.7.12 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: subosito/flutter-action@cc97e1648fff6ca5cc647fa67f47e70f7895510b # v2.11.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@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- run: echo $PATH | |
- run: flutter --version | |
# https://docs.flutter.dev/desktop#additional-linux-requirements | |
- if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
run: ./tool/apt-install.sh ninja-build pkg-config libgtk-3-dev | |
- run: make integration-test | |
working-directory: objectbox |