Merge pull request #26 from cristik/fix_api23_crash #171
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
name: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest, windows-2019, ubuntu-latest] | |
version: ["3.10.x", "3.19.x", "3.22.x", "3.24.x"] | |
include: | |
- os: macOS-latest | |
TARGET: macos | |
- os: ubuntu-latest | |
TARGET: linux | |
- os: windows-2019 | |
TARGET: windows | |
# Disable fail-fast; we want results from all OSes even if one fails. | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: flutter_platform_alert | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: "oracle" | |
java-version: "17" | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.version }} | |
channel: "stable" # optional, default to: 'stable' | |
- name: Add Flutter to path - Windows | |
if: startsWith(matrix.os, 'windows') | |
run: echo "$env:GITHUB_WORKSPACE\flutter\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Add Flutter to path - macOS/Linux | |
if: startsWith(matrix.os, 'macOS') || startsWith(matrix.os, 'ubuntu') | |
run: echo "$GITHUB_WORKSPACE/flutter/bin" >> $GITHUB_PATH | |
- name: Install Linux dependencies | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libx11-dev pkg-config cmake ninja-build libblkid-dev liblzma-dev | |
sudo apt-get install -y libayatana-appindicator3-dev | |
- name: Enable desktop support | |
run: | | |
flutter config --enable-linux-desktop | |
flutter config --enable-macos-desktop | |
flutter config --enable-windows-desktop | |
- name: Doctor | |
# Run doctor, for ease of debugging any issues. | |
run: flutter doctor -v | |
- name: Install dependencies | |
run: flutter packages get | |
working-directory: ${{ github.workspace }}/flutter_platform_alert/example | |
- name: Build Android APK | |
run: flutter build apk | |
working-directory: ${{ github.workspace }}/flutter_platform_alert/example | |
- name: Build macOS | |
if: startsWith(matrix.os, 'macOS') | |
run: flutter build macos | |
working-directory: ${{ github.workspace }}/flutter_platform_alert/example | |
- name: Build iOS | |
if: startsWith(matrix.os, 'macOS') | |
run: flutter build ios --debug --no-codesign --simulator | |
working-directory: ${{ github.workspace }}/flutter_platform_alert/example | |
- name: Build Linux | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
flutter build linux | |
working-directory: ${{ github.workspace }}/flutter_platform_alert/example | |
- name: Build Windows | |
if: startsWith(matrix.os, 'windows') | |
run: flutter build windows | |
working-directory: ${{ github.workspace }}/flutter_platform_alert/example |