From a5c36d6630fead7eb946093d6b47086d6a940441 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 12 Sep 2025 12:06:23 +0900 Subject: [PATCH 1/5] x64 test --- .github/workflows/build.yml | 51 ++++++++++++++++--- engine/src/flutter/ci/tizen/build_llvm.sh | 1 + .../src/flutter/ci/tizen/generate_sysroot.py | 22 ++++++-- engine/src/flutter/testing/testing.gni | 2 +- 4 files changed, 63 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0beee16550bbb..ae0f1a0e32604 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - arch: [arm, arm64, x86] + arch: [arm, arm64, x86, x64] mode: [debug, release, profile] include: - arch: arm @@ -21,11 +21,8 @@ jobs: triple: aarch64-linux-gnu - arch: x86 triple: i686-linux-gnu - exclude: - - arch: x86 - mode: release - - arch: x86 - mode: profile + - arch: x64 + triple: x86_64-linux-gnu steps: - uses: actions/checkout@v4 @@ -58,6 +55,7 @@ jobs: run: flutter/engine/src/flutter/ci/tizen/generate_sysroot.py --out /tizen_tools/sysroot - name: Build + if: ${{ matrix.arch != x64 }} run: | cd flutter # Ignore unsupported linker option. @@ -78,12 +76,37 @@ jobs: ninja -C out/build flutter_engine_library cp -f flutter/third_party/icu/flutter/icudtl.dat out/build + - name: Build(x64) + if: ${{ matrix.arch == x64 }} + run: | + cd flutter + + flutter/tools/gn \ + --target-os linux \ + --linux-cpu ${{ matrix.arch }} \ + --no-goma \ + --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' }} + if: ${{ matrix.mode != 'debug' && matrix.arch != x64}} run: | cd flutter ninja -C engine/src/out/build clang_x64/gen_snapshot + - name: Build gen_snapshot(x64) + if: ${{ matrix.mode != 'debug' && matrix.arch == x64}} + run: | + cd flutter + ninja -C engine/src/out/build gen_snapshot + - uses: actions/upload-artifact@v4 with: name: tizen-${{ matrix.arch }}-${{ matrix.mode }} @@ -106,6 +129,20 @@ jobs: path: flutter/engine/src/out/build/clang_x64/gen_snapshot if-no-files-found: error + - uses: actions/upload-artifact@v4 + if: ${{ matrix.mode != 'debug' && matrix.arch != x64}} + with: + name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64 + path: flutter/engine/src/out/build/clang_x64/gen_snapshot + if-no-files-found: error + + - uses: actions/upload-artifact@v4 + if: ${{ matrix.mode != 'debug' && matrix.arch == x64}} + with: + name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64 + path: flutter/engine/src/out/build/gen_snapshot + if-no-files-found: error + windows-build: runs-on: windows-latest diff --git a/engine/src/flutter/ci/tizen/build_llvm.sh b/engine/src/flutter/ci/tizen/build_llvm.sh index 7d75d9c6a4252..de27efb73a9b6 100755 --- a/engine/src/flutter/ci/tizen/build_llvm.sh +++ b/engine/src/flutter/ci/tizen/build_llvm.sh @@ -43,4 +43,5 @@ for name in ar readelf nm strip; do ln -sf llvm-$name arm-linux-gnueabi-$name ln -sf llvm-$name aarch64-linux-gnu-$name ln -sf llvm-$name i686-linux-gnu-$name + ln -sf llvm-$name x86_64-linux-gnu-$name done diff --git a/engine/src/flutter/ci/tizen/generate_sysroot.py b/engine/src/flutter/ci/tizen/generate_sysroot.py index c4bdc51f347cf..acc09686c9f48 100755 --- a/engine/src/flutter/ci/tizen/generate_sysroot.py +++ b/engine/src/flutter/ci/tizen/generate_sysroot.py @@ -32,20 +32,26 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): + target = 'standard' + if arch == 'arm': tizen_arch = 'armv7l' elif arch == 'arm64': tizen_arch = 'aarch64' elif arch == 'x86': tizen_arch = 'i686' + target = 'emulator' + elif arch == 'x64': + tizen_arch = 'x86_64' + target = 'emulator' else: sys.exit('Unknown arch: ' + arch) base_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Base/latest/repos/standard/packages'.format( api_version, api_version ) - unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/standard/packages'.format( - api_version, api_version + unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/{}/packages'.format( + api_version, api_version, target ) # Retrieve html documents. @@ -91,11 +97,11 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): if not asm.exists(): os.symlink('asm-' + arch, asm) pkgconfig = sysroot / 'usr' / 'lib' / 'pkgconfig' - if arch == 'arm64' and not pkgconfig.exists(): + if (arch == 'arm64' or arch == 'x64') and not pkgconfig.exists(): os.symlink('../lib64/pkgconfig', pkgconfig) # Copy objects required by the linker, such as crtbeginS.o and libgcc.a. - if arch == 'arm64': + if arch == 'arm64' or arch == 'x64': libpath = sysroot / 'usr' / 'lib64' else: libpath = sysroot / 'usr' / 'lib' @@ -135,7 +141,13 @@ def main(): outpath = Path(__file__).parent / 'sysroot' outpath.mkdir(exist_ok=True) - for arch in ['arm', 'arm64', 'x86']: + arches = ['arm', 'arm64', 'x86'] + if args.api_version >= 10.0: + arches = ['arm', 'arm64', 'x64'] + elif args.api_version >= 8.0: + arches = ['arm', 'arm64', 'x86', 'x64'] + + for arch in arches: sysroot = outpath / arch if args.force and sysroot.is_dir(): shutil.rmtree(sysroot) diff --git a/engine/src/flutter/testing/testing.gni b/engine/src/flutter/testing/testing.gni index 6d37b9e2f0757..a550abbc3b082 100644 --- a/engine/src/flutter/testing/testing.gni +++ b/engine/src/flutter/testing/testing.gni @@ -14,7 +14,7 @@ is_aot_test = # * is_mac: arm64 builds can run x64 binaries. # * is_fuchsia: build unittests for testing on device. declare_args() { - enable_unittests = current_toolchain == host_toolchain || is_fuchsia || is_mac + enable_unittests = false # current_toolchain == host_toolchain || is_fuchsia || is_mac } # Creates a translation unit that defines the flutter::testing::GetFixturesPath From 2cf51184153c4d157e54ca7bdc7db1f04b5dd1ad Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 15 Sep 2025 16:08:03 +0900 Subject: [PATCH 2/5] revert generate_sysroot.py --- .../src/flutter/ci/tizen/generate_sysroot.py | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/engine/src/flutter/ci/tizen/generate_sysroot.py b/engine/src/flutter/ci/tizen/generate_sysroot.py index acc09686c9f48..7aa2ad80f1bba 100755 --- a/engine/src/flutter/ci/tizen/generate_sysroot.py +++ b/engine/src/flutter/ci/tizen/generate_sysroot.py @@ -32,26 +32,20 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): - target = 'standard' - if arch == 'arm': tizen_arch = 'armv7l' elif arch == 'arm64': tizen_arch = 'aarch64' elif arch == 'x86': tizen_arch = 'i686' - target = 'emulator' - elif arch == 'x64': - tizen_arch = 'x86_64' - target = 'emulator' else: sys.exit('Unknown arch: ' + arch) base_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Base/latest/repos/standard/packages'.format( api_version, api_version ) - unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/{}/packages'.format( - api_version, api_version, target + unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/standard/packages'.format( + api_version, api_version ) # Retrieve html documents. @@ -97,11 +91,11 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): if not asm.exists(): os.symlink('asm-' + arch, asm) pkgconfig = sysroot / 'usr' / 'lib' / 'pkgconfig' - if (arch == 'arm64' or arch == 'x64') and not pkgconfig.exists(): + if (arch == 'arm64') and not pkgconfig.exists(): os.symlink('../lib64/pkgconfig', pkgconfig) # Copy objects required by the linker, such as crtbeginS.o and libgcc.a. - if arch == 'arm64' or arch == 'x64': + if arch == 'arm64': libpath = sysroot / 'usr' / 'lib64' else: libpath = sysroot / 'usr' / 'lib' @@ -141,13 +135,7 @@ def main(): outpath = Path(__file__).parent / 'sysroot' outpath.mkdir(exist_ok=True) - arches = ['arm', 'arm64', 'x86'] - if args.api_version >= 10.0: - arches = ['arm', 'arm64', 'x64'] - elif args.api_version >= 8.0: - arches = ['arm', 'arm64', 'x86', 'x64'] - - for arch in arches: + for arch in ['arm', 'arm64', 'x86']: sysroot = outpath / arch if args.force and sysroot.is_dir(): shutil.rmtree(sysroot) From 1e86ab684b1b438540db56ccf397c88717a4db6e Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 15 Sep 2025 16:11:12 +0900 Subject: [PATCH 3/5] fix typo --- .github/workflows/build.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae0f1a0e32604..494e5a2a9a5c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: run: flutter/engine/src/flutter/ci/tizen/generate_sysroot.py --out /tizen_tools/sysroot - name: Build - if: ${{ matrix.arch != x64 }} + if: ${{ matrix.arch != 'x64' }} run: | cd flutter # Ignore unsupported linker option. @@ -77,11 +77,11 @@ jobs: cp -f flutter/third_party/icu/flutter/icudtl.dat out/build - name: Build(x64) - if: ${{ matrix.arch == x64 }} + if: ${{ matrix.arch == 'x64' }} run: | cd flutter - flutter/tools/gn \ + engine/src/flutter/tools/gn \ --target-os linux \ --linux-cpu ${{ matrix.arch }} \ --no-goma \ @@ -96,13 +96,13 @@ jobs: cp -f flutter/third_party/icu/flutter/icudtl.dat out/build - name: Build gen_snapshot - if: ${{ matrix.mode != 'debug' && matrix.arch != x64}} + if: ${{ matrix.mode != 'debug' && matrix.arch != 'x64'}} run: | cd flutter ninja -C engine/src/out/build clang_x64/gen_snapshot - name: Build gen_snapshot(x64) - if: ${{ matrix.mode != 'debug' && matrix.arch == x64}} + if: ${{ matrix.mode != 'debug' && matrix.arch == 'x64'}} run: | cd flutter ninja -C engine/src/out/build gen_snapshot @@ -130,14 +130,14 @@ jobs: if-no-files-found: error - uses: actions/upload-artifact@v4 - if: ${{ matrix.mode != 'debug' && matrix.arch != x64}} + if: ${{ matrix.mode != 'debug' && matrix.arch != 'x64'}} with: name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64 path: flutter/engine/src/out/build/clang_x64/gen_snapshot if-no-files-found: error - uses: actions/upload-artifact@v4 - if: ${{ matrix.mode != 'debug' && matrix.arch == x64}} + if: ${{ matrix.mode != 'debug' && matrix.arch == 'x64'}} with: name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64 path: flutter/engine/src/out/build/gen_snapshot From e3072eb62f57070f96ff836c126c7006847b1afc Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 15 Sep 2025 16:35:13 +0900 Subject: [PATCH 4/5] revert support x86 release --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 494e5a2a9a5c1..eb0b3c6d06a63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,11 @@ jobs: triple: i686-linux-gnu - arch: x64 triple: x86_64-linux-gnu + exclude: + - arch: x86 + mode: release + - arch: x86 + mode: profile steps: - uses: actions/checkout@v4 @@ -144,7 +149,7 @@ jobs: if-no-files-found: error windows-build: - runs-on: windows-latest + runs-on: windows-2022 strategy: matrix: From 6b82ed6c649e50c1c5b6c5f4b5ce6e870d67f4b6 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 15 Sep 2025 17:10:30 +0900 Subject: [PATCH 5/5] Fix typo --- .github/workflows/build.yml | 7 ------- engine/src/flutter/ci/tizen/generate_sysroot.py | 2 +- engine/src/flutter/testing/testing.gni | 3 ++- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb0b3c6d06a63..c247c28c86db6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,13 +127,6 @@ jobs: 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 - - uses: actions/upload-artifact@v4 if: ${{ matrix.mode != 'debug' && matrix.arch != 'x64'}} with: diff --git a/engine/src/flutter/ci/tizen/generate_sysroot.py b/engine/src/flutter/ci/tizen/generate_sysroot.py index 7aa2ad80f1bba..c4bdc51f347cf 100755 --- a/engine/src/flutter/ci/tizen/generate_sysroot.py +++ b/engine/src/flutter/ci/tizen/generate_sysroot.py @@ -91,7 +91,7 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): if not asm.exists(): os.symlink('asm-' + arch, asm) pkgconfig = sysroot / 'usr' / 'lib' / 'pkgconfig' - if (arch == 'arm64') and not pkgconfig.exists(): + if arch == 'arm64' and not pkgconfig.exists(): os.symlink('../lib64/pkgconfig', pkgconfig) # Copy objects required by the linker, such as crtbeginS.o and libgcc.a. diff --git a/engine/src/flutter/testing/testing.gni b/engine/src/flutter/testing/testing.gni index a550abbc3b082..b22e44673bb2a 100644 --- a/engine/src/flutter/testing/testing.gni +++ b/engine/src/flutter/testing/testing.gni @@ -14,7 +14,8 @@ is_aot_test = # * is_mac: arm64 builds can run x64 binaries. # * is_fuchsia: build unittests for testing on device. declare_args() { - enable_unittests = false # current_toolchain == host_toolchain || is_fuchsia || is_mac + # Disable unit test + enable_unittests = false } # Creates a translation unit that defines the flutter::testing::GetFixturesPath