Skip to content

Disk Caching

Disk Caching #89

Workflow file for this run

name: Build Gagaku
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
release:
types:
- published
jobs:
build:
strategy:
fail-fast: true
matrix:
builder: [windows, linux, android]
include:
- builder: windows
os: windows-latest
pkg: windows
- builder: linux
os: ubuntu-latest
pkg: linux
- builder: android
os: ubuntu-latest
pkg: apk
name: Build Gagaku
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Setup Java
if: matrix.builder == 'android'
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Set up Packages (Linux)
if: matrix.builder == 'linux'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
flutter config --enable-linux-desktop
- name: Set up Packages (Windows)
if: matrix.builder == 'windows'
run: flutter config --enable-windows-desktop
- run: flutter pub get
- run: dart run build_runner build --delete-conflicting-outputs
- name: Build Project
run: flutter build ${{ matrix.pkg }}
- name: Upload Build Artifact (Windows)
if: matrix.builder == 'windows'
uses: actions/upload-artifact@v3
with:
name: gagaku-windows
path: build/windows/runner/Release/
if-no-files-found: error
retention-days: 1
- name: Upload Build Artifact (Android)
if: matrix.builder == 'android'
uses: actions/upload-artifact@v3
with:
name: gagaku-android-apk
path: build/app/outputs/flutter-apk/app-release.apk
if-no-files-found: error
retention-days: 1