|
80 | 80 | - name: Run tests |
81 | 81 | run: dart pub global run melos run test |
82 | 82 |
|
83 | | - build: |
84 | | - name: Build (${{ matrix.os }}) |
| 83 | + build_cnativeapi: |
| 84 | + name: Build cnativeapi example (${{ matrix.os }}) |
85 | 85 | runs-on: ${{ matrix.os }} |
86 | 86 | needs: [lint, test] |
87 | 87 | strategy: |
@@ -115,35 +115,108 @@ jobs: |
115 | 115 | - name: Bootstrap melos |
116 | 116 | run: dart pub global run melos bootstrap |
117 | 117 |
|
118 | | - - name: Build cnativeapi example Linux |
| 118 | + - name: Setup Java for Android |
| 119 | + if: matrix.os == 'ubuntu-latest' |
| 120 | + uses: actions/setup-java@v4 |
| 121 | + with: |
| 122 | + distribution: 'temurin' |
| 123 | + java-version: '17' |
| 124 | + |
| 125 | + - name: Build cnativeapi example Android |
119 | 126 | if: matrix.os == 'ubuntu-latest' |
120 | 127 | run: | |
121 | 128 | cd packages/cnativeapi/example |
122 | | - flutter build linux --release |
| 129 | + flutter build apk --release |
123 | 130 | |
124 | | - - name: Build nativeapi example Linux |
| 131 | + - name: Build cnativeapi example Linux |
125 | 132 | if: matrix.os == 'ubuntu-latest' |
126 | 133 | run: | |
127 | | - cd packages/nativeapi/example |
| 134 | + cd packages/cnativeapi/example |
128 | 135 | flutter build linux --release |
129 | 136 | |
130 | | - - name: Build cnativeapi example macOS |
| 137 | + - name: Build cnativeapi example iOS |
131 | 138 | if: matrix.os == 'macos-latest' |
132 | 139 | run: | |
133 | 140 | cd packages/cnativeapi/example |
134 | | - flutter build macos --release |
| 141 | + flutter build ios --release --no-codesign |
135 | 142 | |
136 | | - - name: Build nativeapi example macOS |
| 143 | + - name: Build cnativeapi example macOS |
137 | 144 | if: matrix.os == 'macos-latest' |
138 | 145 | run: | |
139 | | - cd packages/nativeapi/example |
| 146 | + cd packages/cnativeapi/example |
140 | 147 | flutter build macos --release |
141 | 148 | |
142 | 149 | - name: Build cnativeapi example Windows |
143 | 150 | if: matrix.os == 'windows-latest' |
144 | 151 | run: | |
145 | 152 | cd packages/cnativeapi/example |
146 | 153 | flutter build windows --release |
| 154 | +
|
| 155 | + build_nativeapi: |
| 156 | + name: Build nativeapi example (${{ matrix.os }}) |
| 157 | + runs-on: ${{ matrix.os }} |
| 158 | + needs: [lint, test] |
| 159 | + strategy: |
| 160 | + fail-fast: false |
| 161 | + matrix: |
| 162 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 163 | + |
| 164 | + steps: |
| 165 | + - name: Checkout repository |
| 166 | + uses: actions/checkout@v4 |
| 167 | + |
| 168 | + - name: Setup Flutter |
| 169 | + uses: subosito/flutter-action@v2 |
| 170 | + with: |
| 171 | + flutter-version: '3.38.7' |
| 172 | + channel: 'stable' |
| 173 | + cache: true |
| 174 | + |
| 175 | + - name: Install melos |
| 176 | + run: dart pub global activate melos |
| 177 | + |
| 178 | + - name: Add melos to PATH |
| 179 | + shell: bash |
| 180 | + run: | |
| 181 | + if [[ "$RUNNER_OS" == "Windows" ]]; then |
| 182 | + echo "$USERPROFILE/.pub-cache/bin" >> $GITHUB_PATH |
| 183 | + else |
| 184 | + echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH |
| 185 | + fi |
| 186 | + |
| 187 | + - name: Bootstrap melos |
| 188 | + run: dart pub global run melos bootstrap |
| 189 | + |
| 190 | + - name: Setup Java for Android |
| 191 | + if: matrix.os == 'ubuntu-latest' |
| 192 | + uses: actions/setup-java@v4 |
| 193 | + with: |
| 194 | + distribution: 'temurin' |
| 195 | + java-version: '17' |
| 196 | + |
| 197 | + - name: Build nativeapi example Android |
| 198 | + if: matrix.os == 'ubuntu-latest' |
| 199 | + run: | |
| 200 | + cd packages/nativeapi/example |
| 201 | + flutter build apk --release |
| 202 | + |
| 203 | + - name: Build nativeapi example Linux |
| 204 | + if: matrix.os == 'ubuntu-latest' |
| 205 | + run: | |
| 206 | + cd packages/nativeapi/example |
| 207 | + flutter build linux --release |
| 208 | + |
| 209 | + - name: Build nativeapi example iOS |
| 210 | + if: matrix.os == 'macos-latest' |
| 211 | + run: | |
| 212 | + cd packages/nativeapi/example |
| 213 | + flutter build ios --release --no-codesign |
| 214 | + |
| 215 | + - name: Build nativeapi example macOS |
| 216 | + if: matrix.os == 'macos-latest' |
| 217 | + run: | |
| 218 | + cd packages/nativeapi/example |
| 219 | + flutter build macos --release |
147 | 220 | |
148 | 221 | - name: Build nativeapi example Windows |
149 | 222 | if: matrix.os == 'windows-latest' |
|
0 commit comments