Skip to content

Commit f7a4ed1

Browse files
committed
updates
1 parent 668d15d commit f7a4ed1

6 files changed

Lines changed: 115 additions & 154 deletions

File tree

.appveyor.yml

Lines changed: 75 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -22,89 +22,81 @@ environment:
2222
secure: trYGM65OQ1+HYnOYOe/NOHrofLpP3bz64nHwVWPJhiUIYll3MrrQd7ilFNp+zSkI
2323

2424
matrix:
25-
- job_name: Build Flet package for Flutter
26-
job_group: build_flet_package
27-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204
28-
29-
# - job_name: Integration tests on macOS
30-
# job_group: integration_tests
31-
# python_stack: python 3.10
32-
# APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
33-
# FLET_TEST_SCREENSHOTS_PIXEL_RATIO: 2.0
34-
# FLET_TEST_SCREENSHOTS_SIMILARITY_THRESHOLD: 99.0
35-
# FLET_TEST_DISABLE_FVM: 1
36-
37-
- job_name: Build Flet for Windows
38-
job_group: build_flet
39-
job_depends_on: build_flet_package
40-
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
41-
42-
- job_name: Build Flet for macOS
43-
job_group: build_flet
44-
job_depends_on: build_flet_package
45-
APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
46-
47-
- job_name: Build Flet for Linux
48-
job_group: build_flet_linux
49-
job_depends_on: build_flet_package
50-
ARCH: amd64
51-
PACKAGE_NAME: flet-desktop
52-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
53-
54-
- job_name: Build Flet Light for Linux
55-
job_group: build_flet_linux
56-
job_depends_on: build_flet_package
57-
ARCH: amd64
58-
PACKAGE_NAME: flet-desktop-light
59-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
60-
61-
- job_name: Build Flet for Linux ARM64
62-
job_group: build_flet_linux
63-
job_depends_on: build_flet_package
64-
ARCH: arm64
65-
PACKAGE_NAME: flet-desktop
66-
PYTHON_VERSION: 3.10
67-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004-arm
68-
69-
- job_name: Build Flet Light for Linux ARM64
70-
job_group: build_flet_linux
71-
job_depends_on: build_flet_package
72-
ARCH: arm64
73-
PACKAGE_NAME: flet-desktop-light
74-
PYTHON_VERSION: 3.10
75-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004-arm
76-
77-
- job_name: Build Flet for web
78-
job_group: build_flet
79-
job_depends_on: build_flet_package
80-
PYODIDE_URL: https://github.com/pyodide/pyodide/releases/download/0.27.7/pyodide-core-0.27.7.tar.bz2
81-
PYODIDE_CDN_URL: https://cdn.jsdelivr.net/pyodide/v0.27.7/full
82-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
83-
84-
- job_name: Test Python 3.10
85-
job_group: python_tests
86-
PYTHON_VERSION: 3.10
87-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
88-
89-
- job_name: Test Python 3.11
90-
job_group: python_tests
91-
PYTHON_VERSION: 3.11
92-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
93-
94-
- job_name: Test Python 3.12
95-
job_group: python_tests
96-
PYTHON_VERSION: 3.12
97-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
98-
99-
- job_name: Test Python 3.13
100-
job_group: python_tests
101-
PYTHON_VERSION: 3.13
102-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
103-
104-
- job_name: Build Python wheels
105-
job_group: python_build
106-
job_depends_on: python_tests, build_flet, build_flet_linux
107-
APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
25+
# - job_name: Build Flet package for Flutter
26+
# job_group: build_flet_package
27+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204
28+
#
29+
# - job_name: Build Flet for Windows
30+
# job_group: build_flet
31+
# job_depends_on: build_flet_package
32+
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
33+
#
34+
# - job_name: Build Flet for macOS
35+
# job_group: build_flet
36+
# job_depends_on: build_flet_package
37+
# APPVEYOR_BUILD_WORKER_IMAGE: macos-sonoma
38+
#
39+
# - job_name: Build Flet for Linux
40+
# job_group: build_flet_linux
41+
# job_depends_on: build_flet_package
42+
# ARCH: amd64
43+
# PACKAGE_NAME: flet-desktop
44+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
45+
#
46+
# - job_name: Build Flet Light for Linux
47+
# job_group: build_flet_linux
48+
# job_depends_on: build_flet_package
49+
# ARCH: amd64
50+
# PACKAGE_NAME: flet-desktop-light
51+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
52+
#
53+
# - job_name: Build Flet for Linux ARM64
54+
# job_group: build_flet_linux
55+
# job_depends_on: build_flet_package
56+
# ARCH: arm64
57+
# PACKAGE_NAME: flet-desktop
58+
# PYTHON_VERSION: 3.10
59+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004-arm
60+
#
61+
# - job_name: Build Flet Light for Linux ARM64
62+
# job_group: build_flet_linux
63+
# job_depends_on: build_flet_package
64+
# ARCH: arm64
65+
# PACKAGE_NAME: flet-desktop-light
66+
# PYTHON_VERSION: 3.10
67+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004-arm
68+
#
69+
# - job_name: Build Flet for web
70+
# job_group: build_flet
71+
# job_depends_on: build_flet_package
72+
# PYODIDE_URL: https://github.com/pyodide/pyodide/releases/download/0.27.7/pyodide-core-0.27.7.tar.bz2
73+
# PYODIDE_CDN_URL: https://cdn.jsdelivr.net/pyodide/v0.27.7/full
74+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
75+
#
76+
# - job_name: Test Python 3.10
77+
# job_group: python_tests
78+
# PYTHON_VERSION: 3.10
79+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
80+
#
81+
# - job_name: Test Python 3.11
82+
# job_group: python_tests
83+
# PYTHON_VERSION: 3.11
84+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
85+
#
86+
# - job_name: Test Python 3.12
87+
# job_group: python_tests
88+
# PYTHON_VERSION: 3.12
89+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
90+
#
91+
# - job_name: Test Python 3.13
92+
# job_group: python_tests
93+
# PYTHON_VERSION: 3.13
94+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
95+
#
96+
# - job_name: Build Python wheels
97+
# job_group: python_build
98+
# job_depends_on: python_tests, build_flet, build_flet_linux
99+
# APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004
108100

