2019-01-25 00:09:42 +08:00
|
|
|
---
|
2017-05-16 14:07:07 +08:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
build:
|
|
|
|
machine: true
|
|
|
|
|
2019-07-29 01:47:38 +08:00
|
|
|
working_directory: ~/.go_workspace/src/github.com/rclone/rclone
|
2017-05-16 14:07:07 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Cross-compile rclone
|
|
|
|
command: |
|
2019-01-18 19:59:36 +08:00
|
|
|
docker pull rclone/xgo-cgofuse
|
2017-05-16 14:07:07 +08:00
|
|
|
go get -v github.com/karalabe/xgo
|
|
|
|
xgo \
|
2019-01-18 19:59:36 +08:00
|
|
|
--image=rclone/xgo-cgofuse \
|
2017-05-16 14:07:07 +08:00
|
|
|
--targets=darwin/386,darwin/amd64,linux/386,linux/amd64,windows/386,windows/amd64 \
|
2017-05-19 22:46:13 +08:00
|
|
|
-tags cmount \
|
2017-05-16 14:07:07 +08:00
|
|
|
.
|
2017-10-11 20:40:02 +08:00
|
|
|
xgo \
|
|
|
|
--targets=android/*,ios/* \
|
|
|
|
.
|
2017-05-16 14:07:07 +08:00
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Prepare artifacts
|
|
|
|
command: |
|
|
|
|
mkdir -p /tmp/rclone.dist
|
|
|
|
cp -R rclone-* /tmp/rclone.dist
|
2019-01-15 19:46:39 +08:00
|
|
|
mkdir build
|
|
|
|
cp -R rclone-* build/
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build rclone
|
|
|
|
command: |
|
|
|
|
go version
|
|
|
|
go build
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Upload artifacts
|
|
|
|
command: |
|
2019-01-25 00:09:42 +08:00
|
|
|
if [[ $CIRCLE_PULL_REQUEST != "" ]]; then
|
|
|
|
make circleci_upload
|
|
|
|
fi
|
2017-05-16 14:07:07 +08:00
|
|
|
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/rclone.dist
|