mirror of
https://github.com/imgproxy/imgproxy.git
synced 2025-01-08 10:45:04 +02:00
Drop CircleCI config
This commit is contained in:
parent
4fa75122d0
commit
696e6afc57
@ -1,167 +0,0 @@
|
||||
version: 2.1
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- checkout_code
|
||||
- lint:
|
||||
requires:
|
||||
- checkout_code
|
||||
go_version: "1.16"
|
||||
vips_version: "8.10"
|
||||
- build:
|
||||
name: go<< matrix.go_version >>_vips<< matrix.vips_version >>
|
||||
requires:
|
||||
- checkout_code
|
||||
matrix:
|
||||
parameters:
|
||||
go_version: ["1.17", "1.16"] # Go 1.15 doesn't support io/fs
|
||||
vips_version: ["8.12", "8.11", "8.10"]
|
||||
|
||||
release:
|
||||
jobs:
|
||||
- checkout_code:
|
||||
filters: &release_tags_filter
|
||||
branches:
|
||||
ignore: /.*/
|
||||
tags:
|
||||
only: /^v\d+\.\d+\.\d+.*/
|
||||
- publish_github_release:
|
||||
requires:
|
||||
- checkout_code # to grab changes from CHANGELOG
|
||||
filters: *release_tags_filter
|
||||
|
||||
executors:
|
||||
imgproxy:
|
||||
docker:
|
||||
- image: "darthsim/imgproxy-circleci:latest"
|
||||
working_directory: /go/src/imgproxy
|
||||
environment:
|
||||
BASH_ENV: "/root/.bashrc"
|
||||
TEST_RESULTS: /tmp/test-results
|
||||
|
||||
commands:
|
||||
setup_vips:
|
||||
parameters:
|
||||
vips_version:
|
||||
type: string
|
||||
steps:
|
||||
- run:
|
||||
name: Setup Vips
|
||||
command: |
|
||||
echo 'LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/root/vips/<< parameters.vips_version >>/lib"' >> $BASH_ENV
|
||||
echo 'PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/root/vips/<< parameters.vips_version >>/lib/pkgconfig"' >> $BASH_ENV
|
||||
|
||||
install_go:
|
||||
parameters:
|
||||
go_version:
|
||||
type: string
|
||||
steps:
|
||||
- run:
|
||||
name: Install Go
|
||||
command: |
|
||||
gvm install go<< parameters.go_version >> -B
|
||||
gvm use go<< parameters.go_version >> --default
|
||||
echo 'export GO111MODULE=on' >> $BASH_ENV
|
||||
echo 'export GOPATH=/go' >> $BASH_ENV
|
||||
echo 'export PATH="$PATH:$(go env GOPATH)/bin"' >> $BASH_ENV
|
||||
echo 'export CGO_LDFLAGS_ALLOW="-s|-w"' >> $BASH_ENV
|
||||
- run:
|
||||
name: Install gotestsum
|
||||
command: |
|
||||
mkdir -p /usr/local/bin && \
|
||||
curl -Ls https://github.com/gotestyourself/gotestsum/releases/download/v1.6.4/gotestsum_1.6.4_linux_amd64.tar.gz | \
|
||||
tar -xzC /usr/local/bin
|
||||
|
||||
jobs:
|
||||
checkout_code:
|
||||
docker:
|
||||
- image: circleci/slim-base:latest
|
||||
working_directory: /go/src/imgproxy
|
||||
steps:
|
||||
- checkout:
|
||||
path: /go/src/imgproxy
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths: [.]
|
||||
|
||||
lint:
|
||||
executor: imgproxy
|
||||
parameters:
|
||||
vips_version:
|
||||
type: string
|
||||
go_version:
|
||||
type: string
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- setup_vips:
|
||||
vips_version: << parameters.vips_version >>
|
||||
- install_go:
|
||||
go_version: << parameters.go_version >>
|
||||
- run:
|
||||
name: Install golangci-lint
|
||||
command: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | BINARY=golangci-lint sh -s -- -b $(go env GOPATH)/bin v1.18.0
|
||||
- run:
|
||||
name: Lint imgproxy
|
||||
command: golangci-lint run
|
||||
|
||||
build:
|
||||
executor: imgproxy
|
||||
parameters:
|
||||
vips_version:
|
||||
type: string
|
||||
go_version:
|
||||
type: string
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- setup_vips:
|
||||
vips_version: << parameters.vips_version >>
|
||||
- install_go:
|
||||
go_version: << parameters.go_version >>
|
||||
- restore_cache:
|
||||
keys:
|
||||
- go-modules-{{ checksum "go.sum" }}
|
||||
- run:
|
||||
name: Build imgproxy
|
||||
command: |
|
||||
mkdir -p $TEST_RESULTS && \
|
||||
gotestsum --junitfile ${TEST_RESULTS}/gotestsum-report.xml -- ./...
|
||||
- save_cache:
|
||||
key: go-modules-{{ checksum "go.sum" }}
|
||||
paths:
|
||||
- "/go/pkg/mod"
|
||||
- store_artifacts:
|
||||
path: /tmp/test-results
|
||||
destination: raw-test-output
|
||||
- store_test_results:
|
||||
path: /tmp/test-results
|
||||
|
||||
publish_github_release:
|
||||
executor: imgproxy
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- install_go:
|
||||
go_version: "1.14"
|
||||
- run:
|
||||
name: Install github-release tool
|
||||
command: go get github.com/github-release/github-release
|
||||
- run:
|
||||
name: Upload GitHub release
|
||||
command: |
|
||||
# Extract changelog entries between this and previous version headers
|
||||
escaped_version=$(echo ${CIRCLE_TAG#v} | sed -e 's/[]\/$*.^[]/\\&/g')
|
||||
description_body=$(awk "BEGIN{inrelease=0} /## \[${escaped_version}\]/{inrelease=1;next} /## \[[0-9]+\.[0-9]+\.[0-9]+.*\]/{inrelease=0;exit} {if (inrelease) print}" CHANGELOG.md)
|
||||
# Add pre-release option if tag name has any suffix after vMAJOR.MINOR.PATCH
|
||||
[[ ${CIRCLE_TAG} =~ ^v[0-9]+\.[0-9]+\.[0-9]+.+ ]] && prerelease="--pre-release"
|
||||
# Create release!
|
||||
github-release release \
|
||||
--user ${CIRCLE_PROJECT_USERNAME} \
|
||||
--repo ${CIRCLE_PROJECT_REPONAME} \
|
||||
--tag ${CIRCLE_TAG} \
|
||||
--name ${CIRCLE_TAG} \
|
||||
--description "${description_body}" \
|
||||
$prerelease
|
Loading…
Reference in New Issue
Block a user