Skip to content
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

Mono Repo support #16

Merged
merged 1 commit into from
Feb 13, 2025
Merged
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
53 changes: 29 additions & 24 deletions .github/workflows/flutter-engine-arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,27 @@ jobs:
run: |
export PATH=$PATH:$PWD/depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
gclient config --spec 'solutions=[{"name":"src/flutter","url":"https://github.com/flutter/engine.git","deps_file":"DEPS","managed":False,"custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True}}]'
git clone https://github.com/flutter/flutter.git
pushd flutter
gclient config --spec 'solutions=[{"managed":False,"name":".","url":"https://github.com/flutter/flutter.git","custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True},"deps_file":"DEPS","safesync_url":""}]'
gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.SRCREV }} -j$(nproc) -v

PATCH_DIR=$PWD/patches
popd

# fetch sysroot
cd src
cd flutter/engine/src
build/linux/sysroot_scripts/install-sysroot.py --arch=$arch

- name: Patch Flutter Source
run: |
PATCH_DIR=$PWD/patches
cd flutter
git apply $PATCH_DIR/0001-clang-toolchain.patch

- name: Build Debug
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -76,9 +81,9 @@ jobs:

- name: Prepare Debug Artifacts
run: |
scripts/prepare-sdk-$arch.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_debug_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/
tar czfhv $tag_debug.tar.gz flutter/engine/src/out/linux_debug_$arch/engine-sdk/

sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256

Expand All @@ -103,10 +108,10 @@ jobs:
gh release edit "$tag_debug" --draft=false

- name: Build Debug Unoptimized
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -126,9 +131,9 @@ jobs:

- name: Prepare Debug Unoptimized Artifacts
run: |
scripts/prepare-sdk-$arch.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_debug_unopt_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/
tar czfhv $tag_debug_unopt.tar.gz flutter/engine/src/out/linux_debug_unopt_$arch/engine-sdk/

sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256

Expand All @@ -153,10 +158,10 @@ jobs:
gh release edit "$tag_debug_unopt" --draft=false

- name: Build Release
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -175,9 +180,9 @@ jobs:

- name: Prepare Release Artifacts
run: |
scripts/prepare-sdk-$arch.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_release_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/
tar czfhv $tag_release.tar.gz flutter/engine/src/out/linux_release_$arch/engine-sdk/

sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256

Expand All @@ -202,10 +207,10 @@ jobs:
gh release edit "$tag_release" --draft=false

- name: Build Profile
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -224,9 +229,9 @@ jobs:

- name: Prepare Profile Artifacts
run: |
scripts/prepare-sdk-$arch.sh src/out/linux_profile_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-$arch.sh flutter/engine/src/out/linux_profile_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/
tar czfhv $tag_profile.tar.gz flutter/engine/src/out/linux_profile_$arch/engine-sdk/

sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256

Expand Down
53 changes: 29 additions & 24 deletions .github/workflows/flutter-engine-armv7hf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,27 @@ jobs:
run: |
export PATH=$PATH:$PWD/depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
gclient config --spec 'solutions=[{"name":"src/flutter","url":"https://github.com/flutter/engine.git","deps_file":"DEPS","managed":False,"custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True}}]'
git clone https://github.com/flutter/flutter.git
pushd flutter
gclient config --spec 'solutions=[{"managed":False,"name":".","url":"https://github.com/flutter/flutter.git","custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True},"deps_file":"DEPS","safesync_url":""}]'
gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.SRCREV }} -j$(nproc) -v

PATCH_DIR=$PWD/patches
popd

# fetch sysroot
cd src
cd flutter/engine/src
build/linux/sysroot_scripts/install-sysroot.py --arch=$arch

- name: Patch Flutter Source
run: |
PATCH_DIR=$PWD/patches
cd flutter
git apply $PATCH_DIR/0001-clang-toolchain.patch

- name: Build Debug
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -77,9 +82,9 @@ jobs:

- name: Prepare Debug Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_debug_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/
tar czfhv $tag_debug.tar.gz flutter/engine/src/out/linux_debug_$arch/engine-sdk/

sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256

Expand All @@ -104,10 +109,10 @@ jobs:
gh release edit "$tag_debug" --draft=false

- name: Build Debug Unoptimized
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -127,9 +132,9 @@ jobs:

- name: Prepare Debug Unoptimized Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_debug_unopt_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/
tar czfhv $tag_debug_unopt.tar.gz flutter/engine/src/out/linux_debug_unopt_$arch/engine-sdk/

sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256

Expand All @@ -154,10 +159,10 @@ jobs:
gh release edit "$tag_debug_unopt" --draft=false

- name: Build Release
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -177,9 +182,9 @@ jobs:

- name: Prepare Release Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_release_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/
tar czfhv $tag_release.tar.gz flutter/engine/src/out/linux_release_$arch/engine-sdk/

sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256

Expand All @@ -204,10 +209,10 @@ jobs:
gh release edit "$tag_release" --draft=false

- name: Build Profile
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -226,9 +231,9 @@ jobs:

- name: Prepare Profile Artifacts
run: |
scripts/prepare-sdk-armv7hf.sh src/out/linux_profile_$arch $PWD/src/build/linux/debian_sid_arm-sysroot
scripts/prepare-sdk-armv7hf.sh flutter/engine/src/out/linux_profile_$arch $PWD/flutter/engine/src/build/linux/debian_sid_arm-sysroot

tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/
tar czfhv $tag_profile.tar.gz flutter/engine/src/out/linux_profile_$arch/engine-sdk/

sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256

