libcwtch-go/.drone.yml

87 lines
2.2 KiB
YAML
Raw Normal View History

2021-03-17 19:35:55 +00:00
---
kind: pipeline
type: docker
name: default
steps:
- name: fetch
image: golang
2021-03-17 20:31:16 +00:00
volumes:
- name: deps
path: /go
2021-03-17 19:35:55 +00:00
when:
repo: flutter/libcwtch-go
branch: trunk
event: [ push, pull_request ]
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
- go get -u golang.org/x/lint/golint
2021-03-17 20:31:16 +00:00
#- export GO111MODULE=on
#- go mod vendor
- go get
# TODO: upgrade to go1.16, remove mod/vendor, add go install for 1.16
# go vendor so packages aren't refetched each new stage which loses this working dir, or restructure workspace to include pkg
- name: quality
image: golang
2021-03-17 20:31:16 +00:00
volumes:
- name: deps
path: /go
when:
repo: flutter/libcwtch-go
branch: trunk
event: [ push, pull_request ]
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
2021-03-17 20:31:16 +00:00
- name: build-linux
image: openpriv/android-go-mobile:2021
2021-03-17 20:31:16 +00:00
volumes:
- name: deps
path: /go
2021-03-17 19:47:03 +00:00
when:
repo: flutter/libcwtch-go
branch: trunk
event: [ push, pull_request ]
commands:
- make linux
2021-03-17 20:31:16 +00:00
- name: build-android
image: openpriv/android-go-mobile:2021
2021-03-17 20:31:16 +00:00
volumes:
- name: deps
path: /go
2021-03-17 19:47:03 +00:00
when:
repo: flutter/libcwtch-go
branch: trunk
event: [ push, pull_request ]
commands:
2021-03-17 23:53:09 +00:00
- gomobile init
- make android
- name: notify-email
image: drillster/drone-email
host: build.openprivacy.ca
port: 25
skip_verify: true
from: drone@openprivacy.ca
when:
repo: flutter/libcwtch-go
branch: trunk
event: [ push, pull_request ]
status: [ failure ]
- name: notify-gogs
image: openpriv/drone-gogs
when:
repo: flutter/libcwtch-go
branch: trunk
event: pull_request
status: [ success, changed, failure ]
secrets: [gogs_account_token]
gogs_url: https://git.openprivacy.ca
2021-03-17 20:31:16 +00:00
volumes:
2021-03-17 23:53:09 +00:00
# gopath where bin and pkg lives to persist across steps
2021-03-17 20:31:16 +00:00
- name: deps
temp: {}