blob: 84aad92afab4bbef48eac26b93216376297519c3 [file] [log] [blame]
name: CI
on: [push, pull_request]
jobs:
build_and_drive_windows:
runs-on: windows-2019
strategy:
matrix:
channel: ['master', 'stable']
# Disable fail-fast to get results from both channels even if one fails.
fail-fast: false
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
path: plugins
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
path: flutter
repository: flutter/flutter
ref: master
# Shallow clones don't work; see https://github.com/flutter/flutter/issues/18532
fetch-depth: 0
- name: Set up Flutter
run: |
# Add tags, which are also necessary for version checks to work.
git fetch origin +refs/tags/*:refs/tags/*
# Set channel
bin\flutter channel ${{matrix.channel}}
bin\flutter upgrade
# Enable desktop
bin\flutter config --enable-windows-desktop
# Add fluter to path.
echo "$env:GITHUB_WORKSPACE\flutter\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
working-directory: ${{ github.workspace }}/flutter
- name: Doctor
# Run doctor, for ease of debugging any issues.
run: flutter doctor -v
- name: Set up tools
run: dart pub get
working-directory: ${{ github.workspace }}/plugins/script/tool
- name: Build
run: |
dart run ./script/tool/lib/src/main.dart build-examples --windows --run-on-changed-packages
working-directory: ${{ github.workspace }}/plugins
- name: Drive
run: |
dart run ./script/tool/lib/src/main.dart drive-examples --windows --run-on-changed-packages
working-directory: ${{ github.workspace }}/plugins