Fix CI #93
Workflow file for this run
This file contains hidden or 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: build | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| paths-ignore: | |
| - '**.md' | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| paths-ignore: | |
| - '**.md' | |
| jobs: | |
| analyze: | |
| name: Analyze on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| cache: true | |
| - name: Log Dart/Flutter versions | |
| run: | | |
| dart --version | |
| flutter --version | |
| - run: flutter doctor -v | |
| - name: Prepare dependencies | |
| run: flutter pub get | |
| - name: Check Dart code formatting | |
| run: dart format . -o none --set-exit-if-changed | |
| - name: Analyze lib & test | |
| run: flutter analyze lib test | |
| - name: Analyze example | |
| run: flutter analyze example | |
| - name: Run tests | |
| run: flutter test | |
| - name: Dry run docs generate | |
| run: dart doc --dry-run . | |
| continue-on-error: true | |
| build_ios: | |
| needs: analyze | |
| name: Build iOS on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-latest] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - name: Run llvm/clang-format@shell | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| brew install clang-format | |
| - name: Run ruby/plist@shell | |
| if: matrix.os == 'macos-latest' | |
| run: | | |
| gem install plist | |
| - name: Run clang-format | |
| if: matrix.os == 'macos-latest' | |
| run: clang-format -style=file -i ios/Classes/*.h ios/Classes/*.m --dry-run --Werror | |
| - run: flutter pub get | |
| - run: cd example; flutter test; flutter build ios --no-codesign | |
| build_android: | |
| needs: analyze | |
| name: Build Android on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - run: flutter pub get | |
| - run: cd example; flutter test; flutter build apk --debug |