From 2f1fe86d502af922dd148505075fdb98c9dee8ea Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Thu, 4 Nov 2021 14:46:05 -0700 Subject: [PATCH 1/2] testing drone support for macos --- .drone.yml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5bedeb4..ef00552 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 \ No newline at end of file From 2b2adb01e3697deed6d9671a8da974e2eadda0e2 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Thu, 4 Nov 2021 15:03:25 -0700 Subject: [PATCH 2/2] test macos drone deploy --- .drone.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index ef00552..b8ffb67 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: docker -name: test-build-linux-android-windows +name: linux-android-windows-test steps: - name: fetch @@ -162,15 +162,14 @@ steps: 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 + - echo $BUILDFILES_KEY > ~/id_rsab64 + - base64 -d ~/id_rsab64 > ~/id_rsa + - chmod 400 ~/id_rsa - export DIR=libCwtch-go-macos-`cat BUILDDATE`-`cat VERSION` - mkdir $DIR - mv libCwtch.dylib $DIR/ @@ -178,7 +177,7 @@ steps: - 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/ + - scp -r -o StrictHostKeyChecking=no -i ~/id_rsa $DIR buildfiles@build.openprivacy.ca:/home/buildfiles/buildfiles/ trigger: repo: cwtch.im/libcwtch-go