Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ updates:
default-days: 7

- package-ecosystem: "gradle"
directory: "/"
directory: "/flutter"
schedule:
interval: "weekly"
labels:
- "autosubmit"
- "kokoro:run"
cooldown:
default-days: 7

- package-ecosystem: "gradle"
directory: "/dart/third_party"
schedule:
interval: "weekly"
labels:
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: integration tests

on:
pull_request:
push:
branches:
- main
- '2025.2'
workflow_dispatch:

permissions:
contents: read

jobs:
integration-tests:
name: Integration Tests (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-large]
runs-on: ${{ matrix.os }}
timeout-minutes: 25

steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Set up JDK
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'

- name: Provision Dart SDK
run: ../tool/provision_dart.sh
working-directory: dart/third_party
shell: bash

- name: Run Integration Tests
run: |
export DART_HOME="$GITHUB_WORKSPACE/dart-sdk"
./gradlew :test --tests "com.jetbrains.dart.*" -PverboseTests
working-directory: dart/third_party
shell: bash

- name: Upload test results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: integration-test-results
path: |
**/build/reports/
**/build/test-results/
187 changes: 178 additions & 9 deletions .github/workflows/presubmit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ jobs:
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
persist-credentials: false
- name: Run documentation check
run: ./tool/check_agent_skills.sh
- name: Run documentation checks
run: |
(cd flutter && ./tool/check_agent_skills.sh)
(cd dart && ./tool/check_agent_skills.sh)

presubmit:
# ==========================================
# Flutter Plugin Presubmit Jobs
# ==========================================
flutter-presubmit:
runs-on: ubuntu-latest
steps:
- name: checkout
Expand All @@ -43,7 +48,9 @@ jobs:

- name: build
run: ./tool/github.sh
checker:
working-directory: flutter

flutter-checker:
runs-on: ubuntu-latest
strategy:
fail-fast: true
Expand All @@ -65,14 +72,176 @@ jobs:

- name: Linux ${{ matrix.bot }}
run: ./tool/github.sh
working-directory: flutter
env:
BOT: ${{ matrix.bot }}
- name: upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: build-${{ matrix.bot }}
path: |
**/build/reports/
**/build/test-results/
if-no-files-found: ignore
name: flutter-build-${{ matrix.bot }}
path: |
flutter/**/build/reports/
flutter/**/build/test-results/
if-no-files-found: ignore

# ==========================================
# Dart Plugin Presubmit Jobs
# ==========================================
dart-build-plugin:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Set up JDK
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Build Plugin Action
run: ./gradlew buildPlugin
working-directory: dart/third_party

dart-unit-tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Set up JDK
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Provision Dart SDK
run: ../tool/provision_dart.sh
working-directory: dart/third_party
shell: bash

- name: Unit Test Action
run: |
export DART_HOME="$GITHUB_WORKSPACE/dart-sdk"
./gradlew :test --tests "com.jetbrains.lang.dart.*"
working-directory: dart/third_party
shell: bash

- name: Upload test results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: dart-test-results-${{ matrix.os }}
path: |
dart/**/build/reports/
dart/**/build/test-results/
if-no-files-found: ignore

