mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.0 KiB
65 lines
2.0 KiB
name: Main Branch CI
|
|
|
|
# Declare default permissions as read only.
|
|
permissions: read-all
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 0 * * *" # Every day at midnight
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
flutter-tests:
|
|
name: Test Flutter ${{ matrix.flutter_version }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
if: github.repository == 'flutter/samples'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
flutter_version: [stable, beta, master]
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
|
|
- uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
|
|
with:
|
|
channel: ${{ matrix.flutter_version }}
|
|
- run: ./tool/flutter_ci_script_${{ matrix.flutter_version }}.sh
|
|
android-build:
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'flutter/samples'
|
|
steps:
|
|
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
|
|
- uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
|
|
with:
|
|
channel: stable
|
|
- run: ./tool/android_ci_script.sh
|
|
ios-build:
|
|
runs-on: macos-latest
|
|
if: github.repository == 'flutter/samples'
|
|
steps:
|
|
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3
|
|
- uses: actions/setup-java@3f07048e3d294f56e9b90ac5ea2c6f74e9ad0f98
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
|
|
with:
|
|
channel: stable
|
|
- run: ./tool/ios_ci_script.sh
|