Skip to content

Commit

Permalink
Prepare version 1.3.0 (#1)
Browse files Browse the repository at this point in the history
- Added
  1. Inputs `installationPath`, `actionsCache`, `actionsCacheKey` and
     `flutterPrecache`.

- Removed
  1. depth 1 from git clone command, so that Flutter tool can construct
     version from non-tagged references.
  • Loading branch information
hrishikesh-kadam authored Mar 25, 2023
1 parent cfd0cbb commit ad1ab38
Show file tree
Hide file tree
Showing 15 changed files with 375 additions and 164 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci-compare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI for comparison

on:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
test-uncached-jobs:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
actionsCacheKey: 'flutter-${{ runner.os }}-compare'

test-cached-jobs:
needs: test-uncached-jobs
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
actionsCacheKey: 'flutter-${{ runner.os }}-compare'
103 changes: 55 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# runner: [ ubuntu-latest, windows-latest ]
runner: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
- run: flutter --version
Expand All @@ -36,86 +35,94 @@ jobs:
if: runner.os == 'Windows'
shell: powershell

# TODO: Add test-setup-flutter-with-setFlutterRootPath
test-with-ref:
needs: test-basic
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
ref: 'beta'

test-with-setPubCachePath:
test-with-actionsCache:
needs: test-basic
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
# runner: [ ubuntu-latest ]
runner: [ ubuntu-latest, macos-latest ]
pubCachePath: [ '$HOME/.pub-cache-new' ]
include:
- runner: windows-latest
pubCachePath: '$LOCALAPPDATA\NewPub\Cache'
- runner: ubuntu-latest
pubCachePath: '/home/runner/.pub-cache-new'
- runner: windows-latest
pubCachePath: 'C:\Users\runneradmin\AppData\Local\NewPub\Cache'
- runner: macos-latest
pubCachePath: '/Users/runner/.pub-cache-new'
runner: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
setPubCachePath: ${{ matrix.pubCachePath }}
- run: |
set -x
flutter create myapp
cd myapp
flutter pub get
ls $PUB_CACHE/hosted/pub.dev
actionsCache: 'false'

test-with-addPubCacheBinToPath:
test-with-flutterPrecache:
needs: test-basic
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
# runner: [ ubuntu-latest, windows-latest ]
runner: [ ubuntu-latest, windows-latest, macos-latest ]
include:
- runner: ubuntu-latest
actionsCache: 'true'
- runner: ubuntu-latest
actionsCache: 'false'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
setFlutterRootPath: 'true'
addPubCacheBinToPath: 'true'
- run: dart pub global activate devtools
- if: runner.os != 'Windows'
run: devtools --help
- if: runner.os == 'Windows'
shell: pwsh
run: devtools --help
- run: |
DEFAULT_PUB_CACHE=$(./src/get-pub-cache-path.sh)
echo "::debug::DEFAULT_PUB_CACHE=$DEFAULT_PUB_CACHE"
ls $DEFAULT_PUB_CACHE/global_packages
actionsCache: ${{ matrix.actionsCache }}
flutterPrecache: '--linux --web'

test-with-all:
test-with-almost-all:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
# runner: [ ubuntu-latest ]
runner: [ ubuntu-latest, macos-latest ]
pubCachePath: [ '$HOME/.pub-cache-new' ]
pubCachePath: [ '$HOME/.pub-cache-foo' ]
include:
- runner: windows-latest
pubCachePath: '$LOCALAPPDATA\NewPub\Cache'
pubCachePath: '$LOCALAPPDATA\FooPub\Cache'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Flutter
uses: ./
with:
installationPath: '${{ runner.tool_cache }}/flutter-foo'
actionsCacheKey: 'flutter-${{ runner.os }}-almost-all'
setFlutterRootPath: 'true'
setPubCachePath: ${{ matrix.pubCachePath }}
addPubCacheBinToPath: 'true'
- run: dart pub global activate devtools
flutterPrecache: 'true'
# installationPath
- run: type -a flutter
# setFlutterRootPath
- if: runner.os != 'Windows'
run: echo "FLUTTER_ROOT=$FLUTTER_ROOT"
- if: runner.os == 'Windows'
shell: pwsh
run: echo "FLUTTER_ROOT=$FLUTTER_ROOT"
# setPubCachePath
- run: |
set -x
flutter create myapp
cd myapp
flutter pub get
ls $PUB_CACHE/hosted/pub.dev
# addPubCacheBinToPath
- run: dart pub global activate markdown
- if: runner.os != 'Windows'
run: devtools --help
run: markdown --help
- if: runner.os == 'Windows'
shell: pwsh
run: devtools --help
run: markdown --help
- run: ls $PUB_CACHE/global_packages
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
node_modules
.idea
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/scopes/Except__gitignored.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/setup-flutter.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

34 changes: 20 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.3.0] - 2023-03-25
### Added
- Inputs `installationPath`, `actionsCache`, `actionsCacheKey` and `flutterPrecache`.

### Removed
- depth 1 from git clone command, so that Flutter tool can construct version from non-tagged references.

## [1.2.0] - 2021-12-29
### Changed
- Input `setPubCachePath` <br/><br/>
- Input `setPubCachePath`

For Windows runners, it now accepts bash understandable paths instead of <br/>
pwsh understandable paths. <br/>
Example: Previously - <br/>
`setPubCachePath: '$env:LOCALAPPDATA\Pub\Cache'` <br/>
Now - <br/>
`setPubCachePath: '$LOCALAPPDATA\Pub\Cache'` <br/><br/>
For Windows runners, it now accepts bash understandable paths instead of pwsh understandable paths.
Example: Previously -
`setPubCachePath: '$env:LOCALAPPDATA\Pub\Cache'`
Now -
`setPubCachePath: '$LOCALAPPDATA\Pub\Cache'`

For Ubuntu and macOS runners, avoid using tilde `~` in paths. <br/>
Example: Previously - <br/>
`setPubCachePath: '~/.pub-cache'` <br/>
Now - <br/>
`setPubCachePath: '$HOME/.pub-cache'` <br/>
For Ubuntu and macOS runners, avoid using tilde `~` in paths.
Example: Previously -
`setPubCachePath: '~/.pub-cache'`
Now -
`setPubCachePath: '$HOME/.pub-cache'`

## [1.1.1] - 2021-12-23
### Fixed
- Input addPubCacheBinToPath
- Input `addPubCacheBinToPath`

## [1.1.0] - 2021-12-22
### Added
- Inputs setFlutterRootPath, setPubCachePath and addPubCacheBinToPath.
- Inputs `setFlutterRootPath`, `setPubCachePath` and `addPubCacheBinToPath`.

## [1.0.0] - 2021-12-10
Initial release
Loading

0 comments on commit ad1ab38

Please sign in to comment.