1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

262 lines
7.2 KiB
YAML

# CircleCI 2.0 configuration file
# Check https://circleci.com/docs/2.0/language-go/ for more details
1 year ago
version: 2.1
commands: # a reusable command with parameters
cross_compile:
parameters:
cc:
type: string
goarch:
default: ""
type: string
steps:
- run:
command: go install -a -tags sqlite_omit_load_extension ./...
environment:
CGO_ENABLED: 1
GOARCH: <<parameters.goarch>>
CC: <<parameters.cc>>
jobs:
lint:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
# Don't do a restore_cache here, so we regularly check that the Go
# modules are actually fetchable.
- checkout
- run: go version
- run: test -z "$(gofmt -l . | tee /dev/stderr)"
- run: go vet ./...
resource_class: large
cross_compile:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go get -v -t -d ./...
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/home/circleci/go/pkg/mod"
- cross_compile:
name: "Cross compile musl"
cc: musl-gcc
- cross_compile:
name: "Cross compile arm64"
cc: aarch64-linux-gnu-gcc
goarch: arm64
- cross_compile:
name: "Cross compile riscv64"
cc: riscv64-linux-gnu-gcc
goarch: riscv64
- cross_compile:
name: "Cross compile ppc64le"
cc: powerpc64le-linux-gnu-gcc
goarch: ppc64le
1 year ago
cross_compile_mips:
docker:
- image: rqlite/circleci-primary:0.0.1
1 year ago
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go get -v -t -d ./...
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/home/circleci/go/pkg/mod"
- cross_compile:
name: "Cross compile mips"
cc: mips-linux-gnu-gcc
goarch: mips
- cross_compile:
name: "Cross compile mipsel"
cc: mipsel-linux-gnu-gcc
goarch: mipsle
- cross_compile:
name: "Cross compile mips64"
cc: mips64-linux-gnuabi64-gcc
goarch: mips64
- cross_compile:
name: "Cross compile mips64el"
cc: mips64el-linux-gnuabi64-gcc
goarch: mips64le
5 years ago
test:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go get -v -t -d ./...
- save_cache:
key: go-mod-v4-{{ checksum "go.sum" }}
paths:
- "/home/circleci/go/pkg/mod"
- run: go test -failfast ./...
resource_class: large
5 years ago
race_odd:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
2 years ago
- run: go get -t -d ./...
- run:
command: go test -failfast -timeout 20m -race $(go list ./... | sed -n 'n;p')
environment:
GORACE: "halt_on_error=1"
race_even:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go get -t -d ./...
- run:
command: go test -failfast -timeout 20m -race $(go list ./... | sed -n 'p;n')
environment:
GORACE: "halt_on_error=1"
end_to_end_single:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go version
- run: go get -t -d -v ./...
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
-ldflags="-extldflags=-static" ./...
- run:
command: python3 system_test/e2e/single_node.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_joining:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go version
- run: go get -t -d -v ./...
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
-ldflags="-extldflags=-static" ./...
- run:
command: python3 system_test/e2e/joining.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_multi:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go version
- run: go get -t -d -v ./...
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
-ldflags="-extldflags=-static" ./...
- run:
command: python3 system_test/e2e/multi_node.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_multi_adv:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go version
- run: go get -t -d -v ./...
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
-ldflags="-extldflags=-static" ./...
- run:
command: python3 system_test/e2e/multi_node_adv.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
end_to_end_autoclustering:
5 years ago
docker:
- image: rqlite/circleci-primary:0.0.1
- image: consul
- image: gcr.io/etcd-development/etcd:v3.5.1
5 years ago
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go version
- run: go get -t -d -v ./...
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
-ldflags="-extldflags=-static" ./...
- run:
command: python3 system_test/e2e/auto_clustering.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
5 years ago
end_to_end_auto_state:
docker:
- image: rqlite/circleci-primary:0.0.1
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
- run: go version
- run: go get -t -d -v ./...
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
-ldflags="-extldflags=-static" ./...
- run:
command: python3 system_test/e2e/auto_state.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
5 years ago
workflows:
version: 2
build_and_test:
jobs:
- lint
- cross_compile
- cross_compile_mips
5 years ago
- test
- race_even
- race_odd
- end_to_end_single
- end_to_end_multi
- end_to_end_multi_adv
- end_to_end_joining
- end_to_end_autoclustering
- end_to_end_auto_state