Skip to content

Merge pull request #378 from OwnWeb/feat/expose-config #110

Merge pull request #378 from OwnWeb/feat/expose-config

Merge pull request #378 from OwnWeb/feat/expose-config #110

Workflow file for this run

name: build
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the develop branch
on:
push:
branches: [develop, main]
paths:
- "flutter_cache_manager/**"
- ".github/workflows/**"
pull_request:
branches: [develop]
paths:
- "flutter_cache_manager/**"
- ".github/workflows/**"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
format:
name: Format
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
source-directory: ./flutter_cache_manager
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Run Flutter Format to ensure formatting is valid
- name: Run Flutter Format
run: dart format --set-exit-if-changed .
working-directory: ${{env.source-directory}}
analyze:
name: Analyze
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
source-directory: ./flutter_cache_manager
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Run Flutter Analyzer
- name: Run Flutter Analyzer
run: flutter analyze
working-directory: ${{env.source-directory}}
build_android:
name: Build Android App
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
source-directory: ./flutter_cache_manager
example-directory: ./flutter_cache_manager/example
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Ensure correct JAVA version is installed.
- uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: "17"
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Build Android version of the example App
- name: Run Android build
run: flutter build apk --release
working-directory: ${{env.example-directory}}
build_ios:
name: Build iOS App
# The type of runner that the job will run on
runs-on: macos-latest
env:
source-directory: ./flutter_cache_manager
example-directory: ./flutter_cache_manager/example
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Build iOS version of the example App
- name: Run iOS build
run: flutter build ios --release --no-codesign
working-directory: ${{env.example-directory}}
build_macOS:
name: Build macOS App
# The type of runner that the job will run on
runs-on: macos-latest
env:
source-directory: ./flutter_cache_manager
example-directory: ./flutter_cache_manager/example
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Enable platform support
- name: Enable macOS
run: flutter config --enable-macos-desktop
working-directory: ${{env.source-directory}}
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Build macOS version of the example App
- name: Run macOS build
run: flutter build macos --release
working-directory: ${{env.example-directory}}
build_windows:
name: Build Windows App
# The type of runner that the job will run on
runs-on: windows-latest
env:
source-directory: ./flutter_cache_manager
example-directory: ./flutter_cache_manager/example
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Enable platform support
- name: Enable Windows
run: flutter config --enable-windows-desktop
working-directory: ${{env.source-directory}}
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Build iOS version of the example App
- name: Run Windows build
run: flutter build windows --release
working-directory: ${{env.example-directory}}
build_linux:
name: Build Linux App
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
source-directory: ./flutter_cache_manager
example-directory: ./flutter_cache_manager/example
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Install libraries for Linux
- run: sudo apt-get update -y
- run: sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Enable platform support
- name: Enable Linux
run: flutter config --enable-linux-desktop
working-directory: ${{env.source-directory}}
# Enable platform support
- name: Flutter Doctor
run: flutter doctor
working-directory: ${{env.source-directory}}
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Build iOS version of the example App
- name: Run Linux build
run: flutter build linux --release
working-directory: ${{env.example-directory}}
build_web:
name: Build Web App
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
source-directory: ./flutter_cache_manager
example-directory: ./flutter_cache_manager/example
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Build Web version of the example App
- name: Run Web build
run: flutter build web --release
working-directory: ${{env.example-directory}}
tests:
name: Unit-tests
# The type of runner that the job will run on
runs-on: ubuntu-latest
env:
source-directory: ./flutter_cache_manager
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
# Make sure the stable version of Flutter is available
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
architecture: x64
cache: true
# Download all Flutter packages
- name: Download dependencies
run: flutter pub get
working-directory: ${{env.source-directory}}
# Run all unit-tests with code coverage
- name: Run unit tests
run: flutter test --coverage
working-directory: ${{env.source-directory}}
# # Upload code coverage information
# - uses: codecov/codecov-action@v4
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# with:
# files: ${{env.source-directory}}/coverage/lcov.info
# name: CacheManager
# fail_ci_if_error: true