109101
matrix:
110102
fast_finish: true
@@ -158,27 +150,6 @@ for:
158150
159151
fi
160152
161-
###########################
162-
# Integration Tests #
163-
###########################
164-
- matrix:
165-
only:
166-
- job_group: integration_tests
167-
168-
install:
169-
- HOMEBREW_NO_AUTO_UPDATE=1 brew install cocoapods
170-
- source ci/common.sh
171-
- source ci/install_flutter.sh
172-
173-
build: off
174-
175-
test_script:
176-
- cd sdk/python
177-
- uv run pytest -s -o log_cli=true -o log_cli_level=INFO packages/flet/integration_tests
178-
179-
on_failure:
180-
- find packages/flet/integration_tests -type f -name '*_actual.png' -exec appveyor PushArtifact {} \;
181-
182153
# ======================================
183154
# Build Flet Client for Windows
184155
# ======================================

.github/scripts/clean-pypi.sh

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# set PYPI_CLEANUP_PASSWORD with pypi.org password
22

33
VER="0\.70\.0\.dev(?!5399)"
4-
uv run --with pypi-cleanup pypi-cleanup -u flet -p flet -y -r $VER --do-it
5-
uv run --with pypi-cleanup pypi-cleanup -u flet -p flet-cli -y -r $VER --do-it
6-
uv run --with pypi-cleanup pypi-cleanup -u flet -p flet-desktop -y -r $VER --do-it
7-
uv run --with pypi-cleanup pypi-cleanup -u flet -p flet-desktop-light -y -r $VER --do-it
8-
uv run --with pypi-cleanup pypi-cleanup -u flet -p flet-web -y -r $VER --do-it
4+
uv tool install pypi-cleanup
5+
uvx pypi-cleanup -u flet -p flet -y -r $VER --do-it
6+
uvx pypi-cleanup -u flet -p flet-cli -y -r $VER --do-it
7+
uvx pypi-cleanup -u flet -p flet-desktop -y -r $VER --do-it
8+
uvx pypi-cleanup -u flet -p flet-desktop-light -y -r $VER --do-it
9+
uvx pypi-cleanup -u flet -p flet-web -y -r $VER --do-it