dart-verify-plugin:
strategy:
matrix:
os: [ ubuntu-large ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false

- name: Free up disk space (on ubuntu only)
if: ${{ matrix.os == 'ubuntu-large' }}
run: |
echo "Freeing disk space..."
df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
df -h

- name: Set up JDK
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
distribution: 'temurin'
java-version: '21'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0

- name: Verify Plugin Actions
run: |
./gradlew verifyPlugin
./gradlew verifyPluginProjectConfiguration
./gradlew verifyPluginSignature
./gradlew verifyPluginStructure
working-directory: dart/third_party

- name: Upload verifier results
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: dart-verify-build
path: |
dart/**/build/reports/
dart/**/build/test-results/

- name: Check baselines
run: |
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BOLD='\033[1m'
NC='\033[0m'

EXIT_STATUS=0
for version in 253 261 262; do
echo -e "${BOLD}Checking baseline for $version...${NC}"
BASELINE="dart/third_party/tool/baseline/$version/verifier-baseline.txt"
REPORT=$(find dart/third_party/build/reports/pluginVerifier -path "*-$version.*/report.md" | head -n 1)
echo "Found report: $REPORT"

if [ -f "$REPORT" ]; then
echo "Comparing baseline against report in $REPORT"
grep "^*" "$REPORT" | grep -v "com\.intellij\.platform\.dartlsp" | sort > current_issues.tmp || true

if [ -f "$BASELINE" ]; then
NEW_ERRORS=$(comm -13 <(sort "$BASELINE") current_issues.tmp)

if [ -n "$NEW_ERRORS" ]; then
echo -e "${RED}${BOLD}Error: New verification issues found for version $version:${NC}"
echo "$NEW_ERRORS"
EXIT_STATUS=1
else
echo -e "${GREEN}Verification passed for version $version (no new issues).${NC}"
fi
else
echo -e "${YELLOW}Warning: No baseline file found at $BASELINE. Skipping comparison.${NC}"
fi
else
echo -e "${RED}${BOLD}Error: Report does not exist.${NC}"
EXIT_STATUS=1
fi
done

if [ $EXIT_STATUS -ne 0 ]; then
echo -e "${RED}${BOLD}Build failed: New verification issues were detected.${NC}"
echo -e "${YELLOW}To update the baselines with these new issues, run:${NC}"
echo -e "${YELLOW} (cd dart && ./third_party/tool/update_baselines.sh)${NC}"
echo -e "${YELLOW}from the repository root and commit the changes.${NC}"
exit 1
fi
64 changes: 64 additions & 0 deletions .github/workflows/update_dart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Update Dart SDK Pin

on:
schedule:
- cron: '0 0 * * 1' # Run every Monday at midnight UTC
workflow_dispatch: # Allow manual execution from the Actions tab

permissions:
contents: write
pull-requests: write

jobs:
check-and-update:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
token: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
persist-credentials: false

- name: Check for New Dart stable version
id: check-version
run: |
# 1. Retrieve the current pinned version from the shared script
CURRENT_VERSION=$(grep -E 'DART_VERSION="[0-9.]+"' dart/tool/provision_dart.sh | head -n 1 | cut -d'"' -f2)
echo "Current pinned version: $CURRENT_VERSION"

# 2. Retrieve the latest stable version from Dart's official releases manifest
LATEST_VERSION=$(curl -s https://storage.googleapis.com/dart-archive/channels/stable/release/latest/VERSION | jq -r '.version')
echo "Latest stable version: $LATEST_VERSION"

# 3. Compare and update if a newer version is available
if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ]; then
echo "New Dart stable version detected: $LATEST_VERSION"
sed -i -e "s/DART_VERSION=\"$CURRENT_VERSION\"/DART_VERSION=\"$LATEST_VERSION\"/g" dart/tool/provision_dart.sh
echo "updated=true" >> $GITHUB_OUTPUT
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
else
echo "Dart SDK is already up to date."
echo "updated=false" >> $GITHUB_OUTPUT
fi

- name: Create Pull Request for Version Bump
if: steps.check-version.outputs.updated == 'true'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
with:
token: ${{ secrets.FLUTTERACTIONSBOT_CP_TOKEN }}
push-to-fork: flutteractionsbot/flutter-intellij
committer: flutteractionsbot <flutter-actions-bot@google.com>
author: flutteractionsbot <flutter-actions-bot@google.com>
commit-message: "ci: bump pinned Dart SDK to version ${{ steps.check-version.outputs.latest_version }}"
title: "ci: bump pinned Dart SDK to version ${{ steps.check-version.outputs.latest_version }}"
body: |
An automated check has detected a new stable release of the Dart SDK.

* **New Pinned Version**: `${{ steps.check-version.outputs.latest_version }}`

This Pull Request updates our shared provisioning script (`dart/tool/provision_dart.sh`) to target this version. All presubmit tests will be run against this version to verify compatibility.
branch: "auto-update-dart-sdk"
delete-branch: true
labels: |
dependencies
ci
6 changes: 3 additions & 3 deletions .github/workflows/update_flutter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
id: check-version
run: |
# 1. Retrieve the current pinned version from the shared script
CURRENT_VERSION=$(grep -E 'FLUTTER_VERSION="[0-9.]+"' tool/provision_flutter.sh | head -n 1 | cut -d'"' -f2)
CURRENT_VERSION=$(grep -E 'FLUTTER_VERSION="[0-9.]+"' flutter/tool/provision_flutter.sh | head -n 1 | cut -d'"' -f2)
echo "Current pinned version: $CURRENT_VERSION"

# 2. Retrieve the latest stable version from Flutter's official releases manifest
Expand All @@ -37,7 +37,7 @@ jobs:
# 3. Compare and update if a newer version is available
if [ "$CURRENT_VERSION" != "$LATEST_VERSION" ]; then
echo "New Flutter stable version detected: $LATEST_VERSION"
sed -i -e "s/FLUTTER_VERSION=\"$CURRENT_VERSION\"/FLUTTER_VERSION=\"$LATEST_VERSION\"/g" tool/provision_flutter.sh
sed -i -e "s/FLUTTER_VERSION=\"$CURRENT_VERSION\"/FLUTTER_VERSION=\"$LATEST_VERSION\"/g" flutter/tool/provision_flutter.sh
echo "updated=true" >> $GITHUB_OUTPUT
echo "latest_version=$LATEST_VERSION" >> $GITHUB_OUTPUT
else
Expand All @@ -60,7 +60,7 @@ jobs:

* **New Pinned Version**: `${{ steps.check-version.outputs.latest_version }}`

This Pull Request updates our shared provisioning script (`tool/provision_flutter.sh`) to target this version. All presubmit tests will be run against this version to verify compatibility.
This Pull Request updates our shared provisioning script (`flutter/tool/provision_flutter.sh`) to target this version. All presubmit tests will be run against this version to verify compatibility.
branch: "auto-update-flutter-sdk"
delete-branch: true
labels: |
Expand Down
Loading
Loading