-
Notifications
You must be signed in to change notification settings - Fork 861
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: rework CI to build on all platforms, use flutter analyze commenter, omit emojis, separate main.yml into checks.yml and tests.yml * fix: replace universal_html with web for flutter_quill_extensions, minor changes to CI step names * chore(example): remove universal_html and universal_io transitive dependencies * ci: upload Android APK to GitHub releases
- Loading branch information
Showing
21 changed files
with
451 additions
and
237 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,107 @@ | ||
# TODO: Update the workflow to build on Android, iOS, desktop (macOS and Windows) instead of just Linux and Web | ||
|
||
name: 🏗️ Build the example | ||
name: Build the example | ||
|
||
on: | ||
pull_request: | ||
branches: [master, dev] | ||
|
||
jobs: | ||
build_linux: | ||
name: 🐧 Build Linux and Web Apps | ||
# Build the Linux, Android and web apps on Linux | ||
linux-web-android: | ||
name: Linux, Android and Web Apps | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: 📦 Checkout repository | ||
uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
cache: true | ||
|
||
- name: Verify Flutter installation | ||
run: flutter --version | ||
|
||
- name: Install flutter_quill dependencies | ||
run: flutter pub get | ||
|
||
- name: Install example dependencies | ||
run: flutter pub get -C example | ||
|
||
- name: Build the Web app | ||
run: flutter build web --release --dart-define=CI=true | ||
working-directory: ./example | ||
|
||
- name: Build the Web app with WebAssembly | ||
run: flutter build web --release --wasm --dart-define=CI=true | ||
working-directory: ./example | ||
|
||
- name: Install Linux dependencies | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa | ||
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev | ||
- name: Build the Linux app | ||
run: flutter build linux --release --dart-define=CI=true | ||
working-directory: ./example | ||
|
||
- name: Build the Android app | ||
run: flutter build appbundle --release --dart-define=CI=true | ||
working-directory: ./example | ||
|
||
macos: | ||
name: iOS and macOS apps | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: 🛠️ Set up Flutter | ||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
channel: stable | ||
cache: true | ||
|
||
- name: 🔍 Verify Flutter installation | ||
- name: Verify Flutter installation | ||
run: flutter --version | ||
|
||
- name: 📥 Install Flutter dependencies | ||
- name: Install flutter_quill dependencies | ||
run: flutter pub get | ||
|
||
- name: 🌐 Build Flutter Web Application | ||
run: flutter build web --release --verbose --dart-define=CI=true | ||
- name: Install example dependencies | ||
run: flutter pub get -C example | ||
|
||
- name: Build the iOS app | ||
run: flutter build ios --no-codesign --release --dart-define=CI=true | ||
working-directory: ./example | ||
|
||
- name: Build the macOS app | ||
run: flutter build macos --release --dart-define=CI=true | ||
working-directory: ./example | ||
|
||
# TODO: Update the CI to not upgrade all the packages to save some time | ||
- name: 🔄 Update and Upgrade APT Packages | ||
run: sudo apt update -y && sudo apt upgrade -y | ||
windows: | ||
name: Windows app | ||
runs-on: windows-latest | ||
|
||
- name: 🛠️ Install Flutter Linux Prerequisites | ||
run: sudo apt install -y curl git unzip xz-utils zip libglu1-mesa | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
cache: true | ||
|
||
- name: Verify Flutter installation | ||
run: flutter --version | ||
|
||
- name: Install flutter_quill dependencies | ||
run: flutter pub get | ||
|
||
- name: 🧩 Install Flutter Linux Desktop Dependencies | ||
run: sudo apt install -y clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev | ||
- name: Install example dependencies | ||
run: flutter pub get -C example | ||
|
||
- name: 🐧 Build Flutter Linux Desktop Application | ||
run: flutter build linux --release --verbose --dart-define=CI=true | ||
- name: Build the Windows app | ||
run: flutter build windows --release --dart-define=CI=true | ||
working-directory: ./example |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Code Quality Checks | ||
|
||
on: | ||
push: | ||
branches: [master, dev] | ||
pull_request: | ||
branches: [master, dev] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
cache: true | ||
|
||
- name: Verify Flutter installation | ||
run: flutter --version | ||
|
||
- name: Install Flutter dependencies | ||
run: flutter pub get | ||
|
||
- name: Install flutter_quill_extensions dependencies | ||
run: flutter pub get -C flutter_quill_extensions | ||
|
||
- name: Install flutter_quill_test dependencies | ||
run: flutter pub get -C flutter_quill_test | ||
|
||
- name: Perform Flutter Analysis | ||
run: flutter analyze | ||
|
||
- name: Check Dart code formatting | ||
run: dart format --set-exit-if-changed . | ||
|
||
- name: Preview Dart proposed changes | ||
run: dart fix --dry-run | ||
|
||
- name: Check if the flutter_quill package is ready for publishing | ||
run: flutter pub publish --dry-run | ||
|
||
- name: Check if the flutter_quill_extensions is ready for publishing | ||
run: flutter pub publish --dry-run -C flutter_quill_extensions | ||
|
||
- name: Check the translations | ||
run: dart ./scripts/translations_check.dart | ||
|
||
- name: Install cider | ||
run: dart pub global activate cider | ||
|
||
# TODO: Need a more strict way to validate the format that uses https://keepachangelog.com/en/1.1.0/ | ||
- name: Validate CHANGELOG.md format | ||
run: $HOME/.pub-cache/bin/cider list CHANGELOG.md |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: PR Checks | ||
|
||
on: | ||
pull_request: | ||
branches: [master, dev] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: stable | ||
cache: true | ||
|
||
- name: Verify Flutter installation | ||
run: flutter --version | ||
|
||
- name: Install Flutter dependencies | ||
run: flutter pub get | ||
|
||
- name: Install flutter_quill_extensions dependencies | ||
run: flutter pub get -C flutter_quill_extensions | ||
|
||
- name: Install flutter_quill_test dependencies | ||
run: flutter pub get -C flutter_quill_test | ||
|
||
- name: Perform Flutter Analysis | ||
run: flutter analyze --write=flutter_analyze.log | ||
|
||
- if: ${{ !cancelled() }} | ||
name: Run Flutter Analyze Commenter | ||
uses: yorifuji/flutter-analyze-commenter@v1 | ||
with: | ||
analyze-log: flutter_analyze.log | ||
verbose: false |
Oops, something went wrong.