Skip to content

Commit 96ee7de

Browse files
authored
Merge branch 'master' into feat-llm
2 parents d9466a8 + 0fd0922 commit 96ee7de

File tree

84 files changed

+2691
-875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2691
-875
lines changed

.github/workflows/android-build-test.yml

Lines changed: 137 additions & 67 deletions
Large diffs are not rendered by default.

.github/workflows/cla.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
steps:
1414
- name: "MLCommons CLA bot check"
1515
if: (github.event.comment.body == 'recheck') || github.event_name == 'pull_request_target'
16-
# Alpha Release
17-
uses: mlcommons/cla-bot@master
16+
uses: mlcommons/cla-bot@7b057420c71213d7674820c9110857539e9e552f # v3.1
1817
env:
1918
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2019
# the below token should have repo scope and must be manually added by you in the repository's secret

.github/workflows/code-analysis.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
WITH_PIXEL: 1
2929
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3232
with:
3333
fetch-depth: 0
3434
- name: Free up disk space
@@ -39,22 +39,22 @@ jobs:
3939
echo AFTER:
4040
df -h
4141
- name: Set up Docker Buildx
42-
uses: docker/setup-buildx-action@v3
42+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
4343
- name: Log in to the Container registry
44-
uses: docker/login-action@v3
44+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
4545
with:
4646
registry: ghcr.io
4747
username: ${{ github.actor }}
4848
password: ${{ secrets.GITHUB_TOKEN }}
4949
- name: Extract metadata for base image
5050
id: meta-base
51-
uses: docker/metadata-action@v5
51+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
5252
with:
5353
images: ghcr.io/mlcommons/mobile_app_open-base
5454
flavor: latest=true
5555
tags: type=raw,value=${{ github.run_number }}
5656
- name: Build and push base image
57-
uses: docker/build-push-action@v5
57+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
5858
with:
5959
context: flutter/android/docker
6060
file: flutter/android/docker/Dockerfile
@@ -65,13 +65,13 @@ jobs:
6565
cache-to: type=gha,mode=max
6666
- name: Extract metadata for scanner image
6767
id: meta-scanner
68-
uses: docker/metadata-action@v5
68+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
6969
with:
7070
images: ghcr.io/mlcommons/mobile_app_open-scanner
7171
flavor: latest=true
7272
tags: type=raw,value=${{ github.run_number }}
7373
- name: Build and push scanner image
74-
uses: docker/build-push-action@v5
74+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
7575
with:
7676
context: tools/scanner
7777
file: tools/scanner/Dockerfile
@@ -94,11 +94,11 @@ jobs:
9494
contents: read
9595
steps:
9696
- name: Checkout repository
97-
uses: actions/checkout@v4
97+
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
9898
- name: Initialize CodeQL
99-
uses: github/codeql-action/init@v3
99+
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
100100
with:
101101
languages: java-kotlin, javascript-typescript, python, actions
102102
build-mode: none
103103
- name: Perform CodeQL Analysis
104-
uses: github/codeql-action/analyze@v3
104+
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11

