mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-01-11 18:22:49 +01:00
refactor: CI
This commit is contained in:
parent
024039d6f7
commit
34d7fdd7bc
105
.gitlab-ci.yml
105
.gitlab-ci.yml
@ -14,31 +14,21 @@ stages:
|
|||||||
- coverage
|
- coverage
|
||||||
- publish
|
- publish
|
||||||
- release
|
- release
|
||||||
|
- deploy
|
||||||
|
|
||||||
code_analyze:
|
code_analyze:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
dependencies: []
|
script: [./scripts/code_analyze.sh]
|
||||||
script:
|
|
||||||
- flutter format lib/ test/ test_driver/ --set-exit-if-changed
|
|
||||||
- flutter analyze
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
dependencies: []
|
script: [flutter test]
|
||||||
script:
|
|
||||||
- flutter test
|
|
||||||
|
|
||||||
build_web:
|
build_web:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
image: registry.gitlab.com/famedly/containers/flutter-dockerimages:beta
|
image: registry.gitlab.com/famedly/containers/flutter-dockerimages:beta
|
||||||
script:
|
before_script: [sudo apt update && sudo apt install curl -y]
|
||||||
- sudo apt update
|
script: [./scripts/build-web.sh]
|
||||||
- sudo apt install curl -y
|
|
||||||
- ./scripts/prepare-web.sh
|
|
||||||
- flutter clean
|
|
||||||
- flutter pub get
|
|
||||||
- flutter build web --release --verbose
|
|
||||||
# upload elsewhere, if wanted
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/web/
|
- build/web/
|
||||||
@ -66,9 +56,7 @@ build_windows:
|
|||||||
|
|
||||||
build_android_debug:
|
build_android_debug:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
script:
|
script: [./scripts/build-android-debug.sh]
|
||||||
- truncate -s $(head -n -2 android/app/build.gradle | wc -c) android/app/build.gradle
|
|
||||||
- flutter build apk --debug -v
|
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_success
|
when: on_success
|
||||||
paths:
|
paths:
|
||||||
@ -76,20 +64,9 @@ build_android_debug:
|
|||||||
except:
|
except:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
|
||||||
build_android_apk:
|
build_android_apk:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
script:
|
script: [./scripts/build-android-apk.sh]
|
||||||
- cd android && echo $FDROID_KEY | base64 --decode --ignore-garbage > key.jks && cd ..
|
|
||||||
- cd android && echo "storePassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
|
||||||
- cd android && echo "keyPassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
|
||||||
- cd android && echo "keyAlias=key" >> key.properties && cd ..
|
|
||||||
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
|
||||||
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
|
||||||
- flutter pub get
|
|
||||||
- flutter build apk --release
|
|
||||||
- mkdir -p build/android
|
|
||||||
- cp build/app/outputs/apk/release/app-release.apk build/android/
|
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_success
|
when: on_success
|
||||||
paths:
|
paths:
|
||||||
@ -98,27 +75,16 @@ build_android_apk:
|
|||||||
- main
|
- main
|
||||||
- tags
|
- tags
|
||||||
|
|
||||||
|
|
||||||
build_android_appbundle:
|
build_android_appbundle:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
script:
|
script: [./scripts/build-android-appbundle.sh]
|
||||||
- cd android && echo $FDROID_KEY | base64 --decode --ignore-garbage > key.jks && cd ..
|
|
||||||
- cd android && echo "storePassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
|
||||||
- cd android && echo "keyPassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
|
||||||
- cd android && echo "keyAlias=key" >> key.properties && cd ..
|
|
||||||
- cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
|
||||||
- cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
|
||||||
- flutter build appbundle --target-platform android-arm,android-arm64,android-x64
|
|
||||||
- mkdir -p build/android
|
|
||||||
- cp build/app/outputs/bundle/release/app-release.aab build/android/
|
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_success
|
when: on_success
|
||||||
paths:
|
paths:
|
||||||
- build/android/app-release.aab
|
- build/android/app-release.aab
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
|
||||||
upload_to_fdroid_repo:
|
upload_to_fdroid_repo:
|
||||||
stage: publish
|
stage: publish
|
||||||
before_script:
|
before_script:
|
||||||
@ -152,17 +118,9 @@ upload_to_fdroid_repo:
|
|||||||
- tags
|
- tags
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: publish
|
stage: deploy
|
||||||
image: ruby:2.3
|
image: alpine:latest
|
||||||
script:
|
script: [mv build/web/ public]
|
||||||
- rm assets -r
|
|
||||||
- cp _config.yml ./build/web/
|
|
||||||
- cp Gemfile ./build/web/
|
|
||||||
- cp Gemfile.lock ./build/web/
|
|
||||||
- cd build/web/ && bundle install && cd ../../
|
|
||||||
- cd build/web/ && bundle exec jekyll build -d public && cd ../../
|
|
||||||
- mv build/web/public ./
|
|
||||||
needs: ["build_web"]
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
@ -172,13 +130,8 @@ pages:
|
|||||||
build_linux:
|
build_linux:
|
||||||
stage: coverage
|
stage: coverage
|
||||||
image: registry.gitlab.com/famedly/containers/flutter-dockerimages:dev
|
image: registry.gitlab.com/famedly/containers/flutter-dockerimages:dev
|
||||||
dependencies: []
|
before_script: [sudo apt update && sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev -y]
|
||||||
script:
|
script: [./scripts/build-linux.sh]
|
||||||
- sudo apt update
|
|
||||||
- sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev
|
|
||||||
- flutter config --enable-linux-desktop
|
|
||||||
- flutter pub get
|
|
||||||
- flutter build linux --release -v
|
|
||||||
artifacts:
|
artifacts:
|
||||||
when: on_success
|
when: on_success
|
||||||
paths:
|
paths:
|
||||||
@ -190,19 +143,7 @@ snap:edge:
|
|||||||
image: "cibuilds/snapcraft:core18"
|
image: "cibuilds/snapcraft:core18"
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
script:
|
script: [./scripts/publish-snap-edge.sh]
|
||||||
## Manually install the flutter-dev snap, so we can use the flutter extension
|
|
||||||
- 'curl -L $(curl -H "X-Ubuntu-Series: 16" "https://api.snapcraft.io/api/v1/snaps/details/flutter?channel=latest/stable" | jq ".download_url" -r) --output flutter.snap'
|
|
||||||
- sudo mkdir -p /snap/flutter
|
|
||||||
- sudo unsquashfs -d /snap/flutter/current flutter.snap
|
|
||||||
- rm -f flutter.snap
|
|
||||||
- sudo ln -sf /snap/flutter/current/flutter.sh /snap/bin/flutter
|
|
||||||
- sudo ln -sf /snap/flutter/current/env.sh /snap/bin/env.sh
|
|
||||||
- snapcraft
|
|
||||||
- echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login
|
|
||||||
- snapcraft login --with snapcraft.login
|
|
||||||
- snapcraft push --release=edge *.snap
|
|
||||||
- snapcraft logout
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- './*.snap'
|
- './*.snap'
|
||||||
@ -214,12 +155,7 @@ snap:publish:
|
|||||||
image: "cibuilds/snapcraft:core18"
|
image: "cibuilds/snapcraft:core18"
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
script:
|
script: [./scripts/publish-snap-stable.sh]
|
||||||
- snapcraft
|
|
||||||
- echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login
|
|
||||||
- snapcraft login --with snapcraft.login
|
|
||||||
- snapcraft push --release=stable *.snap
|
|
||||||
- snapcraft logout
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- './*.snap'
|
- './*.snap'
|
||||||
@ -242,20 +178,15 @@ update-dependencies:
|
|||||||
before_script:
|
before_script:
|
||||||
- eval $(ssh-agent -s)
|
- eval $(ssh-agent -s)
|
||||||
- echo "$SSH_PRIVATE_BOT_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
- echo "$SSH_PRIVATE_BOT_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||||
|
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
- chmod 700 ~/.ssh
|
- chmod 700 ~/.ssh
|
||||||
|
- ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
|
||||||
- ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
|
|
||||||
- chmod 644 ~/.ssh/known_hosts
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
|
||||||
- git config --global user.email "bot@fluffy.chat"
|
- git config --global user.email "bot@fluffy.chat"
|
||||||
- git config --global user.name "Dependency Update Bot"
|
- git config --global user.name "Dependency Update Bot"
|
||||||
- sudo apt-get update && sudo apt-get install -y curl
|
- sudo apt-get update && sudo apt-get install -y curl
|
||||||
script:
|
script:
|
||||||
- flutter pub get
|
- ./scripts/update-dependencies.sh
|
||||||
- flutter pub pub run dapackages:dapackages.dart ./pubspec.yaml
|
|
||||||
- flutter pub get
|
|
||||||
- git remote set-url --push origin git@gitlab.com:$CI_PROJECT_PATH
|
- git remote set-url --push origin git@gitlab.com:$CI_PROJECT_PATH
|
||||||
- 'git diff --exit-code || (git checkout -B ${UPDATE_BRANCH} && git add . && git commit -m "chore: Update dependencies" && git push -f origin ${UPDATE_BRANCH} && ./scripts/open-mr.sh)'
|
- 'git diff --exit-code || (git checkout -B ${UPDATE_BRANCH} && git add . && git commit -m "chore: Update dependencies" && git push -f origin ${UPDATE_BRANCH} && ./scripts/open-mr.sh)'
|
||||||
|
|
||||||
|
15
CHANGELOG.md
15
CHANGELOG.md
@ -4,22 +4,37 @@ Chat with your friends.
|
|||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
### Chore
|
### Chore
|
||||||
|
* update flutter_matrix_html [ed27bee]
|
||||||
|
* update flutter_matrix_html [af36533]
|
||||||
|
* Update dependencies [57256fb]
|
||||||
|
* Update dependencies [40825e1]
|
||||||
* Switch to adaptive dialogs [9ea7afc]
|
* Switch to adaptive dialogs [9ea7afc]
|
||||||
* Switch from bottoast to flushbar [e219593]
|
* Switch from bottoast to flushbar [e219593]
|
||||||
* Clean up CI [7e84675]
|
* Clean up CI [7e84675]
|
||||||
* Remove unused dependency [d12de2d]
|
* Remove unused dependency [d12de2d]
|
||||||
|
|
||||||
### Feature
|
### Feature
|
||||||
|
* Add svg support and better image handling [f70bbc3]
|
||||||
|
* add config.json [4b7fb6b]
|
||||||
* persistent upload of release artifacts [1b2481b]
|
* persistent upload of release artifacts [1b2481b]
|
||||||
* Option to hide redacted and unknown events [36315a4]
|
* Option to hide redacted and unknown events [36315a4]
|
||||||
* Better encryption / verification [1ff986e]
|
* Better encryption / verification [1ff986e]
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
* iOS [26731ab]
|
||||||
|
* resolve some sentry issues [61f35e8]
|
||||||
|
* resolve some sentry issues [2c3693e]
|
||||||
|
* iOS build [9fee409]
|
||||||
|
* Automatic update deps job [255c05d]
|
||||||
* Don't re-render message widgets on insertion of new messages, making e.g. audio playing not stop [25b2997]
|
* Don't re-render message widgets on insertion of new messages, making e.g. audio playing not stop [25b2997]
|
||||||
* Add missing safearea [caab868]
|
* Add missing safearea [caab868]
|
||||||
* no pushers enpdoint [b3942ad]
|
* no pushers enpdoint [b3942ad]
|
||||||
* Sentry and small null fix [5dc22be]
|
* Sentry and small null fix [5dc22be]
|
||||||
|
|
||||||
|
### Refactor
|
||||||
|
* CI [5ac773e]
|
||||||
|
* SDK update [7e23280]
|
||||||
|
|
||||||
## v0.21.1 - 2020-10-28
|
## v0.21.1 - 2020-10-28
|
||||||
|
|
||||||
### Chore
|
### Chore
|
||||||
|
7
scripts/build-android-apk.sh
Executable file
7
scripts/build-android-apk.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter channel stable
|
||||||
|
flutter upgrade
|
||||||
|
flutter pub get
|
||||||
|
flutter build apk --release
|
||||||
|
mkdir -p build/android
|
||||||
|
cp build/app/outputs/apk/release/app-release.apk build/android/
|
7
scripts/build-android-appbundle.sh
Executable file
7
scripts/build-android-appbundle.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter channel stable
|
||||||
|
flutter upgrade
|
||||||
|
flutter pub get
|
||||||
|
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
|
||||||
|
mkdir -p build/android
|
||||||
|
cp build/app/outputs/bundle/release/app-release.aab build/android/
|
5
scripts/build-android-debug.sh
Executable file
5
scripts/build-android-debug.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter channel stable
|
||||||
|
flutter upgrade
|
||||||
|
truncate -s $(head -n -2 android/app/build.gradle | wc -c) android/app/build.gradle
|
||||||
|
flutter build apk --debug -v
|
10
scripts/build-ios.sh
Executable file
10
scripts/build-ios.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter channel stable
|
||||||
|
flutter upgrade
|
||||||
|
flutter clean
|
||||||
|
flutter pub get
|
||||||
|
cd ios
|
||||||
|
pod install
|
||||||
|
pod update
|
||||||
|
cd ..
|
||||||
|
flutter build ios --release
|
7
scripts/build-linux.sh
Executable file
7
scripts/build-linux.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter channel dev
|
||||||
|
flutter upgrade
|
||||||
|
flutter config --enable-linux-desktop
|
||||||
|
flutter clean
|
||||||
|
flutter pub get
|
||||||
|
flutter build linux --release -v
|
11
scripts/build-macos.sh
Executable file
11
scripts/build-macos.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter channel dev
|
||||||
|
flutter upgrade
|
||||||
|
flutter config --enable-macos-desktop
|
||||||
|
flutter clean
|
||||||
|
flutter pub get
|
||||||
|
cd macos
|
||||||
|
pod install
|
||||||
|
pod update
|
||||||
|
cd ..
|
||||||
|
flutter build macos --release
|
8
scripts/build-snap.sh
Executable file
8
scripts/build-snap.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
'curl -L $(curl -H "X-Ubuntu-Series: 16" "https://api.snapcraft.io/api/v1/snaps/details/flutter?channel=latest/stable" | jq ".download_url" -r) --output flutter.snap'
|
||||||
|
sudo mkdir -p /snap/flutter
|
||||||
|
sudo unsquashfs -d /snap/flutter/current flutter.snap
|
||||||
|
rm -f flutter.snap
|
||||||
|
sudo ln -sf /snap/flutter/current/flutter.sh /snap/bin/flutter
|
||||||
|
sudo ln -sf /snap/flutter/current/env.sh /snap/bin/env.sh
|
||||||
|
snapcraft
|
8
scripts/build-web.sh
Executable file
8
scripts/build-web.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter channel beta
|
||||||
|
flutter upgrade
|
||||||
|
flutter config --enable-web
|
||||||
|
/bin/bash ./scripts/prepare-web.sh
|
||||||
|
flutter clean
|
||||||
|
flutter pub get
|
||||||
|
flutter build web --release --verbose
|
3
scripts/code_analyze.sh
Executable file
3
scripts/code_analyze.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter format lib/ test/ test_driver/ --set-exit-if-changed
|
||||||
|
flutter analyze
|
8
scripts/prepare-android-release.sh
Executable file
8
scripts/prepare-android-release.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
/bin/bash ./scripts/prepare-android-release.sh
|
||||||
|
cd android && echo $FDROID_KEY | base64 --decode --ignore-garbage > key.jks && cd ..
|
||||||
|
cd android && echo "storePassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
||||||
|
cd android && echo "keyPassword=${FDROID_KEY_PASS}" >> key.properties && cd ..
|
||||||
|
cd android && echo "keyAlias=key" >> key.properties && cd ..
|
||||||
|
cd android && echo "storeFile=../key.jks" >> key.properties && cd ..
|
||||||
|
cd android/app && echo $GOOGLE_SERVICES >> google-services.json && cd ../..
|
6
scripts/publish-snap-edge.sh
Executable file
6
scripts/publish-snap-edge.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
/bin/bash ./scripts/build-snap.sh
|
||||||
|
echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login
|
||||||
|
snapcraft login --with snapcraft.login
|
||||||
|
snapcraft push --release=edge *.snap
|
||||||
|
snapcraft logout
|
6
scripts/publish-snap-stable.sh
Executable file
6
scripts/publish-snap-stable.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
/bin/bash ./scripts/build-snap.sh
|
||||||
|
echo $SNAPCRAFT_LOGIN_FILE | base64 --decode --ignore-garbage > snapcraft.login
|
||||||
|
snapcraft login --with snapcraft.login
|
||||||
|
snapcraft push --release=stable *.snap
|
||||||
|
snapcraft logout
|
4
scripts/update-changelog.sh
Executable file
4
scripts/update-changelog.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter pub global activate changelog
|
||||||
|
export PATH="$PATH":"$HOME/development/flutter/.pub-cache/bin"
|
||||||
|
changelog -c
|
4
scripts/update-dependencies.sh
Executable file
4
scripts/update-dependencies.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
flutter pub get
|
||||||
|
flutter pub pub run dapackages:dapackages.dart ./pubspec.yaml
|
||||||
|
flutter pub get
|
Loading…
Reference in New Issue
Block a user