2021-03-26 00:44:03 +00:00
---
kind : pipeline
type : docker
2021-04-13 20:23:18 +00:00
name : linux-android-test
2021-03-26 00:44:03 +00:00
steps :
- name : fetch
2021-03-26 23:10:48 +00:00
image : cirrusci/flutter:dev
2021-03-27 00:10:37 +00:00
volumes :
- name : deps
path : /root/.pub-cache
2021-03-26 00:44:03 +00:00
commands :
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/tor
- wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/master/tor/torrc
- chmod a+x tor
- git fetch --tags
- echo `git describe --tags` > VERSION
- echo `date +%G-%m-%d-%H-%M` > BUILDDATE
2021-03-27 00:02:13 +00:00
- flutter pub get
2021-03-27 01:00:43 +00:00
- mkdir deploy
2021-03-26 00:44:03 +00:00
#- name: quality
# image: golang
# volumes:
# - name: deps
# path: /go
# commands:
# - go list ./... | xargs go vet
# - go list ./... | xargs golint
# #Todo: fix all the lint errors and add `-set_exit_status` above to enforce linting
- name : build-linux
2021-03-30 02:28:58 +00:00
image : openpriv/flutter-desktop:dev
2021-03-27 00:10:37 +00:00
volumes :
- name : deps
path : /root/.pub-cache
2021-03-26 00:44:03 +00:00
commands :
2021-03-26 23:10:48 +00:00
- flutter build linux
2021-03-27 01:00:43 +00:00
- mkdir deploy/linux
- cp -r build/linux/x64/release/bundle/* deploy/linux
- cp /sdks/flutter/bin/cache/artifacts/engine/linux-x64/icudtl.dat deploy/linux
2021-03-26 00:44:03 +00:00
- name : build-android
2021-03-26 23:10:48 +00:00
image : cirrusci/flutter:dev
2021-03-27 00:10:37 +00:00
volumes :
- name : deps
path : /root/.pub-cache
2021-03-26 00:44:03 +00:00
commands :
2021-03-26 19:57:52 +00:00
- flutter build appbundle
# or build apk --split-per-abi ?
2021-03-27 01:00:43 +00:00
- mkdir deploy/android
- cp build/app/outputs/bundle/release/app-release.aab deploy/android
2021-03-26 00:44:03 +00:00
2021-03-30 19:21:54 +00:00
- name : widget-tests
image : cirrusci/flutter:dev
volumes :
- name : deps
path : /root/.pub-cache
commands :
2021-03-30 19:30:17 +00:00
# - flutter config --enable-linux-desktop
2021-03-30 19:21:54 +00:00
- flutter test --coverage
- genhtml coverage/lcov.info -o coverage/html
2021-03-26 20:15:15 +00:00
# Todo: gonna need more work on container
# https://flutter.dev/desktop
# requirements: Visual Studio 2019 (not to be confused with Visual Studio Code) with the “Desktop development with C++” workload installed, including all of its default components
#- name: build-windows
2021-03-26 23:10:48 +00:00
# image: cirrusci/flutter:dev
2021-03-27 00:10:37 +00:00
#- volumes:
# - name: deps
# path: /root/.pub-cache
2021-03-26 20:15:15 +00:00
# commands:
# - flutter config --enable-windows-desktop
# - flutter build windows
2021-03-26 00:44:03 +00:00
- name : deploy-buildfiles
image : kroniak/ssh-client
environment :
BUILDFILES_KEY :
from_secret : buildfiles_key
secrets : [ gogs_account_token]
when :
event : push
status : [ success ]
commands :
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d ~/id_rsab64 > ~/id_rsa
- chmod 400 ~/id_rsa
2021-03-27 01:00:43 +00:00
- export DIR=flwtch-`cat VERSION`-`cat BUILDDATE`
- mv deploy $DIR
2021-03-30 19:21:54 +00:00
- cp -r coverage/html $DIR/coverage-tests
2021-03-30 19:48:00 +00:00
- cp -r test/failures $DIR/test-failures || true
2021-03-26 00:44:03 +00:00
- cd $DIR
2021-03-27 01:00:43 +00:00
- find . -type f -exec sha256sum {} \; > ./../sha256s.txt
- mv ./../sha256s.txt .
2021-03-26 00:44:03 +00:00
- cd ..
# TODO: do deployment once files actaully compile
2021-03-27 01:00:43 +00:00
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@openprivacy.ca:/home/buildfiles/buildfiles/
2021-03-26 00:44:03 +00:00
- name : notify-email
image : drillster/drone-email
2021-03-30 21:11:48 +00:00
settings :
host : build.openprivacy.ca
port : 25
skip_verify : true
from : drone@openprivacy.ca
2021-03-26 00:44:03 +00:00
when :
status : [ failure ]
- name : notify-gogs
image : openpriv/drone-gogs
when :
event : pull_request
status : [ success, changed, failure ]
2021-03-26 19:50:26 +00:00
environment :
GOGS_ACCOUNT_TOKEN :
from_secret : gogs_account_token
2021-03-29 23:47:39 +00:00
settings :
gogs_url : https://git.openprivacy.ca
2021-03-26 00:44:03 +00:00
2021-03-27 00:10:37 +00:00
volumes :
- name : deps
temp : {}
2021-03-26 00:44:03 +00:00
trigger :
2021-03-26 19:50:26 +00:00
repo : flutter/flutter_app
2021-03-26 00:44:03 +00:00
branch : trunk
event :
- push
- pull_request
2021-04-13 20:23:18 +00:00
---
kind : pipeline
type : docker
name : windows
platform :
os : windows
version : 1809
steps :
- name : fetch
2021-04-13 20:27:15 +00:00
image : openpriv/flutter-desktop:windows-dev
commands :
- git fetch --tags
- git describe --tags > VERSION
- date +%G-%m-%d-%H-%M > BUILDDATE
2021-04-13 20:23:18 +00:00
- name : build-windows
2021-04-13 20:27:15 +00:00
image : openpriv/flutter-desktop:windows-dev
commands :
- flutter pub get
- mkdir deploy
- flutter build windows
2021-04-13 20:23:18 +00:00
trigger :
repo : flutter/flutter_app
branch : trunk
event :
- push