testing drone support for macos
continuous-integration/drone/pr Build is running Details

This commit is contained in:
Dan Ballard 2021-11-04 14:46:05 -07:00
parent 4adb501a89
commit 2f1fe86d50
1 changed files with 53 additions and 2 deletions

View File

@ -1,7 +1,7 @@
---
kind: pipeline
type: docker
name: default
name: test-build-linux-android-windows
steps:
- name: fetch
@ -75,7 +75,7 @@ steps:
- echo $BUILDFILES_KEY > ~/id_rsab64
- base64 -d ~/id_rsab64 > ~/id_rsa
- chmod 400 ~/id_rsa
- export DIR=libCwtch-go-`cat VERSION`-`cat BUILDDATE`
- export DIR=libCwtch-go-`cat BUILDDATE`-`cat VERSION`
- mkdir $DIR
- mv libCwtch.so libCwtch.dll cwtch.aar cwtch-sources.jar libCwtch.h $DIR/
- cd $DIR
@ -135,3 +135,54 @@ trigger:
- 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
- go get
# TODO: upgrade to go1.16, remove mod/vendor, add go install for 1.16
- echo `git describe --tags` > VERSION
- echo `date +%G-%m-%d-%H-%M` > BUILDDATE
- name: build-macos
commands:
- export PATH=$PATH:/usr/local/go/bin/
- make macos
- name: deploy-buildfiles
environment:
BUILDFILES_KEY:
from_secret: buildfiles_key
secrets: [gogs_account_token]
when:
event:
- push
status: [ success ]
commands:
- echo $BUILDFILES_KEY > ~/build.id_rsab64
- base64 -d ~/build.id_rsab64 > ~/build.id_rsa
- chmod 400 ~/build.id_rsa
- export DIR=libCwtch-go-macos-`cat BUILDDATE`-`cat VERSION`
- mkdir $DIR
- mv libCwtch.dylib $DIR/
- cd $DIR
- find . -type f -exec shasum -a 512 {} \; > ./../sha512s.txt
- mv ./../sha512s.txt .
- cd ..
- scp -r -o StrictHostKeyChecking=no -i ~/build.id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/
trigger:
repo: cwtch.im/libcwtch-go
branch: trunk
event:
- push
- pull_request