mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-05 19:49:29 +01:00
refactor: CI scripts and old workarounds for build scripts
This commit is contained in:
parent
eb651212e6
commit
b30622c1b9
@ -16,7 +16,15 @@ stages:
|
||||
|
||||
code_analyze:
|
||||
stage: test
|
||||
script: [ ./scripts/code_analyze.sh ]
|
||||
script:
|
||||
- flutter pub get
|
||||
- dart run import_sorter:main --no-comments --exit-if-changed
|
||||
- flutter format lib/ test/ --set-exit-if-changed
|
||||
- flutter analyze
|
||||
- git apply ./scripts/enable-android-google-services.patch
|
||||
- flutter pub get
|
||||
- flutter analyze
|
||||
- flutter pub run dart_code_metrics:metrics lib -r gitlab > code-quality-report.json || true
|
||||
artifacts:
|
||||
reports:
|
||||
codequality: code-quality-report.json
|
||||
@ -66,9 +74,8 @@ integration_test:
|
||||
- ffmpeg -i video.mkv -vf scale=iw/2:-2 -crf 40 -b:v 2000k -preset fast video.mp4 || true
|
||||
timeout: 30m
|
||||
retry: 2
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
||||
when: always
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
@ -129,6 +136,8 @@ release_mode_launches:
|
||||
# generate temporary release build configuration and ensure app launches
|
||||
- scripts/integration-check-release-build.sh
|
||||
timeout: 20m
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- famedly
|
||||
@ -137,7 +146,8 @@ build_web:
|
||||
stage: build
|
||||
before_script:
|
||||
[ sudo apt update && sudo apt install curl -y, ./scripts/prepare-web.sh ]
|
||||
script: [ ./scripts/build-web.sh ]
|
||||
script:
|
||||
- flutter build web --release --verbose --source-maps
|
||||
artifacts:
|
||||
paths:
|
||||
- build/web/
|
||||
@ -186,11 +196,14 @@ build_windows:
|
||||
|
||||
build_android_debug:
|
||||
stage: build
|
||||
script: [ ./scripts/build-android-debug.sh ]
|
||||
script: [ flutter build apk --debug ]
|
||||
artifacts:
|
||||
when: on_success
|
||||
paths:
|
||||
- build/app/outputs/apk/debug/app-debug.apk
|
||||
tags:
|
||||
- docker
|
||||
- famedly
|
||||
except:
|
||||
- main
|
||||
- tags
|
||||
@ -200,11 +213,14 @@ build_android_apk:
|
||||
before_script:
|
||||
- git apply ./scripts/enable-android-google-services.patch
|
||||
- ./scripts/prepare-android-release.sh
|
||||
script: [ ./scripts/build-android-apk.sh ]
|
||||
script: [ flutter build apk --release ]
|
||||
artifacts:
|
||||
when: on_success
|
||||
paths:
|
||||
- build/android/app-release.apk
|
||||
- build/app/outputs/apk/release/app-release.apk
|
||||
tags:
|
||||
- docker
|
||||
- famedly
|
||||
only:
|
||||
- main
|
||||
- tags
|
||||
@ -220,6 +236,9 @@ deploy_playstore_internal:
|
||||
paths:
|
||||
- build/android/app-release.aab
|
||||
resource_group: playstore_release
|
||||
tags:
|
||||
- docker
|
||||
- famedly
|
||||
only:
|
||||
- main
|
||||
|
||||
@ -268,10 +287,12 @@ build_linux_x86:
|
||||
stage: build
|
||||
image: registry.gitlab.com/famedly/company/frontend/flutter-dockerimages/flutter-linux/stable
|
||||
before_script:
|
||||
[
|
||||
sudo apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install keyboard-configuration -y && 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,
|
||||
]
|
||||
script: [ ./scripts/build-linux.sh ]
|
||||
- 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
|
||||
script: [ flutter build linux --release -v ]
|
||||
tags:
|
||||
- docker
|
||||
- famedly
|
||||
artifacts:
|
||||
when: on_success
|
||||
paths:
|
||||
|
@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
flutter pub get
|
||||
flutter build apk --release
|
||||
mkdir -p build/android
|
||||
cp build/app/outputs/apk/release/app-release.apk build/android/
|
@ -1,2 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
flutter build apk --debug
|
@ -1,5 +0,0 @@
|
||||
#!/bin/sh -ve
|
||||
flutter config --enable-linux-desktop
|
||||
flutter clean
|
||||
flutter pub get
|
||||
flutter build linux --release -v
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh -ve
|
||||
flutter config --enable-macos-desktop
|
||||
flutter clean
|
||||
flutter pub get
|
||||
cd macos
|
||||
pod install
|
||||
pod update
|
||||
cd ..
|
||||
flutter build macos --release
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh -ve
|
||||
flutter config --enable-web
|
||||
flutter clean
|
||||
flutter pub get
|
||||
flutter build web --release --verbose --source-maps
|
||||
# bug of the Flutter engine
|
||||
chmod +r -R build/web
|
@ -1,8 +0,0 @@
|
||||
#!/bin/sh -ve
|
||||
flutter pub get
|
||||
flutter pub run import_sorter:main --no-comments --exit-if-changed
|
||||
flutter format lib/ test/ --set-exit-if-changed
|
||||
git apply ./scripts/enable-android-google-services.patch
|
||||
flutter pub get
|
||||
flutter analyze
|
||||
flutter pub run dart_code_metrics:metrics lib -r gitlab > code-quality-report.json || true
|
Loading…
Reference in New Issue
Block a user