Skip to content

Update Flutter 3.29.3 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: flutter-3.29.3
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/dependabot.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build Docker

on: [workflow_dispatch]

jobs:
builder:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: ci/tizen
file: ci/tizen/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/build-engine:latest
313 changes: 313 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
name: Build

on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/flutter-tizen/build-engine:latest
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

strategy:
matrix:
arch: [arm, arm64, x86]
mode: [debug, release, profile]
include:
- arch: arm
triple: arm-linux-gnueabi
- arch: arm64
triple: aarch64-linux-gnu
- arch: x86
triple: i686-linux-gnu
exclude:
- arch: x86
mode: release
- arch: x86
mode: profile

steps:
- uses: actions/checkout@v4
with:
path: flutter
fetch-depth: 1

- uses: actions/cache@v4
with:
path: /tizen_tools/sysroot
key: sysroot

- name: Install depot_tools
run: |
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$PWD/depot_tools" >> $GITHUB_PATH
export PATH="$PWD/depot_tools:$PATH"
# Install ninja
apt install ninja-build

- name: Run gclient sync
run: |
cd flutter
gclient config --unmanaged https://github.com/flutter-tizen/flutter
sed -i "s/'flutter'/'.'/g" ./.gclient
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS
gclient sync -v --no-history --shallow

- name: Generate sysroot
run: flutter/engine/src/flutter/ci/tizen/generate_sysroot.py --out /tizen_tools/sysroot

- name: Build
run: |
cd flutter
# Ignore unsupported linker option.
sed -i "/-Wl,--undefined-version/d" engine/src/build/config/compiler/BUILD.gn

engine/src/flutter/tools/gn \
--target-os linux \
--linux-cpu ${{ matrix.arch }} \
--no-goma \
--target-toolchain /tizen_tools/toolchains \
--target-sysroot /tizen_tools/sysroot/${{ matrix.arch }} \
--target-triple ${{ matrix.triple }} \
--runtime-mode ${{ matrix.mode }} \
--enable-fontconfig \
--disable-desktop-embeddings \
--target-dir build
cd engine/src
ninja -C out/build flutter_engine_library
cp -f flutter/third_party/icu/flutter/icudtl.dat out/build

- name: Build gen_snapshot
if: ${{ matrix.mode != 'debug' }}
run: |
cd flutter
ninja -C engine/src/out/build clang_x64/gen_snapshot

- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}
path: |
flutter/engine/src/out/build/libflutter_engine.so
flutter/engine/src/out/build/icudtl.dat
if-no-files-found: error

- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' }}
with:
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_symbols
path: flutter/engine/src/out/build/so.unstripped/libflutter_engine.so
if-no-files-found: error

- uses: actions/upload-artifact@v4
if: ${{ matrix.mode != 'debug' }}
with:
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64
path: flutter/engine/src/out/build/clang_x64/gen_snapshot
if-no-files-found: error

windows-build:
runs-on: windows-latest

strategy:
matrix:
arch: [arm, arm64]
mode: [release, profile]

steps:
- name: Run git checkout
run: |
mkdir C:\workspace\flutter
cd C:\workspace\flutter
git config --global core.autocrlf true
git init --quiet
git remote add origin https://github.com/${{ github.repository }}
git fetch --depth 1 origin ${{ github.sha }}
git checkout FETCH_HEAD

- name: Environment setup
run: |
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -Force
echo "DEPOT_TOOLS_WIN_TOOLCHAIN=0" >> $Env:GITHUB_ENV
echo "GYP_MSVS_OVERRIDE_PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise" >> $Env:GITHUB_ENV
echo "WINDOWSSDKDIR=C:\Program Files (x86)\Windows Kits\10" >> $Env:GITHUB_ENV

- name: Install depot_tools
run: |
Invoke-WebRequest -Uri https://storage.googleapis.com/chrome-infra/depot_tools.zip -OutFile depot_tools.zip
7z x -y -o"C:\workspace\depot_tools" .\depot_tools.zip
echo "C:\workspace\depot_tools" >> $Env:GITHUB_PATH

- name: Run gclient sync
working-directory: C:\workspace\flutter
shell: powershell
run: |
gclient config --unmanaged https://github.com/flutter-tizen/flutter
(Get-Content ".gclient") | ForEach-Object { $_ -replace "'flutter'","'.'" } | Set-Content ".gclient"
# TODO(jsuya) : pipes deprecated in python 3.13. (https://dart-review.googlesource.com/c/sdk/+/307620)
(Get-Content "engine/src/build/vs_toolchain.py") | ForEach-Object { $_ -replace 'import pipes','' } | Set-Content "engine/src/build/vs_toolchain.py"
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS
gclient sync -v --no-history --shallow

