Skip to content

Commit

Permalink
add circleci
Browse files Browse the repository at this point in the history
  • Loading branch information
cxjava committed Oct 24, 2019
1 parent 516b2fe commit 1c8200b
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.13
parallelism: 1
environment:
GO111MODULE: on
GORELEASER_VERSION: 0.120.2
ARIANG_VERSION: 1.1.4
UPXVER: 3.94
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run:
name: Pre install!
command: |
curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh -s -- -b $(go env GOPATH)/bin v${GORELEASER_VERSION}
wget https://github.com/mayswind/AriaNg/releases/download/${ARIANG_VERSION}/AriaNg-${ARIANG_VERSION}.zip && unzip -q AriaNg-${ARIANG_VERSION}.zip -d AriaNg
echo "Installing upx .."
curl -OL "https://github.com/upx/upx/releases/download/v${UPXVER}/upx-${UPXVER}-amd64_linux.tar.xz"
tar xvf "upx-${UPXVER}-amd64_linux.tar.xz"
cp "upx-${UPXVER}-amd64_linux/upx" "$(go env GOPATH)/bin"
ls -al
upx --version
chmod +x upx.sh
ls -al
go get -u -v github.com/UnnoTed/fileb0x
go install github.com/UnnoTed/fileb0x
- run:
name: Run build
command: |
export GO_VERSION="$(go version)"
export BUILT_BY="$(whoami)@$(hostname)"
goreleaser release --skip-validate --skip-sign --debug
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"

workflows:
version: 2
build-workflow:
jobs:
- build

0 comments on commit 1c8200b

Please sign in to comment.