From 96c9c74151771add790c53d55417bba00bd5cb83 Mon Sep 17 00:00:00 2001 From: GuettliBot2 Date: Sun, 17 May 2026 07:15:12 +0200 Subject: [PATCH] ... --- .daggerignore | 81 +++---------------- .envrc | 2 + .forgejo/workflows/android-emulator-tests.yml | 3 + ci/main.go | 17 ++++ 4 files changed, 35 insertions(+), 68 deletions(-) diff --git a/.daggerignore b/.daggerignore index 682e250..33abc9c 100644 --- a/.daggerignore +++ b/.daggerignore @@ -1,75 +1,20 @@ +# Dagger context ignore file. +# Since we use explicit inclusion in ci/main.go (Base function), +# we only need to ignore large or sensitive directories here to +# avoid unnecessary upload overhead to the Dagger engine. + .git/ -.git -.local/ -.local -.cache/ -.cache -.config/ -.config -.atuin/ -.atuin -.direnv/ -.direnv -.gemini/ -.gemini -.rustup/ -.rustup -.ssh/ -.ssh -.vscode/ -.vscode -.vscode-server/ -.vscode-server -.copilot/ -.copilot -.dartServer/ -.dartServer -.dart_tool/ -.dart_tool -.dart-tool/ -.dart-tool -.flutter/ -.flutter -.pub-cache/ -.pub-cache -fvm/ -fvm -snap/ -snap -node_modules/ -node_modules build/ -build -android/.gradle/ -.gradle/ -.gradle -Android/ -Android -.android/ -.android +.dart_tool/ +.fvm/ +.pub-cache/ +node_modules/ ios/Pods/ macos/Pods/ linux/flutter/ephemeral/ website/public/ website/resources/ -*.log -run*.log -test_results.txt -test_output.txt -md5_*.txt -IGNORE_ME -.env -.envrc -.gitconfig -.lesshst -.tmux.conf -.wget-hsts -.zcompdump -.zshrc -.bash_logout -.bashrc -.profile -.nix-profile -.flutter-plugins-dependencies -.dart-cli-completion/ -.dart-cli-completion + +# Sensitive files +.env* +.ssh/ diff --git a/.envrc b/.envrc index 1859508..6b86938 100644 --- a/.envrc +++ b/.envrc @@ -14,5 +14,7 @@ PATH_add .fvm/flutter_sdk/bin PATH_add "$HOME/Android/Sdk/platform-tools" +export DAGGER_NO_NAG=1 + # Load variables from .env dotenv_if_exists diff --git a/.forgejo/workflows/android-emulator-tests.yml b/.forgejo/workflows/android-emulator-tests.yml index 6e7f037..2af9349 100644 --- a/.forgejo/workflows/android-emulator-tests.yml +++ b/.forgejo/workflows/android-emulator-tests.yml @@ -1,3 +1,6 @@ +# We switched to Dagger. Running the emulator tests in Dagger does not really work +# We will use an external service for device testing. +# TODO: Switch to device testing. First choose a service. Maybe codemagic.io name: Android Emulator Tests (Disabled) on: diff --git a/ci/main.go b/ci/main.go index 14b20f3..2bc5430 100644 --- a/ci/main.go +++ b/ci/main.go @@ -10,6 +10,23 @@ type Ci struct{} // Base container with all dependencies for Flutter and Linux builds func (m *Ci) Base(source *dagger.Directory) *dagger.Container { + // Surgical inclusion: only take what is strictly needed for the build/test. + // This improves caching by ignoring transient or irrelevant files. + source = source.Filter(dagger.DirectoryFilterOpts{ + Include: []string{ + "lib/", + "test/", + "assets/", + "scripts/", + "pubspec.yaml", + "analysis_options.yaml", + "linux/", + "android/", + "integration_test/", + "drift_schemas/", + }, + }) + return dag.Container(). From("ghcr.io/cirruslabs/flutter:3.41.6"). WithExec([]string{"apt-get", "update"}).