Skip to content

Commit 3d93aa0

Browse files
committed
update ci to use flutter 3.47 and fix some left over issues
1 parent 04694bc commit 3d93aa0

3 files changed

Lines changed: 26 additions & 92 deletions

File tree

.github/workflows/build.yaml

Lines changed: 11 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717
required: true
1818
default: '1'
1919

20+
# Configure app uses -d to select pinned Epic/MWC prebuilts when included.
21+
# Other native-assets packages, including frostdart, still build from source.
2022
jobs:
2123

2224
build-disclaimer:
@@ -76,19 +78,6 @@ jobs:
7678
- name: Get dependencies
7779
run: flutter pub get
7880

79-
- name: Create git_versions.dart stubs
80-
run: |
81-
mkdir -p crypto_plugins/flutter_libepiccash/lib
82-
mkdir -p crypto_plugins/flutter_libmwc/lib
83-
84-
EPIC_TAG=$(git -C crypto_plugins/flutter_libepiccash describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
85-
MWC_TAG=$(git -C crypto_plugins/flutter_libmwc describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
86-
87-
printf 'String getPluginVersion() => "%s";\n' "$EPIC_TAG" \
88-
> crypto_plugins/flutter_libepiccash/lib/git_versions.dart
89-
printf 'String getPluginVersion() => "%s";\n' "$MWC_TAG" \
90-
> crypto_plugins/flutter_libmwc/lib/git_versions.dart
91-
9281
- name: Decode secrets
9382
env:
9483
CHANGE_NOW: ${{ secrets.CHANGE_NOW }}
@@ -153,19 +142,6 @@ jobs:
153142
- name: Get dependencies
154143
run: flutter pub get
155144

156-
- name: Create git_versions.dart stubs
157-
run: |
158-
mkdir -p crypto_plugins/flutter_libepiccash/lib
159-
mkdir -p crypto_plugins/flutter_libmwc/lib
160-
161-
EPIC_TAG=$(git -C crypto_plugins/flutter_libepiccash describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
162-
MWC_TAG=$(git -C crypto_plugins/flutter_libmwc describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
163-
164-
printf 'String getPluginVersion() => "%s";\n' "$EPIC_TAG" \
165-
> crypto_plugins/flutter_libepiccash/lib/git_versions.dart
166-
printf 'String getPluginVersion() => "%s";\n' "$MWC_TAG" \
167-
> crypto_plugins/flutter_libmwc/lib/git_versions.dart
168-
169145
- name: Decode secrets
170146
env:
171147
CHANGE_NOW: ${{ secrets.CHANGE_NOW }}
@@ -254,7 +230,7 @@ jobs:
254230
255231
- uses: subosito/flutter-action@v2
256232
with:
257-
flutter-version: '3.44.9'
233+
flutter-version: '3.47.2'
258234
channel: 'stable'
259235

260236
- uses: actions/setup-go@v6
@@ -296,19 +272,6 @@ jobs:
296272
- name: Get dependencies
297273
run: flutter pub get
298274

299-
- name: Create git_versions.dart stubs
300-
run: |
301-
mkdir -p crypto_plugins/flutter_libepiccash/lib
302-
mkdir -p crypto_plugins/flutter_libmwc/lib
303-
304-
EPIC_TAG=$(git -C crypto_plugins/flutter_libepiccash describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
305-
MWC_TAG=$(git -C crypto_plugins/flutter_libmwc describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
306-
307-
printf 'String getPluginVersion() => "%s";\n' "$EPIC_TAG" \
308-
> crypto_plugins/flutter_libepiccash/lib/git_versions.dart
309-
printf 'String getPluginVersion() => "%s";\n' "$MWC_TAG" \
310-
> crypto_plugins/flutter_libmwc/lib/git_versions.dart
311-
312275
- name: Decode secrets
313276
env:
314277
CHANGE_NOW: ${{ secrets.CHANGE_NOW }}
@@ -358,7 +321,7 @@ jobs:
358321
359322
- uses: subosito/flutter-action@v2
360323
with:
361-
flutter-version: '3.44.9'
324+
flutter-version: '3.47.2'
362325
channel: 'stable'
363326

364327
- uses: actions/setup-go@v6
@@ -376,19 +339,6 @@ jobs:
376339
- name: Get dependencies
377340
run: flutter pub get
378341

379-
- name: Create git_versions.dart stubs
380-
run: |
381-
mkdir -p crypto_plugins/flutter_libepiccash/lib
382-
mkdir -p crypto_plugins/flutter_libmwc/lib
383-
384-
EPIC_TAG=$(git -C crypto_plugins/flutter_libepiccash describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
385-
MWC_TAG=$(git -C crypto_plugins/flutter_libmwc describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
386-
387-
printf 'String getPluginVersion() => "%s";\n' "$EPIC_TAG" \
388-
> crypto_plugins/flutter_libepiccash/lib/git_versions.dart
389-
printf 'String getPluginVersion() => "%s";\n' "$MWC_TAG" \
390-
> crypto_plugins/flutter_libmwc/lib/git_versions.dart
391-
392342
- name: Decode secrets
393343
env:
394344
CHANGE_NOW: ${{ secrets.CHANGE_NOW }}
@@ -440,7 +390,7 @@ jobs:
440390

441391
- uses: subosito/flutter-action@v2
442392
with:
443-
flutter-version: '3.44.9'
393+
flutter-version: '3.47.2'
444394
channel: 'stable'
445395

446396
- uses: actions/setup-go@v6
@@ -458,19 +408,6 @@ jobs:
458408
- name: Get dependencies
459409
run: flutter pub get
460410

461-
- name: Create git_versions.dart stubs
462-
run: |
463-
mkdir -p crypto_plugins/flutter_libepiccash/lib
464-
mkdir -p crypto_plugins/flutter_libmwc/lib
465-
466-
EPIC_TAG=$(git -C crypto_plugins/flutter_libepiccash describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
467-
MWC_TAG=$(git -C crypto_plugins/flutter_libmwc describe --tags --exact-match HEAD 2>/dev/null || echo "dev")
468-
469-
printf 'String getPluginVersion() => "%s";\n' "$EPIC_TAG" \
470-
> crypto_plugins/flutter_libepiccash/lib/git_versions.dart
471-
printf 'String getPluginVersion() => "%s";\n' "$MWC_TAG" \
472-
> crypto_plugins/flutter_libmwc/lib/git_versions.dart
473-
474411
- name: Decode secrets
475412
env:
476413
CHANGE_NOW: ${{ secrets.CHANGE_NOW }}
@@ -867,7 +804,7 @@ jobs:
867804
868805
- uses: subosito/flutter-action@v2
869806
with:
870-
flutter-version: '3.44.9'
807+
flutter-version: '3.47.2'
871808
channel: 'stable'
872809

873810
- uses: actions/setup-go@v6
@@ -956,7 +893,7 @@ jobs:
956893
957894
- uses: subosito/flutter-action@v2
958895
with:
959-
flutter-version: '3.44.9'
896+
flutter-version: '3.47.2'
960897
channel: 'stable'
961898

962899
- uses: actions/setup-go@v6
@@ -1031,7 +968,7 @@ jobs:
1031968

1032969
- uses: subosito/flutter-action@v2
1033970
with:
1034-
flutter-version: '3.44.9'
971+
flutter-version: '3.47.2'
1035972
channel: 'stable'
1036973

1037974
- uses: actions/setup-go@v6
@@ -1325,7 +1262,7 @@ jobs:
13251262
13261263
- uses: subosito/flutter-action@v2
13271264
with:
1328-
flutter-version: '3.44.9'
1265+
flutter-version: '3.47.2'
13291266
channel: 'stable'
13301267

13311268
- uses: actions/setup-go@v6
@@ -1414,7 +1351,7 @@ jobs:
14141351
14151352
- uses: subosito/flutter-action@v2
14161353
with:
1417-
flutter-version: '3.44.9'
1354+
flutter-version: '3.47.2'
14181355
channel: 'stable'
14191356

14201357
- uses: actions/setup-go@v6
@@ -1491,7 +1428,7 @@ jobs:
14911428

14921429
- uses: subosito/flutter-action@v2
14931430
with:
1494-
flutter-version: '3.44.9'
1431+
flutter-version: '3.47.2'
14951432
channel: 'stable'
14961433

14971434
- uses: actions/setup-go@v6

.github/workflows/test.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,15 @@ jobs:
1818
fetch-depth: 0
1919
submodules: recursive
2020

21-
- name: Configure app
21+
# -d enables the pinned Epic/MWC native-assets prebuilts for flutter test.
22+
- name: Configure app (prebuilt native assets)
2223
run: |
2324
cd scripts
2425
echo "yes" | ./build_app.sh -v "0.0.1" -b "1" -p "linux" -a "stack_wallet" -d -s
2526
2627
- name: Get dependencies
2728
run: flutter pub get
2829

29-
- name: Create git_versions.dart stubs
30-
run: |
31-
mkdir -p crypto_plugins/flutter_libepiccash/lib
32-
mkdir -p crypto_plugins/flutter_libmwc/lib
33-
34-
cat > crypto_plugins/flutter_libepiccash/lib/git_versions.dart << 'EOF'
35-
String getPluginVersion() => "stub-for-tests";
36-
EOF
37-
38-
cat > crypto_plugins/flutter_libmwc/lib/git_versions.dart << 'EOF'
39-
String getPluginVersion() => "stub-for-tests";
40-
EOF
41-
4230
- name: Decode secrets
4331
env:
4432
CHANGE_NOW: ${{ secrets.CHANGE_NOW }}

Dockerfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ RUN curl -fsSL https://go.dev/dl/go1.24.13.linux-amd64.tar.gz -o /tmp/go.tar.gz
8686
ENV FLUTTER_HOME=/opt/flutter \
8787
PATH=/opt/flutter/bin:/opt/flutter/bin/cache/dart-sdk/bin:$PATH
8888

89-
RUN git clone --depth 1 --branch 3.44.9 https://github.com/flutter/flutter.git "$FLUTTER_HOME" \
89+
RUN git clone --depth 1 --branch 3.47.2 https://github.com/flutter/flutter.git "$FLUTTER_HOME" \
9090
&& git config --global --add safe.directory '*' \
9191
&& flutter config --no-analytics \
9292
&& flutter precache --linux --android \
@@ -174,7 +174,7 @@ RUN curl -fsSL https://go.dev/dl/go1.24.13.linux-amd64.tar.gz -o /tmp/go.tar.gz
174174
ENV FLUTTER_HOME=/opt/flutter \
175175
PATH=/opt/flutter/bin:/opt/flutter/bin/cache/dart-sdk/bin:$PATH
176176

177-
RUN git clone --depth 1 --branch 3.44.9 https://github.com/flutter/flutter.git "$FLUTTER_HOME" \
177+
RUN git clone --depth 1 --branch 3.47.2 https://github.com/flutter/flutter.git "$FLUTTER_HOME" \
178178
&& git config --global --add safe.directory '*' \
179179
&& flutter config --no-analytics \
180180
&& flutter precache --android \
@@ -185,7 +185,7 @@ RUN git config --system --add safe.directory '*'
185185
RUN flutter --version && rustc --version && cargo --version && go version
186186

187187

188-
# Minimal image for flutter test (no Rust, no Android SDK, no cross-compilers)
188+
# Image for flutter test (no Android SDK or cross-compilers)
189189
FROM ubuntu:24.04 AS test
190190

191191
ENV DEBIAN_FRONTEND=noninteractive \
@@ -203,6 +203,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
203203
libjsoncpp-dev liblzma-dev libsecret-1-dev libssl-dev \
204204
&& rm -rf /var/lib/apt/lists/*
205205

206+
# Epic/MWC use prebuilts; frostdart still compiles through its native-assets hook.
207+
ENV RUSTUP_HOME=/usr/local/rustup \
208+
CARGO_HOME=/usr/local/cargo \
209+
PATH=/usr/local/cargo/bin:$PATH
210+
211+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
212+
| sh -s -- -y --default-toolchain 1.90.0 --profile minimal --no-modify-path \
213+
&& chmod -R a+rwX "$CARGO_HOME" "$RUSTUP_HOME"
214+
206215
ENV PATH=/usr/local/go/bin:$PATH
207216

208217
RUN curl -fsSL https://go.dev/dl/go1.24.13.linux-amd64.tar.gz -o /tmp/go.tar.gz \
@@ -213,7 +222,7 @@ RUN curl -fsSL https://go.dev/dl/go1.24.13.linux-amd64.tar.gz -o /tmp/go.tar.gz
213222
ENV FLUTTER_HOME=/opt/flutter \
214223
PATH=/opt/flutter/bin:/opt/flutter/bin/cache/dart-sdk/bin:$PATH
215224

216-
RUN git clone --depth 1 --branch 3.44.9 https://github.com/flutter/flutter.git "$FLUTTER_HOME" \
225+
RUN git clone --depth 1 --branch 3.47.2 https://github.com/flutter/flutter.git "$FLUTTER_HOME" \
217226
&& git config --global --add safe.directory '*' \
218227
&& flutter config --no-analytics \
219228
&& flutter precache --linux \

0 commit comments

Comments
 (0)