feat: always build in release mode by default #78
Workflow file for this run
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
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
name: Check and Lint | |
jobs: | |
check_and_lint: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 #v2.7.0 | |
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # 2.16.0 | |
with: | |
channel: "main" | |
- name: Set up Java | |
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 #v4.2.1 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
- name: Install GTK | |
if: (matrix.os == 'ubuntu-latest') | |
run: sudo apt-get update && sudo apt-get install libgtk-3-dev | |
- name: Install ninja-build | |
if: (matrix.os == 'ubuntu-latest') | |
run: sudo apt-get update && sudo apt-get install ninja-build | |
- name: enable native assets | |
run: flutter config --enable-native-assets | |
- name: install melos | |
run: dart pub global activate melos | |
- name: melos boostrap | |
run: melos bootstrap | |
- name: flutter format | |
run: melos exec -c 1 dart format . --output=none --set-exit-if-changed | |
- name: flutter analyze | |
run: melos exec -c 1 flutter analyze | |
- name: native doctor | |
run: dart native_doctor/bin/native_doctor.dart --path example/flutter_package/example --yes | |
- name: futter test | |
run: melos exec -c 1 flutter test | |
# Run Dart test directly for the package (not through flutter) | |
- name: dart test | |
run: dart --enable-experiment=native-assets test | |
working-directory: example/dart_package | |
- name: dart run | |
run: dart --enable-experiment=native-assets run bin/dart_package_example.dart | |
working-directory: example/dart_package |