1
0
Fork 0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thesis_shop/.drone.yml

128 lines
2.5 KiB

2 years ago
---
kind: pipeline
name: build
type: docker
workspace:
path: "/app"
platform:
os: linux
arch: amd64
environment:
PUB_CACHE: /app/.pub_cache
2 years ago
clone:
git:
image: plugins/git:next
steps:
2 years ago
- name: load_packages
2 years ago
pull: always
image: jonasfranz/flutter:2.10.1
2 years ago
commands:
- flutter packages get
2 years ago
- name: build
pull: always
image: jonasfranz/flutter:2.10.1
depends_on:
- load_packages
commands:
2 years ago
- flutter build apk
- name: lint
pull: always
image: jonasfranz/flutter:2.10.1
2 years ago
depends_on:
2 years ago
- load_packages
2 years ago
commands:
- flutter analyze
2 years ago
- flutter format --set-exit-if-changed lib
2 years ago
- name: test
pull: always
image: jonasfranz/flutter:2.10.1
2 years ago
depends_on:
2 years ago
- load_packages
2 years ago
commands:
- flutter test -r expanded
---
kind: pipeline
name: metrics
type: docker
depends_on:
- build
workspace:
path: "/app"
2 years ago
environment:
PUB_CACHE: /app/.pub_cache
2 years ago
platform:
os: linux
arch: amd64
steps:
2 years ago
- name: load_packages
pull: always
image: jonasfranz/flutter:2.10.1
commands:
- flutter packages get
####### BENCHMARKS
- name: run_benchmarks
pull: always
image: jonasfranz/flutter:2.10.1
depends_on:
- load_packages
commands:
- flutter test --plain-name=Efficiency -r expanded > benchmarks.txt
####### METRICS
2 years ago
- name: generate_metrics
pull: always
image: jonasfranz/flutter:2.10.1
2 years ago
depends_on:
- load_packages
2 years ago
commands:
- flutter pub run dart_code_metrics:metrics analyze lib -r html
- name: convert_to_latex
pull: always
image: pandoc/core:2.17
depends_on:
- generate_metrics
commands:
- pandoc --template template.tex -s metrics/index.html -o metrics.tex
2 years ago
###### PUBLISHING
- name: pull_and_prepare_thesis_repo
2 years ago
image: docker:git
depends_on:
- convert_to_latex
2 years ago
- run_benchmarks
2 years ago
commands:
2 years ago
- git clone https://git.jonasfranz.software/KoSI/thesis.git
2 years ago
- mkdir -p thesis/results/${DRONE_COMMIT_BRANCH}
- cp metrics.tex thesis/results/${DRONE_COMMIT_BRANCH}/
- cp benchmarks.txt thesis/results/${DRONE_COMMIT_BRANCH}/
2 years ago
- cd thesis
2 years ago
- git add results/
- git status
2 years ago
- name: push_matrix
depends_on:
2 years ago
- pull_and_prepare_thesis_repo
image: appleboy/drone-git-push
settings:
ssh_key:
from_secret: ssh_key
branch: main
2 years ago
remote: git@git.jonasfranz.software:KoSI/thesis.git
force: false
commit: true
2 years ago
path: /app/thesis
commit_message: Update metrics