Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/ios-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
jobs:
build:
name: Build and test iOS app
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
runs-on: macos-14
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
runs-on: macos-15
timeout-minutes: 180
env:
PERF_TEST: true
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup iOS simulator
env:
DEVICE_NAME: "iPhone 16 Pro"
RUNTIME_SDK: "iphonesimulator18.2"
RUNTIME_SDK: "iphonesimulator18.5"
run: |
cd flutter/ios/ci_scripts/ && bash setup_simulator.sh
open -a Simulator
Expand Down
20 changes: 20 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@ tf_patch_finder(
workspace_dir = __workspace_dir__,
)

# Override zlib and png version to make it compatible with Xcode 16.4
http_archive(
name = "zlib",
build_file = "//third_party:zlib.BUILD",
sha256 = "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c",
strip_prefix = "zlib-1.3.1",
urls = [
"https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz",
"https://github.com/madler/zlib/archive/refs/tags/v1.3.1.tar.gz",
],
)

http_archive(
name = "png",
build_file = "//third_party:libpng.BUILD",
sha256 = "71158e53cfdf2877bc99bcab33641d78df3f48e6e0daad030afe9cb8c031aa46",
strip_prefix = "libpng-1.6.50",
urls = ["https://github.com/glennrp/libpng/archive/refs/tags/v1.6.50.tar.gz"],
)

load("@tf_patch_finder//:patch_win_arm64.bzl", "PATCH_FILE")

http_archive(
Expand Down
7 changes: 5 additions & 2 deletions flutter/ios/ci_scripts/ci_post_clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ echo "$MC_LOG_PREFIX protobuf version:" && protoc --version
brew install cocoapods || brew install cocoapods || brew install cocoapods
echo "$MC_LOG_PREFIX cocoapods version:" && pod --version

echo "$MC_LOG_PREFIX python version:" && python3 --version
python3 -m pip install --break-system-packages \
brew install [email protected] || brew install [email protected] || brew install [email protected]
brew link --overwrite [email protected]
echo "$MC_LOG_PREFIX python version:" && python3.14 --version

python3.14 -m pip install --break-system-packages \
"numpy>=1.23,<2.0" \
"absl-py>=1.3,<2.0"

Expand Down
Empty file added third_party/BUILD
Empty file.
70 changes: 70 additions & 0 deletions third_party/libpng.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Description:
# libpng is the official PNG reference library.

licenses(["notice"]) # BSD/MIT-like license

genrule(
name = "pnglibconf",
srcs = ["scripts/pnglibconf.h.prebuilt"],
outs = ["pnglibconf.h"],
cmd = "cp $(location scripts/pnglibconf.h.prebuilt) $(location pnglibconf.h)",
)

config_setting(
name = "target_arm64",
constraint_values = ["@platforms//cpu:arm64"],
)

# Apple iOS CPU-based config_settings to avoid host/target mix-ups under split transitions.
config_setting(
name = "cpu_ios_arm64",
values = {"cpu": "ios_arm64"},
)

cc_library(
name = "png",
srcs = [
"png.c",
"pngdebug.h",
"pngerror.c",
"pngget.c",
"pnginfo.h",
":pnglibconf",
"pngmem.c",
"pngpread.c",
"pngpriv.h",
"pngread.c",
"pngrio.c",
"pngrtran.c",
"pngrutil.c",
"pngset.c",
"pngstruct.h",
"pngtrans.c",
"pngwio.c",
"pngwrite.c",
"pngwtran.c",
"pngwutil.c",
] + select({
":cpu_ios_arm64": [
"arm/arm_init.c",
"arm/filter_neon_intrinsics.c",
"arm/palette_neon_intrinsics.c",
],
"//conditions:default": [],
}),
hdrs = [
"png.h",
"pngconf.h",
],
includes = ["."],
linkopts = select({
"@bazel_tools//src/conditions:windows": [],
"//conditions:default": ["-lm"],
}),
copts = select({
":cpu_ios_arm64": ["-DPNG_ARM_NEON_OPT=2"],
"//conditions:default": ["-DPNG_ARM_NEON_OPT=0"],
}),
visibility = ["//visibility:public"],
deps = ["@zlib//:zlib"],
)
33 changes: 33 additions & 0 deletions third_party/zlib.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Minimal BUILD for zlib used by TensorFlow and this project.

cc_library(
name = "zlib",
srcs = [
"adler32.c",
"compress.c",
"crc32.c",
"deflate.c",
"gzclose.c",
"gzlib.c",
"gzread.c",
"gzwrite.c",
"infback.c",
"inflate.c",
"inffast.c",
"inftrees.c",
"trees.c",
"uncompr.c",
"zutil.c",
],
hdrs = [
"zconf.h",
"zlib.h",
],
includes = ["."],
# On POSIX (darwin, linux, android) unistd.h exists; on Windows it doesn't.
copts = select({
"@bazel_tools//src/conditions:windows": [],
"//conditions:default": ["-DZ_HAVE_UNISTD_H"],
}),
visibility = ["//visibility:public"],
)
Loading