2023-07-14 09:50:39 +00:00
|
|
|
name: Pull Request Workflow
|
2023-07-14 09:04:05 +00:00
|
|
|
|
2023-08-08 05:41:08 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
merge_group:
|
2023-07-14 09:04:05 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-07-15 00:37:55 +00:00
|
|
|
code_tests:
|
2023-07-14 09:04:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-07 09:12:59 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-15 09:14:38 +00:00
|
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
2023-07-14 09:10:20 +00:00
|
|
|
- uses: subosito/flutter-action@v2
|
2023-07-14 09:04:05 +00:00
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2023-09-05 12:48:18 +00:00
|
|
|
cache: true
|
2023-07-14 09:04:05 +00:00
|
|
|
- run: flutter pub get
|
2024-05-16 07:13:47 +00:00
|
|
|
- run: flutter gen-l10n
|
2023-07-14 09:04:05 +00:00
|
|
|
- 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
|
2024-02-25 12:55:48 +00:00
|
|
|
- name: Check license compliance
|
|
|
|
run: dart run license_checker check-licenses -c licenses.yaml --problematic
|
2023-07-14 09:04:05 +00:00
|
|
|
- run: flutter analyze
|
|
|
|
- name: Apply google services patch
|
2023-12-21 12:57:10 +00:00
|
|
|
run: ./scripts/enable-google-services.sh
|
2023-07-14 09:04:05 +00:00
|
|
|
- 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:
|
2024-01-07 09:12:59 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-15 09:14:38 +00:00
|
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
2024-01-07 09:22:52 +00:00
|
|
|
- uses: actions/setup-java@v4
|
2023-07-14 09:28:43 +00:00
|
|
|
with:
|
|
|
|
java-version: ${{ env.JAVA_VERSION }}
|
2024-01-31 07:51:49 +00:00
|
|
|
distribution: "zulu"
|
2023-07-14 09:28:43 +00:00
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2023-09-05 12:48:18 +00:00
|
|
|
cache: true
|
2023-07-14 09:28:43 +00:00
|
|
|
- run: flutter pub get
|
|
|
|
- run: flutter build apk --debug
|
|
|
|
|
|
|
|
build_debug_web:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-01-07 09:12:59 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-15 09:14:38 +00:00
|
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
2023-07-14 09:28:43 +00:00
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2023-09-05 12:48:18 +00:00
|
|
|
cache: true
|
2023-07-14 09:28:43 +00:00
|
|
|
- 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
|
|
|
|
steps:
|
2024-01-07 09:12:59 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-15 09:14:38 +00:00
|
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
2023-07-14 09:34:25 +00:00
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2023-09-05 12:48:18 +00:00
|
|
|
cache: true
|
2023-07-14 09:34:25 +00:00
|
|
|
- name: Install dependencies
|
2024-03-29 14:47:11 +00:00
|
|
|
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 libssl-dev -y
|
2023-07-14 09:34:25 +00:00
|
|
|
- run: flutter pub get
|
2023-07-30 08:32:10 +00:00
|
|
|
- run: flutter build linux --target-platform linux-x64
|
2023-08-19 06:21:26 +00:00
|
|
|
|
|
|
|
build_debug_ios:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
2024-01-07 09:12:59 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-08-19 06:21:26 +00:00
|
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
|
|
with:
|
|
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
2023-09-05 12:48:18 +00:00
|
|
|
cache: true
|
2023-08-19 06:21:26 +00:00
|
|
|
- name: Setup Xcode version
|
2024-01-07 09:12:53 +00:00
|
|
|
uses: maxim-lobanov/setup-xcode@v1.6.0
|
|
|
|
with:
|
|
|
|
xcode-version: latest
|
2024-03-29 14:47:11 +00:00
|
|
|
- run: brew install sqlcipher
|
2023-08-19 06:21:26 +00:00
|
|
|
- run: flutter pub get
|
|
|
|
- run: flutter build ios --no-codesign
|