2023-07-14 09:50:39 +00:00
|
|
|
name: Pull Request Workflow
|
2023-07-14 09:04:05 +00:00
|
|
|
|
2023-07-14 11:00:32 +00:00
|
|
|
on: [push, pull_request]
|
2023-07-14 09:04:05 +00:00
|
|
|
|
|
|
|
env:
|
2023-07-14 09:57:30 +00:00
|
|
|
FLUTTER_VERSION: ${{ secrets.FLUTTER_VERSION }}
|
|
|
|
JAVA_VERSION: ${{ secrets.JAVA_VERSION }}
|
2023-07-14 09:04:05 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
analyze:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-07-14 09:10:20 +00:00
|
|
|
- uses: actions/setup-java@v1
|
2023-07-14 09:04:05 +00:00
|
|
|
with:
|
2023-07-14 09:10:20 +00:00
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
- uses: subosito/flutter-action@v2
|
2023-07-14 09:04:05 +00:00
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
|
|
- run: flutter pub get
|
|
|
|
- name: Check formatting
|
|
|
|
run: dart format lib/ test/ --set-exit-if-changed
|
|
|
|
- name: Check import formatting
|
|
|
|
run: dart run import_sorter:main --no-comments --exit-if-changed
|
|
|
|
- run: flutter analyze
|
|
|
|
- name: Apply google services patch
|
|
|
|
run: git apply ./scripts/enable-android-google-services.patch
|
|
|
|
- run: flutter analyze
|
2023-07-14 09:10:20 +00:00
|
|
|
- run: flutter test
|
2023-07-14 09:28:43 +00:00
|
|
|
|
|
|
|
build_debug_apk:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
|
|
- run: flutter pub get
|
|
|
|
- run: flutter build apk --debug
|
|
|
|
|
|
|
|
build_debug_web:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
|
|
- run: flutter pub get
|
|
|
|
- name: Prepare web
|
|
|
|
run: ./scripts/prepare-web.sh
|
2023-07-14 09:34:25 +00:00
|
|
|
- run: flutter build web
|
|
|
|
|
|
|
|
build_debug_linux:
|
|
|
|
runs-on: ubuntu-latest
|
2023-07-14 11:00:32 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
arch: [x64, arm64]
|
2023-07-14 09:34:25 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 -y
|
|
|
|
- run: flutter pub get
|
|
|
|
- run: flutter build linux
|
|
|
|
|