.github/scripts/common.sh

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
export root=$APPVEYOR_BUILD_FOLDER
1+
export root=$GITHUB_WORKSPACE
22
export flet_sdk_root=$root/sdk/python
33
echo "flet_sdk_root: $flet_sdk_root"
44

5-
curl -LsSf https://astral.sh/uv/install.sh | sh
6-
export PATH="$HOME/.local/bin:$PATH"
7-
uv python install $PYTHON_VERSION
8-
uv python pin $PYTHON_VERSION
9-
uv run python --version
5+
# export PATH=$HOME/.local/bin:$PATH
106

117
function patch_python_package_versions() {
12-
PYPI_VER="${APPVEYOR_BUILD_VERSION/+/.dev}"
138
sed -i -e "s/version = \"\"/version = \"$PYPI_VER\"/g" $flet_sdk_root/packages/flet/src/flet/version.py
149
sed -i -e "s/version = \"\"/version = \"$PYPI_VER\"/g" $flet_sdk_root/packages/flet-cli/src/flet_cli/version.py
1510
sed -i -e "s/version = \"\"/version = \"$PYPI_VER\"/g" $flet_sdk_root/packages/flet-desktop/src/flet_desktop/version.py
1611
sed -i -e "s/version = \"\"/version = \"$PYPI_VER\"/g" $flet_sdk_root/packages/flet-web/src/flet_web/version.py
17-
uv run --with tomlkit $root/ci/patch_toml_versions.py $flet_sdk_root/packages/flet/pyproject.toml $PYPI_VER
18-
uv run --with tomlkit $root/ci/patch_toml_versions.py $flet_sdk_root/packages/flet-cli/pyproject.toml $PYPI_VER
19-
uv run --with tomlkit $root/ci/patch_toml_versions.py $flet_sdk_root/packages/flet-desktop/pyproject.toml $PYPI_VER
20-
uv run --with tomlkit $root/ci/patch_toml_versions.py $flet_sdk_root/packages/flet-web/pyproject.toml $PYPI_VER
12+
13+
uv run --directory $flet_sdk_root --no-dev
14+
uv version --package flet $PYPI_VER
15+
uv version --package flet-cli $PYPI_VER
16+
uv version --package flet-desktop $PYPI_VER
17+
uv version --package flet-web $PYPI_VER
2118
}
2219

2320
function patch_flet_desktop_package_name() {
24-
uv run --with tomlkit $root/ci/patch_toml_package_name.py $flet_sdk_root/packages/flet-desktop/pyproject.toml $1
21+
uv run $root/ci/patch_toml_package_name.py $flet_sdk_root/packages/flet-desktop/pyproject.toml $1
2522
}
2623