- name: Build
working-directory: C:\workspace\flutter\engine\src
run: |
python3 .\flutter\tools\gn `
--linux `
--linux-cpu=${{ matrix.arch }} `
--runtime-mode=${{ matrix.mode }} `
--no-goma `
--target-dir build
# TODO(jsuya) : https://github.com/flutter/flutter/issues/163487
C:\workspace\flutter\engine\src\flutter/third_party/ninja/ninja -C .\out\build gen_snapshot

- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_windows-x64
path: C:\workspace\flutter\engine\src\out\build\gen_snapshot.exe
if-no-files-found: error

macos-build:
runs-on: macos-latest

strategy:
matrix:
arch: [arm, arm64]
mode: [release, profile]

steps:
- uses: actions/checkout@v4
with:
path: flutter
fetch-depth: 1

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install depot_tools
run: |
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$PWD/depot_tools" >> $GITHUB_PATH

- name: Run gclient sync
run: |
cd flutter
gclient config --unmanaged https://github.com/flutter-tizen/flutter
sed -i '' "s/'flutter'/'.'/g" .gclient
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS
gclient sync -v --no-history --shallow

- name: Build
run: |
cd flutter
# Change host_toolchain to mac/clang_arm64.
sed -i "" "s|//build/toolchain/linux:clang_$host_cpu|//build/toolchain/mac:clang_$host_cpu|g" engine/src/build/config/BUILDCONFIG.gn

# Pass dummy values to prevent using the default (Linux) toolchain.
engine/src/flutter/tools/gn \
--linux \
--linux-cpu=${{ matrix.arch }} \
--no-goma \
--target-toolchain _ \
--target-sysroot _ \
--target-triple _ \
--runtime-mode=${{ matrix.mode }} \
--disable-desktop-embeddings \
--target-dir build
cd engine/src
# TODO(jsuya) : https://github.com/flutter/flutter/issues/163487
flutter/third_party/ninja/ninja -C out/build clang_arm64/gen_snapshot

- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_darwin-arm64
path: flutter/engine/src/out/build/clang_arm64/gen_snapshot
if-no-files-found: error

macos-intel-build:
runs-on: macos-13

strategy:
matrix:
arch: [arm, arm64]
mode: [release, profile]

steps:
- uses: actions/checkout@v4
with:
path: flutter
fetch-depth: 1

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install depot_tools
run: |
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$PWD/depot_tools" >> $GITHUB_PATH

- name: Run gclient sync
run: |
cd flutter
gclient config --unmanaged https://github.com/flutter-tizen/flutter
sed -i '' "s/'flutter'/'.'/g" .gclient
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS
gclient sync -v --no-history --shallow

- name: Build
run: |
cd flutter
# Change host_toolchain to mac/clang_x64.
sed -i "" "s|//build/toolchain/linux:clang_$host_cpu|//build/toolchain/mac:clang_$host_cpu|g" engine/src/build/config/BUILDCONFIG.gn

# Pass dummy values to prevent using the default (Linux) toolchain.
engine/src/flutter/tools/gn \
--linux \
--linux-cpu=${{ matrix.arch }} \
--no-goma \
--target-toolchain _ \
--target-sysroot _ \
--target-triple _ \
--runtime-mode=${{ matrix.mode }} \
--disable-desktop-embeddings \
--target-dir build
cd engine/src
# TODO(jsuya) : https://github.com/flutter/flutter/issues/163487
flutter/third_party/ninja/ninja -C out/build clang_x64/gen_snapshot

- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_darwin-x64
path: flutter/engine/src/out/build/clang_x64/gen_snapshot
if-no-files-found: error

release:
needs: [build]
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4

- name: Create archives
run: |
for name in tizen-*; do
7z a $name.zip ./$name/*
done

- name: Set variables
run: |
echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV
echo "VERSION=$(echo "${{ github.ref_name }}" | cut -d'-' -f2)" >> $GITHUB_ENV

- uses: softprops/action-gh-release@v2
with:
name: ${{ env.VERSION }} (${{ env.SHORT_SHA }})
tag_name: ${{ env.SHORT_SHA }}
target_commitish: ${{ github.sha }}
files: tizen-*.zip
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
29 changes: 0 additions & 29 deletions .github/workflows/coverage.yml

This file was deleted.

Loading