Skip to content

support flutter master compile #3817

support flutter master compile

support flutter master compile #3817

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'beta' # 'master', 'beta', 'dev' or 'stable'
# flutter build need ninja.
# https://github.com/subosito/flutter-action/issues/49
- name: Patch for linux build
run: |
flutter doctor
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install libsdl2-dev
sudo apt-get install webkit2gtk-4.1
sudo apt-get install libopus-dev libogg-dev
flutter doctor
- name: Install dependencies
run: flutter pub get
- name: Verify formatting
run: dart format --set-exit-if-changed .
- name: Analyze project source
run: dart analyze
# dart_code_metrics
- name: Run dart_code_metrics
run: flutter pub run dart_code_metrics:metrics analyze lib
- run: flutter config --enable-linux-desktop
# Your project will need to have tests in test/ and a dependency on
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: flutter test
- name: Build APP
run: flutter build linux