|
1 |
| -# TODO: Update the workflow to build on Android, iOS, desktop (macOS and Windows) instead of just Linux and Web |
2 |
| - |
3 |
| -name: 🏗️ Build the example |
| 1 | +name: Build the example |
4 | 2 |
|
5 | 3 | on:
|
6 | 4 | pull_request:
|
7 | 5 | branches: [master, dev]
|
8 | 6 |
|
9 | 7 | jobs:
|
10 |
| - build_linux: |
11 |
| - name: 🐧 Build Linux and Web Apps |
| 8 | + # Build the Linux, Android and web apps on Linux |
| 9 | + linux-web-android: |
| 10 | + name: Linux, Android and Web Apps |
12 | 11 | runs-on: ubuntu-latest
|
13 | 12 |
|
14 | 13 | steps:
|
15 |
| - - name: 📦 Checkout repository |
16 |
| - uses: actions/checkout@v4 |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + |
| 16 | + - name: Set up Flutter |
| 17 | + uses: subosito/flutter-action@v2 |
| 18 | + with: |
| 19 | + channel: stable |
| 20 | + cache: true |
| 21 | + |
| 22 | + - name: Verify Flutter installation |
| 23 | + run: flutter --version |
| 24 | + |
| 25 | + - name: Install flutter_quill dependencies |
| 26 | + run: flutter pub get |
| 27 | + |
| 28 | + - name: Install example dependencies |
| 29 | + run: flutter pub get -C example |
| 30 | + |
| 31 | + - name: Build the Web app |
| 32 | + run: flutter build web --release --dart-define=CI=true |
| 33 | + working-directory: ./example |
| 34 | + |
| 35 | + - name: Build the Web app with WebAssembly |
| 36 | + run: flutter build web --release --wasm --dart-define=CI=true |
| 37 | + working-directory: ./example |
| 38 | + |
| 39 | + - name: Install Linux dependencies |
| 40 | + run: | |
| 41 | + sudo apt-get update -y |
| 42 | + sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa |
| 43 | + sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev |
| 44 | +
|
| 45 | + - name: Build the Linux app |
| 46 | + run: flutter build linux --release --dart-define=CI=true |
| 47 | + working-directory: ./example |
| 48 | + |
| 49 | + - name: Build the Android app |
| 50 | + run: flutter build appbundle --release --dart-define=CI=true |
| 51 | + working-directory: ./example |
| 52 | + |
| 53 | + macos: |
| 54 | + name: iOS and macOS apps |
| 55 | + runs-on: macos-latest |
| 56 | + |
| 57 | + steps: |
| 58 | + - uses: actions/checkout@v4 |
17 | 59 |
|
18 |
| - - name: 🛠️ Set up Flutter |
| 60 | + - name: Set up Flutter |
19 | 61 | uses: subosito/flutter-action@v2
|
20 | 62 | with:
|
21 |
| - channel: 'stable' |
| 63 | + channel: stable |
22 | 64 | cache: true
|
23 | 65 |
|
24 |
| - - name: 🔍 Verify Flutter installation |
| 66 | + - name: Verify Flutter installation |
25 | 67 | run: flutter --version
|
26 | 68 |
|
27 |
| - - name: 📥 Install Flutter dependencies |
| 69 | + - name: Install flutter_quill dependencies |
28 | 70 | run: flutter pub get
|
29 | 71 |
|
30 |
| - - name: 🌐 Build Flutter Web Application |
31 |
| - run: flutter build web --release --verbose --dart-define=CI=true |
| 72 | + - name: Install example dependencies |
| 73 | + run: flutter pub get -C example |
| 74 | + |
| 75 | + - name: Build the iOS app |
| 76 | + run: flutter build ios --no-codesign --release --dart-define=CI=true |
| 77 | + working-directory: ./example |
| 78 | + |
| 79 | + - name: Build the macOS app |
| 80 | + run: flutter build macos --release --dart-define=CI=true |
32 | 81 | working-directory: ./example
|
33 | 82 |
|
34 |
| - # TODO: Update the CI to not upgrade all the packages to save some time |
35 |
| - - name: 🔄 Update and Upgrade APT Packages |
36 |
| - run: sudo apt update -y && sudo apt upgrade -y |
| 83 | + windows: |
| 84 | + name: Windows app |
| 85 | + runs-on: windows-latest |
37 | 86 |
|
38 |
| - - name: 🛠️ Install Flutter Linux Prerequisites |
39 |
| - run: sudo apt install -y curl git unzip xz-utils zip libglu1-mesa |
| 87 | + steps: |
| 88 | + - uses: actions/checkout@v4 |
| 89 | + |
| 90 | + - name: Set up Flutter |
| 91 | + uses: subosito/flutter-action@v2 |
| 92 | + with: |
| 93 | + channel: stable |
| 94 | + cache: true |
| 95 | + |
| 96 | + - name: Verify Flutter installation |
| 97 | + run: flutter --version |
| 98 | + |
| 99 | + - name: Install flutter_quill dependencies |
| 100 | + run: flutter pub get |
40 | 101 |
|
41 |
| - - name: 🧩 Install Flutter Linux Desktop Dependencies |
42 |
| - run: sudo apt install -y clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev |
| 102 | + - name: Install example dependencies |
| 103 | + run: flutter pub get -C example |
43 | 104 |
|
44 |
| - - name: 🐧 Build Flutter Linux Desktop Application |
45 |
| - run: flutter build linux --release --verbose --dart-define=CI=true |
| 105 | + - name: Build the Windows app |
| 106 | + run: flutter build windows --release --dart-define=CI=true |
46 | 107 | working-directory: ./example
|
0 commit comments