.github/workflows/format-and-lint.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ jobs:
1414
packages: write
1515
steps:
1616
- name: Checkout repository
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1818
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v3
19+
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
2020
- name: Log in to the Container registry
21-
uses: docker/login-action@v3
21+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
2222
with:
2323
registry: ghcr.io
2424
username: ${{ github.actor }}
2525
password: ${{ secrets.GITHUB_TOKEN }}
2626
- name: Extract metadata (tags, labels) for Docker
2727
id: meta
28-
uses: docker/metadata-action@v5
28+
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f # v5.8.0
2929
with:
3030
images: ghcr.io/mlcommons/mobile_app_open-formatter
3131
flavor: latest=true
3232
tags: type=raw,value=${{ github.run_number }}
3333
- name: Build and push Docker image
34-
uses: docker/build-push-action@v5
34+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
3535
with:
3636
context: tools/formatter
3737
file: tools/formatter/Dockerfile
@@ -48,7 +48,7 @@ jobs:
4848
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
4949
timeout-minutes: 10
5050
steps:
51-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
5252
- name: configure Git
5353
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
5454
- name: bazel
@@ -62,7 +62,7 @@ jobs:
6262
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
6363
timeout-minutes: 10
6464
steps:
65-
- uses: actions/checkout@v3
65+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
6666
- name: configure Git
6767
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
6868
- name: clang
@@ -75,11 +75,11 @@ jobs:
7575
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
7676
timeout-minutes: 10
7777
steps:
78-
- uses: actions/checkout@v3
78+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
7979
- name: configure Git
8080
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
8181
- name: Cache Flutter packages
82-
uses: actions/cache@v4
82+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
8383
with:
8484
path: /home/mlperf/.pub-cache
8585
key: ${{ runner.os }}-pub-cache-${{ hashFiles('**/pubspec.lock') }}
@@ -98,7 +98,7 @@ jobs:
9898
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
9999
timeout-minutes: 10
100100
steps:
101-
- uses: actions/checkout@v3
101+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
102102
- name: configure Git
103103
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
104104
- name: swift
@@ -111,7 +111,7 @@ jobs:
111111
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
112112
timeout-minutes: 10
113113
steps:
114-
- uses: actions/checkout@v3
114+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
115115
- name: configure Git
116116
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
117117
- name: markdown-format
@@ -124,7 +124,7 @@ jobs:
124124
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
125125
timeout-minutes: 10
126126
steps:
127-
- uses: actions/checkout@v3
127+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
128128
- name: configure Git
129129
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
130130
- name: pbtxt
@@ -137,7 +137,7 @@ jobs:
137137
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
138138
timeout-minutes: 10
139139
steps:
140-
- uses: actions/checkout@v3
140+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
141141
- name: configure Git
142142
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
143143
- name: yaml
@@ -151,7 +151,7 @@ jobs:
151151
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
152152
timeout-minutes: 10
153153
steps:
154-
- uses: actions/checkout@v3
154+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
155155
- name: configure Git
156156
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
157157
- name: typescripts
@@ -164,7 +164,7 @@ jobs:
164164
image: ghcr.io/mlcommons/mobile_app_open-formatter:${{ github.run_number }}
165165
timeout-minutes: 10
166166
steps:
167-
- uses: actions/checkout@v3
167+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
168168
- name: configure Git
169169
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
170170
- name: prohibited-extensions

.github/workflows/ios-build-test.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ on:
99
jobs:
1010
build:
1111
name: Build and test iOS app
12-
# https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md
13-
runs-on: macos-14
12+
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-arm64-Readme.md
13+
runs-on: macos-15
1414
timeout-minutes: 180
1515
env:
1616
PERF_TEST: true
17+
# Because iPhone simulator on GitHub Actions is not reliable, and caused a lot of test failures,
18+
# we run only 1 benchmark to validate the build.
19+
BENCHMARK_IDS: "image_classification_v2"
1720
WITH_APPLE: 1
1821
WITH_TFLITE: 1
1922
WITH_PIXEL: 0
@@ -34,15 +37,15 @@ jobs:
3437
FIREBASE_CRASHLYTICS_ENABLED: false
3538
steps:
3639
- name: Checkout
37-
uses: actions/checkout@v3
40+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3841
- name: Cache CocoaPods
39-
uses: actions/cache@v4
42+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
4043
with:
4144
path: ${{ github.workspace }}/flutter/ios/Pods
4245
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
4346
restore-keys: ${{ runner.os }}-pods-
4447
- name: Cache bazel
45-
uses: actions/cache@v4
48+
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
4649
with:
4750
path: /tmp/bazel_cache
4851
key: ${{ runner.os }}-bazel_cache-${{ hashFiles('**/BUILD', '**/WORKSPACE') }}
@@ -59,11 +62,17 @@ jobs:
5962
- name: Build iOS integration tests
6063
run: |
6164
cd flutter && flutter --no-version-check build ios --simulator integration_test/first_test.dart
62-
- uses: nick-fields/retry@v3
65+
- name: Setup iOS simulator
66+
env:
67+
DEVICE_NAME: "iPhone 16 Pro"
68+
RUNTIME_SDK: "iphonesimulator18.5"
69+
run: |
70+
cd flutter/ios/ci_scripts/ && bash setup_simulator.sh
71+
open -a Simulator
72+
- uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
6373
name: Run iOS integration tests
6474
with:
6575
timeout_minutes: 120
6676
max_attempts: 2
6777
command: |
68-
open -a Simulator
6978
make flutter/test/integration