Expand Down
56 changes: 32 additions & 24 deletions .github/workflows/flutter-engine-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,27 @@ jobs:
run: |
export PATH=$PATH:$PWD/depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
gclient config --spec 'solutions=[{"name":"src/flutter","url":"https://github.com/flutter/engine.git","deps_file":"DEPS","managed":False,"custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True}}]'
gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.srcrev }} -j$(nproc) -v
git clone https://github.com/flutter/flutter.git
pushd flutter
gclient config --spec 'solutions=[{"managed":False,"name":".","url":"https://github.com/flutter/flutter.git","custom_deps":{},"custom_vars":{"download_android_deps":False,"download_windows_deps":False,"download_linux_deps":True},"deps_file":"DEPS","safesync_url":""}]'
gclient sync --force --shallow --no-history -R -D --revision ${{ inputs.SRCREV }} -j$(nproc) -v
popd

PATCH_DIR=$PWD/patches
# fetch sysroot
cd flutter/engine/src
build/linux/sysroot_scripts/install-sysroot.py --arch=$arch

cd src
- name: Patch Flutter Source
run: |
PATCH_DIR=$PWD/patches
cd flutter
git apply $PATCH_DIR/0001-clang-toolchain.patch

- name: Build Debug
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -73,9 +81,9 @@ jobs:

- name: Prepare Debug Artifacts
run: |
scripts/prepare-sdk-x86-64.sh src/out/linux_debug_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_debug_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_debug.tar.gz src/out/linux_debug_$arch/engine-sdk/
tar czfhv $tag_debug.tar.gz flutter/engine/src/out/linux_debug_$arch/engine-sdk/

sha256sum -b $tag_debug.tar.gz > $tag_debug.tar.gz.sha256

Expand All @@ -100,10 +108,10 @@ jobs:
gh release edit "$tag_debug" --draft=false

- name: Build Debug Unoptimized
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -123,9 +131,9 @@ jobs:

- name: Prepare Debug Unoptimized Artifacts
run: |
scripts/prepare-sdk-x86-64.sh src/out/linux_debug_unopt_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_debug_unopt_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_debug_unopt.tar.gz src/out/linux_debug_unopt_$arch/engine-sdk/
tar czfhv $tag_debug_unopt.tar.gz flutter/engine/src/out/linux_debug_unopt_$arch/engine-sdk/

sha256sum -b $tag_debug_unopt.tar.gz > $tag_debug_unopt.tar.gz.sha256

Expand All @@ -150,10 +158,10 @@ jobs:
gh release edit "$tag_debug_unopt" --draft=false

- name: Build Release
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -172,9 +180,9 @@ jobs:

- name: Prepare Release Artifacts
run: |
scripts/prepare-sdk-x86-64.sh src/out/linux_release_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_release_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_release.tar.gz src/out/linux_release_$arch/engine-sdk/
tar czfhv $tag_release.tar.gz flutter/engine/src/out/linux_release_$arch/engine-sdk/

sha256sum -b $tag_release.tar.gz > $tag_release.tar.gz.sha256

Expand All @@ -199,10 +207,10 @@ jobs:
gh release edit "$tag_release" --draft=false

- name: Build Profile
working-directory: src
working-directory: flutter/engine/src
run: |
export PATH=$PATH:$PWD/../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/vpython
export PATH=$PATH:$PWD/../../../depot_tools
export VPYTHON_VIRTUALENV_ROOT=$PWD/../../../vpython
CLANG_ROOT=$(find -iname clang++)
CLANG_ROOT=$(dirname $CLANG_ROOT)
export CLANG_ROOT=$(dirname $CLANG_ROOT)
Expand All @@ -221,9 +229,9 @@ jobs:

- name: Prepare Profile Artifacts
run: |
scripts/prepare-sdk-x86-64.sh src/out/linux_profile_$arch $PWD/src/build/linux/$target_sysroot
scripts/prepare-sdk-x86-64.sh flutter/engine/src/out/linux_profile_$arch $PWD/flutter/engine/src/build/linux/$target_sysroot

tar czfhv $tag_profile.tar.gz src/out/linux_profile_$arch/engine-sdk/
tar czfhv $tag_profile.tar.gz flutter/engine/src/out/linux_profile_$arch/engine-sdk/

sha256sum -b $tag_profile.tar.gz > $tag_profile.tar.gz.sha256

Expand Down
14 changes: 7 additions & 7 deletions patches/0001-clang-toolchain.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
From eb564c8be13a16158056890069deef5bad533529 Mon Sep 17 00:00:00 2001
From 5e4bf78183f9bf30d093b3e766f36a5780f068ab Mon Sep 17 00:00:00 2001
From: Joel Winarske <[email protected]>
Date: Mon, 26 Aug 2024 12:25:58 -0700
Date: Thu, 13 Feb 2025 12:44:11 -0800
Subject: [PATCH] clang toolchain

Signed-off-by: Joel Winarske <[email protected]>
---
build/toolchain/custom/BUILD.gn | 8 ++++----
engine/src/build/toolchain/custom/BUILD.gn | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/build/toolchain/custom/BUILD.gn b/build/toolchain/custom/BUILD.gn
index 3da5f93..05de4d7 100644
--- a/build/toolchain/custom/BUILD.gn
+++ b/build/toolchain/custom/BUILD.gn
diff --git a/engine/src/build/toolchain/custom/BUILD.gn b/engine/src/build/toolchain/custom/BUILD.gn
index 3da5f93026..05de4d7e3c 100644
--- a/engine/src/build/toolchain/custom/BUILD.gn
+++ b/engine/src/build/toolchain/custom/BUILD.gn
@@ -12,11 +12,11 @@ toolchain("custom") {
# these values in our scope.
cc = "${toolchain_bin}/clang"
Expand Down