2023-03-01 20:16:43 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: linux-android-windows-test
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: fetch
|
|
|
|
image: golang:1.19.1
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
|
|
|
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
|
|
- 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
|
|
|
|
- go mod download
|
|
|
|
- echo `git describe --tags` > VERSION
|
2023-03-13 20:12:50 +00:00
|
|
|
- echo `git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M` > COMMIT_DATE
|
|
|
|
- export GOSUMDB="off"
|
2023-03-01 20:16:43 +00:00
|
|
|
|
|
|
|
- name: build-linux
|
|
|
|
image: golang:1.19.1
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
2023-03-01 20:27:59 +00:00
|
|
|
- make clean
|
|
|
|
# Compile Server Experiments
|
2023-03-01 20:16:43 +00:00
|
|
|
- make linux
|
|
|
|
|
|
|
|
- name: build-android
|
|
|
|
image: openpriv/android-go-mobile:2023.02
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
2023-03-01 22:02:06 +00:00
|
|
|
# Build Android without Server Experiment
|
2023-03-18 17:59:38 +00:00
|
|
|
- make clean-autobindings
|
|
|
|
- env EXPERIMENTS="" make lib.go
|
2023-03-01 20:16:43 +00:00
|
|
|
- go mod download
|
|
|
|
- gomobile init
|
|
|
|
- make android
|
|
|
|
|
|
|
|
- name: build-windows
|
|
|
|
image: openpriv/mingw-go:2023.01
|
|
|
|
environment:
|
|
|
|
GOPATH: /go
|
|
|
|
volumes:
|
|
|
|
- name: deps
|
|
|
|
path: /go
|
|
|
|
commands:
|
2023-03-18 17:59:38 +00:00
|
|
|
- make clean-autobindings
|
2023-03-01 20:16:43 +00:00
|
|
|
- make windows
|
|
|
|
|
|
|
|
- name: deploy-buildfiles
|
|
|
|
image: kroniak/ssh-client
|
|
|
|
pull: if-not-exists
|
|
|
|
environment:
|
|
|
|
BUILDFILES_KEY:
|
|
|
|
from_secret: buildfiles_key
|
|
|
|
secrets: [gogs_account_token]
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- tag
|
|
|
|
status: [ success ]
|
|
|
|
commands:
|
|
|
|
- echo $BUILDFILES_KEY > ~/id_rsab64
|
|
|
|
- base64 -d ~/id_rsab64 > ~/id_rsa
|
|
|
|
- chmod 400 ~/id_rsa
|
2023-03-13 20:50:14 +00:00
|
|
|
- export DIR=libCwtch-autobindings-`cat COMMIT_DATE`-`cat VERSION`
|
2023-03-01 21:53:08 +00:00
|
|
|
- mkdir -p $DIR
|
2023-03-13 20:50:14 +00:00
|
|
|
- mv build/* $DIR/
|
2023-03-01 20:16:43 +00:00
|
|
|
- cd $DIR
|
2023-03-13 20:50:14 +00:00
|
|
|
- find . -type f -exec sha512sum {} \; > ./../sha512sum.txt
|
|
|
|
- mv ./../sha512sum.txt .
|
2023-03-01 20:16:43 +00:00
|
|
|
- cd ..
|
|
|
|
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/
|
|
|
|
|
|
|
|
- name: notify-gogs
|
|
|
|
image: openpriv/drone-gogs
|
|
|
|
pull: if-not-exists
|
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
status: [ success, changed, failure ]
|
|
|
|
environment:
|
|
|
|
GOGS_ACCOUNT_TOKEN:
|
|
|
|
from_secret: gogs_account_token
|
|
|
|
settings:
|
|
|
|
gogs_url: https://git.openprivacy.ca
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
# gopath where bin and pkg lives to persist across steps
|
|
|
|
- name: deps
|
|
|
|
temp: {}
|
|
|
|
|
|
|
|
trigger:
|
2023-03-01 21:47:42 +00:00
|
|
|
repo: cwtch.im/autobindings
|
2023-03-01 21:49:34 +00:00
|
|
|
branch: main
|
2023-03-01 20:16:43 +00:00
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
- tag
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: exec
|
|
|
|
name: macos
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: darwin
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: fetch
|
|
|
|
commands:
|
|
|
|
- export PATH=$PATH:/usr/local/go/bin/
|
|
|
|
- git fetch --tags
|
|
|
|
- echo `git describe --tags` > VERSION
|
2023-03-13 20:12:50 +00:00
|
|
|
- echo `git log -1 --format=%cd --date=format:%G-%m-%d-%H-%M` > COMMIT_DATE
|
2023-03-01 20:16:43 +00:00
|
|
|
- name: build-macos-x64
|
|
|
|
commands:
|
|
|
|
- export PATH=$PATH:/usr/local/go/bin/
|
2023-04-05 02:59:53 +00:00
|
|
|
- env EXPERIMENTS="serverExperiment" make lib.go
|
2023-03-01 20:16:43 +00:00
|
|
|
- make libCwtch.x64.dylib
|
|
|
|
- name: build-macos-arm64
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
status: [ success ]
|
|
|
|
commands:
|
|
|
|
- export PATH=$PATH:/usr/local/go/bin/
|
2023-03-18 17:59:38 +00:00
|
|
|
- make clean-autobindings
|
|
|
|
- env EXPERIMENTS="serverExperiment" make lib.go
|
2023-03-01 20:22:46 +00:00
|
|
|
- go mod download
|
2023-03-01 20:16:43 +00:00
|
|
|
- make libCwtch.arm64.dylib
|
|
|
|
- name: deploy-buildfiles
|
|
|
|
environment:
|
|
|
|
BUILDFILES_KEY:
|
|
|
|
from_secret: buildfiles_key
|
|
|
|
when:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
status: [ success ]
|
|
|
|
commands:
|
|
|
|
- echo $BUILDFILES_KEY > ~/id_rsab64
|
|
|
|
- base64 -d ~/id_rsab64 > ~/id_rsa
|
|
|
|
- chmod 400 ~/id_rsa
|
2023-03-13 20:50:14 +00:00
|
|
|
- export DIR=libCwtch-autobindings-`cat COMMIT_DATE`-`cat VERSION`
|
2023-03-01 21:53:08 +00:00
|
|
|
- mkdir -p $DIR
|
2023-03-13 20:50:14 +00:00
|
|
|
- mv build/* $DIR/
|
2023-03-01 20:16:43 +00:00
|
|
|
- cd $DIR
|
2023-03-13 20:50:14 +00:00
|
|
|
- find . -type f -exec shasum -a 512 {} \; > ./../macsha512s.txt
|
|
|
|
- mv ./../macsha512s.txt .
|
2023-03-01 20:16:43 +00:00
|
|
|
- cd ..
|
|
|
|
- scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/
|
|
|
|
|
|
|
|
trigger:
|
2023-03-01 21:45:54 +00:00
|
|
|
repo: cwtch.im/autobindings
|
2023-03-01 21:49:34 +00:00
|
|
|
branch: main
|
2023-03-01 20:16:43 +00:00
|
|
|
event:
|
|
|
|
- push
|
2023-03-18 17:59:38 +00:00
|
|
|
- pull_request
|