.github/workflows/unit-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 30
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1515
- name: Install Flutter
16-
uses: subosito/flutter-action@v2
16+
uses: subosito/flutter-action@e938fdf56512cc96ef2f93601a5a40bde3801046 # v2.19.0
1717
with:
1818
channel: 'stable'
1919
flutter-version: '3.19.6'
2020
- name: Install Protoc
21-
uses: arduino/setup-protoc@v1
21+
uses: arduino/setup-protoc@149f6c87b92550901b26acd1632e11c3662e381f # v1.3.0
2222
with:
2323
version: '3.x'
2424
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/web-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build-and-deploy:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
1616
- name: Build website
1717
env:
1818
REACT_APP_FIREBASE_WEB_API_KEY: ${{ secrets.FIREBASE_WEB_API_KEY }}
@@ -27,7 +27,7 @@ jobs:
2727
cd ./react
2828
yarn install --immutable --immutable-cache --check-cache
2929
yarn build
30-
- uses: FirebaseExtended/action-hosting-deploy@v0
30+
- uses: FirebaseExtended/action-hosting-deploy@e2eda2e106cfa35cdbcf4ac9ddaf6c4756df2c8c # v0.10.0
3131
name: Deploy to Firebase Hosting on Preview channel
3232
if: github.ref != 'refs/heads/master'
3333
with:
@@ -36,7 +36,7 @@ jobs:
3636
projectId: mobile-app-build-290400
3737
entryPoint: "./react"
3838
expires: 30d
39-
- uses: FirebaseExtended/action-hosting-deploy@v0
39+
- uses: FirebaseExtended/action-hosting-deploy@e2eda2e106cfa35cdbcf4ac9ddaf6c4756df2c8c # v0.10.0
4040
name: Deploy to Firebase Hosting on Live channel
4141
if: github.ref == 'refs/heads/master'
4242
with:

.sonarcloud.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Ignore GitHub Actions rule S7637 across the repository
2+
sonar.issue.ignore.multicriteria=gha1
3+
sonar.issue.ignore.multicriteria.gha1.ruleKey=githubactions:S7637
4+
sonar.issue.ignore.multicriteria.gha1.resourceKey=.github/workflows/**/*

WORKSPACE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,26 @@ tf_patch_finder(
2626
workspace_dir = __workspace_dir__,
2727
)
2828

29+
# Override zlib and png version to make it compatible with Xcode 16.4
30+
http_archive(
31+
name = "zlib",
32+
build_file = "//third_party:zlib.BUILD",
33+
sha256 = "17e88863f3600672ab49182f217281b6fc4d3c762bde361935e436a95214d05c",
34+
strip_prefix = "zlib-1.3.1",
35+
urls = [
36+
"https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz",
37+
"https://github.com/madler/zlib/archive/refs/tags/v1.3.1.tar.gz",
38+
],
39+
)
40+
41+
http_archive(
42+
name = "png",
43+
build_file = "//third_party:libpng.BUILD",
44+
sha256 = "71158e53cfdf2877bc99bcab33641d78df3f48e6e0daad030afe9cb8c031aa46",
45+
strip_prefix = "libpng-1.6.50",
46+
urls = ["https://github.com/glennrp/libpng/archive/refs/tags/v1.6.50.tar.gz"],
47+
)
48+
2949
load("@tf_patch_finder//:patch_win_arm64.bzl", "PATCH_FILE")
3050

3151
http_archive(

docker-bake.hcl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
group "default" {
2+
targets = ["android"]
3+
}
4+
5+
target "android" {
6+
context = "flutter/android/docker"
7+
dockerfile = "Dockerfile"
8+
// platforms = ["linux/amd64"] // optionally set platforms here
9+
}

0 commit comments

Comments
 (0)