Remove tar actions/cache in setup-flutter in favor of instant persistent disk SDK reuse
Update README Actions Table / update-readme (push) Failing after 3s
Update README Actions Table / update-readme (push) Failing after 3s
This commit is contained in:
+5
-16
@@ -1,42 +1,31 @@
|
||||
# Setup Flutter
|
||||
|
||||
Cross-platform composite action to set up the Flutter SDK with automated caching on macOS, Windows, and Linux. Supports local Git mirrors with automatic fallback to upstream GitHub.
|
||||
Cross-platform composite action to set up the Flutter SDK with concurrency locking and local Git mirror support on macOS, Windows, and Linux.
|
||||
|
||||
## Features
|
||||
|
||||
- **Multi-OS Support**: Native setup for macOS (Apple Silicon & Intel), Windows (PowerShell), and Linux.
|
||||
- **Git Mirror & Fallback**: Clones from local Gitea Flutter mirror (`https://git.rodydavis.dev/rodydavis/flutter.git`) with automatic fallback to `https://github.com/flutter/flutter.git`.
|
||||
- **SDK Caching**: Uses `actions/cache@v3` to cache the full Flutter SDK directory across workflow runs based on OS, CPU architecture, and version.
|
||||
- **Fast Local Disk Caching & Concurrency Locks**: Reuses persistent runner SDK installations on disk without expensive tar compression steps or race conditions between parallel jobs.
|
||||
- **Desktop Windowing**: Automatically configures desktop windowing support and exports Flutter to `$GITHUB_PATH`.
|
||||
|
||||
## Inputs
|
||||
|
||||
| Name | Description | Required | Default |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `version` | Flutter channel, tag, or branch (e.g., `master`, `stable`, `3.29.0`). | No | `master` |
|
||||
| `version` | Flutter channel, tag, or commit hash (e.g., `master`, `stable`, `3.29.0`, `4ebf37fe...`). | No | `master` |
|
||||
| `mirror_url` | Git repository URL for Flutter SDK mirror. | No | `https://git.rodydavis.dev/rodydavis/flutter.git` |
|
||||
| `git_token` | Gitea token for authenticated git mirror access. | No | `''` |
|
||||
| `cache` | Enable Flutter SDK caching across CI runs. | No | `true` |
|
||||
| `enable_windowing` | Enable desktop windowing and platform configs. | No | `true` |
|
||||
|
||||
## Example Usage
|
||||
|
||||
### Basic Usage (Master Channel)
|
||||
### Pinned Commit Hash
|
||||
|
||||
```yaml
|
||||
- name: Set up Flutter
|
||||
uses: rodydavis/shared-actions/setup-flutter@main
|
||||
with:
|
||||
version: master
|
||||
version: 4ebf37fe7df0a130ba5bee17315b98f905c10b34
|
||||
git_token: ${{ secrets.GIT_TOKEN }}
|
||||
```
|
||||
|
||||
### Specific Version Tag with Caching
|
||||
|
||||
```yaml
|
||||
- name: Set up Flutter 3.29.0
|
||||
uses: rodydavis/shared-actions/setup-flutter@main
|
||||
with:
|
||||
version: '3.29.0'
|
||||
cache: 'true'
|
||||
```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 'Setup Flutter'
|
||||
description: 'Cross-platform setup for Flutter with caching on macOS, Windows, and Linux.'
|
||||
description: 'Cross-platform setup for Flutter with local mirror and multi-runner concurrency support.'
|
||||
inputs:
|
||||
version:
|
||||
description: 'Flutter channel, version tag, or commit hash (e.g., master, stable, 3.29.0, 4ebf37fe7df0a130ba5bee17315b98f905c10b34)'
|
||||
@@ -13,10 +13,6 @@ inputs:
|
||||
description: 'Gitea token for authenticated git cloning'
|
||||
required: false
|
||||
default: ''
|
||||
cache:
|
||||
description: 'Enable Flutter SDK caching'
|
||||
required: false
|
||||
default: 'true'
|
||||
enable_windowing:
|
||||
description: 'Enable windowing and desktop support'
|
||||
required: false
|
||||
@@ -25,24 +21,8 @@ inputs:
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Determine Cache Key
|
||||
id: cache-key
|
||||
shell: bash
|
||||
run: |
|
||||
echo "key=flutter-${{ runner.os }}-${{ runner.arch }}-${{ inputs.version }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache Flutter SDK
|
||||
if: inputs.cache == 'true'
|
||||
id: flutter-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/flutter-sdk
|
||||
C:\flutter-sdk
|
||||
key: ${{ steps.cache-key.outputs.key }}
|
||||
|
||||
- name: Install Flutter (macOS / Linux)
|
||||
if: runner.os != 'Windows' && steps.flutter-cache.outputs.cache-hit != 'true'
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
LOCK_DIR="${TMPDIR:-/tmp}/flutter-sdk-setup.lock"
|
||||
@@ -82,7 +62,7 @@ runs:
|
||||
rm -rf "$LOCK_DIR" || true
|
||||
|
||||
- name: Install Flutter (Windows)
|
||||
if: runner.os == 'Windows' && steps.flutter-cache.outputs.cache-hit != 'true'
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: |
|
||||
$lockDir = Join-Path $env:TEMP "flutter-sdk-setup.lock"
|
||||
|
||||
Reference in New Issue
Block a user