2724
function publish_to_pypi() {
28-
if [[ ("$APPVEYOR_REPO_BRANCH" == "main" || "$APPVEYOR_REPO_TAG_NAME" != "") && "$APPVEYOR_PULL_REQUEST_NUMBER" == "" ]]; then
25+
# If (branch == main OR tag) AND not a PR -> upload to PyPI
26+
# Else if not a PR -> upload to Gemfury
27+
if { [[ ${GITHUB_EVENT_NAME:-} != "pull_request" ]] && { [[ ${GITHUB_REF_NAME:-} == "main" ]] || [[ ${GITHUB_REF_TYPE:-} == "tag" ]]; }; }; then
2928
uvx twine upload "$@"
30-
elif [[ "$APPVEYOR_PULL_REQUEST_NUMBER" == "" ]]; then
29+
elif [[ ${GITHUB_EVENT_NAME:-} != "pull_request" ]]; then
3130
for wheel in "$@"; do
3231
curl -F package=@$wheel https://$GEMFURY_TOKEN@push.fury.io/flet/
3332
done

.github/scripts/install_flutter.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/scripts/update_build_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ else
5252
export PKG_VER="${major}.${minor}.0"
5353

5454
# Append the GitHub Actions run number for uniqueness
55-
export BUILD_VER="${PKG_VER}+$((GITHUB_RUN_NUMBER + 500))"
55+
export BUILD_VER="${PKG_VER}+$((GITHUB_RUN_NUMBER + 6000))"
5656
fi
5757

5858
# -------------------------------------------------------------

.github/workflows/ci.yml

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,9 @@ jobs:
3636
- name: Setup uv
3737
uses: astral-sh/setup-uv@v6
3838

39-
- name: Compute PKG_VER
40-
id: ver
41-
shell: bash
39+
- name: Compute versions
4240
run: |
43-
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
44-
PKG_VER="${GITHUB_REF_NAME#v}"
45-
else
46-
last="$(git describe --abbrev=0 --tags 2>/dev/null || echo v0.0.0)"
47-
IFS=. read -r major minor patch <<<"${last#v}"
48-
PKG_VER="${major}.$((minor+1)).0+${GITHUB_RUN_NUMBER}"
49-
fi
50-
echo "PKG_VER=$PKG_VER" | tee -a $GITHUB_ENV
51-
echo "version=$PKG_VER" >> $GITHUB_OUTPUT
41+
source .github/scripts/update_build_version.sh
5242
5343
- name: Source .github/scripts/common.sh
5444
shell: bash
@@ -71,20 +61,20 @@ jobs:
7161
# Configure Dart credentials from secret
7262
mkdir -p "$HOME/.config/dart"
7363
echo -n "$PUB_DEV_TOKEN" | base64 --decode > "$HOME/.config/dart/pub-credentials.json" || exit 1
74-
64+
7565
# Patch pubspecs with release version
7666
for dir in packages/flet*; do
7767
echo "Patching $dir/pubspec.yaml"
7868
uv run ci/patch_pubspec.py "$dir/pubspec.yaml" "$PKG_VER" || exit 1
7969
done
80-
70+
8171
# Run Flutter tests and publish to pub.dev
8272
cd packages/flet || exit 1
8373
echo "Running flet tests"
8474
flutter test || exit 1
8575
dart pub publish --force || exit 1
8676
cd "$GITHUB_WORKSPACE" || exit 1
87-
77+
8878
else
8979
# Not a tag: run tests and do a dry-run publish
9080
cd packages/flet || exit 1
@@ -279,9 +269,12 @@ jobs:
279269
steps:
280270
- name: Checkout repository
281271
uses: actions/checkout@v4
272+
273+
- name: Setup Flutter
274+
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
282275
with:
283-
fetch-depth: 0 # fetch all history
284-
fetch-tags: true # ensure tags are available
276+
path: '.fvmrc'
277+
cache: true
285278

286279
- name: Install deps
287280
shell: bash
@@ -293,8 +286,6 @@ jobs:
293286
if [[ "${PACKAGE_NAME}" == "flet-desktop" ]]; then
294287
sudo apt install -y libmpv-dev mpv libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
295288
fi
296-
source .github/scripts/install_flutter.sh
297-
flutter --version
298289
299290
- name: Build Flutter Linux client
300291
shell: bash
@@ -376,7 +367,13 @@ jobs:
376367
- name: Checkout repository
377368
uses: actions/checkout@v4
378369

379-
- name: Install deps & Flutter
370+
- name: Setup Flutter
371+
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
372+
with:
373+
path: '.fvmrc'
374+
cache: true
375+
376+
- name: Install dependencies
380377
shell: bash
381378
run: |
382379
source .github/scripts/common.sh
@@ -387,8 +384,6 @@ jobs:
387384
fi
388385
git clone https://github.com/flutter/flutter.git -b stable "$HOME/flutter"
389386
echo "$HOME/flutter/bin" >> $GITHUB_PATH
390-
source .github/scripts/install_flutter.sh
391-
flutter --version
392387
393388
- name: Build Flutter Linux client
394389
shell: bash
@@ -518,20 +513,20 @@ jobs:
518513
steps:
519514
- name: Checkout repository
520515
uses: actions/checkout@v4
521-
516+
522517
- name: Setup uv
523518
uses: astral-sh/setup-uv@v6
524519
with:
525520
python-version: ${{ matrix.python-version }}
526-
521+
527522
- name: Run tests
528523
shell: bash
529524
run: |
530525
source .github/scripts/common.sh
531526
cd sdk/python
532527
uv run --group test pytest packages/flet/tests
533528
uv run --directory packages/flet --group docs-coverage docstr-coverage > docstr_coverage.log 2>&1
534-
529+
535530
- name: Upload test logs
536531
uses: actions/upload-artifact@v4
537532
with:

0 commit comments

Comments
 (0)