From 3ab2ad9d0729e4e8f4e7a1412bd5f1cda9f0faf1 Mon Sep 17 00:00:00 2001 From: Chris Chua Date: Tue, 26 Mar 2024 12:24:43 +0800 Subject: [PATCH] check: add flutter-main check The `check-flutter-main` job serves 2 purposes: 1. It checks that the code works with the flutter's latest main channel. 2. It checks that our code environment setup works with a typical Flutter SDK installation setup (via ~/flutter). --- .github/workflows/ci-flutter-main.yml | 33 +++++++++++++++++++++++++++ tools/{setup => setup-vendor-flutter} | 0 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/ci-flutter-main.yml rename tools/{setup => setup-vendor-flutter} (100%) diff --git a/.github/workflows/ci-flutter-main.yml b/.github/workflows/ci-flutter-main.yml new file mode 100644 index 0000000000..43615f0275 --- /dev/null +++ b/.github/workflows/ci-flutter-main.yml @@ -0,0 +1,33 @@ +# The `check-flutter-main` job serves 2 purposes: +# 1. It checks that the code works with the flutter's latest main +# channel. +# 2. It checks that our code environment setup works with a typical +# Flutter SDK installation setup (via ~/flutter). +name: CI + +on: push + +jobs: + check-flutter-main: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Clone Flutter SDK + # We can't do a depth-1 clone, because we need the most recent tag + # so that Flutter knows its version and sees the constraint in our + # pubspec is satisfied. It's uncommon for flutter/flutter to go + # more than 100 commits between tags. Fetch 1000 for good measure. + run: | + git clone --depth=1000 https://github.com/flutter/flutter ~/flutter + TZ=UTC git --git-dir ~/flutter/.git log -1 --format='%h | %ci | %s' --date=iso8601-local + echo ~/flutter/bin >> "$GITHUB_PATH" + + - name: Download Flutter SDK artifacts (flutter precache) + run: flutter precache --universal + + - name: Download our dependencies (flutter pub get) + run: flutter pub get + + - name: Run tools/check + run: TERM=dumb tools/check --all --verbose diff --git a/tools/setup b/tools/setup-vendor-flutter similarity index 100% rename from tools/setup rename to tools/setup-vendor-flutter