Skip to content

Commit b0f8b0b

Browse files
feat(ci): implement hybrid caching with Task fingerprinting
**Workflow Changes:** - Add Task checksum cache for incremental build optimization - Replace direct fastlane call with `task ios:testflight` - Install go-task via homebrew in CI - Cache Task's .task directory with source-based cache key **Taskfile Enhancements:** - Add fingerprinting to ios:testflight task - Track sources: Rust code, Cargo files, tauri config, dist files, fastlane files - Generate IPA artifacts as output markers - Use checksum method for file change detection - Add dependencies on npm:install and ios:init **Benefits:** - Task can skip builds when sources unchanged (even across CI runs) - Centralized build logic (same commands locally and in CI) - Reduced duplication between Actions cache and Task fingerprinting - Better incremental build performance with cached checksums Related: #optimization #taskfile #caching
1 parent 2c27bc9 commit b0f8b0b

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

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

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,19 @@ jobs:
8484
if: steps.cache-homebrew.outputs.cache-hit == 'true'
8585
run: brew link --overwrite xcodegen libimobiledevice 2>/dev/null || true
8686

87-
- name: Install npm dependencies
88-
run: npm ci
87+
- name: Cache Task checksums
88+
uses: actions/cache@v5
89+
with:
90+
path: .task
91+
key: ${{ runner.os }}-task-${{ hashFiles('Taskfile.yml', 'taskfiles/**/*.yml', 'src-tauri/**/*.rs', 'src-tauri/Cargo.toml', 'src-tauri/Cargo.lock') }}
92+
restore-keys: |
93+
${{ runner.os }}-task-
94+
95+
- name: Install Task
96+
uses: go-task/setup-task@v1
8997

9098
- name: Build and upload to TestFlight
91-
run: bundle exec fastlane beta
99+
run: task ios:testflight
92100
env:
93101
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
94102
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

taskfiles/tauri.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,18 @@ tasks:
268268

269269
ios:testflight:
270270
desc: "Build and upload to TestFlight"
271+
deps: [":npm:install", "ios:init"]
272+
sources:
273+
- "{{.TAURI_DIR}}/src/**/*.rs"
274+
- "{{.TAURI_DIR}}/Cargo.toml"
275+
- "{{.TAURI_DIR}}/Cargo.lock"
276+
- "{{.TAURI_DIR}}/tauri.conf.json"
277+
- "{{.TAURI_DIR}}/dist/**/*"
278+
- "{{.ROOT_DIR}}/fastlane/Fastfile"
279+
- "{{.ROOT_DIR}}/fastlane/Appfile"
280+
generates:
281+
- "{{.TAURI_DIR}}/gen/apple/build/**/*.ipa"
282+
method: checksum
271283
cmds:
272284
- fastlane beta
273285

0 commit comments

Comments
 (0)