From e1fcef6364c14da6f6a64271d94cfc74e5d8d8cc Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 19 Sep 2026 13:04:40 +0300 Subject: [PATCH] =?UTF-8?q?ci(app):=20Flutter=20CI-=D0=B4=D0=B6=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=20+=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B0=20Linux?= =?UTF-8?q?/Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit analyze+test и flutter build linux/windows в отдельных джобах по образцу backend. Линуксовая сборка требует libsecret-1-dev/pkg-config (apt) и подавления -Werror=deprecated-literal-operator в CMake — flutter_secure_storage_linux вендорит старый nlohmann/json.hpp, который на новых компиляторах иначе не собирается. --- .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ app/linux/CMakeLists.txt | 10 +++++++++ 2 files changed, 57 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57acf22..9bfef85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,50 @@ jobs: run: | uv run fintracker openapi /tmp/openapi.json diff -u ../openapi/openapi.json /tmp/openapi.json + + app: + runs-on: ubuntu-latest + defaults: + run: + working-directory: app + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.47.4" + channel: stable + - run: flutter pub get + - run: flutter analyze + - run: flutter test + + app-build-linux: + runs-on: ubuntu-latest + defaults: + run: + working-directory: app + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.47.4" + channel: stable + - name: install Linux desktop build dependencies + run: | + sudo apt-get update + sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev + - run: flutter pub get + - run: flutter build linux --release + + app-build-windows: + runs-on: windows-latest + defaults: + run: + working-directory: app + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.47.4" + channel: stable + - run: flutter pub get + - run: flutter build windows --release diff --git a/app/linux/CMakeLists.txt b/app/linux/CMakeLists.txt index fdc509d..f4723a7 100644 --- a/app/linux/CMakeLists.txt +++ b/app/linux/CMakeLists.txt @@ -70,6 +70,16 @@ set_target_properties(${BINARY_NAME} ) +# flutter_secure_storage_linux vendors an old single-header nlohmann/json.hpp +# that trips modern Clang's -Werror=deprecated-literal-operator (whitespace +# before a literal-operator suffix, e.g. `operator"" _json`). We don't control +# that vendored header, so silence just this warning for everything added +# below (must come before add_subdirectory pulls the plugins in — Clang picks +# it up because add_compile_options affects this directory scope and every +# add_subdirectory call after it, which is how generated_plugins.cmake adds +# the plugin targets). +add_compile_options(-Wno-deprecated-literal-operator) + # Generated plugin build rules, which manage building the plugins and adding # them to the application. include(flutter/generated_plugins.cmake)