Cirrus: Run with both modules enabled and disabled

pull/136/head
Jeremy Rand 3 years ago
parent ae92da7a1b
commit 981e87e4e0
No known key found for this signature in database
GPG Key ID: FD7550C2EB800711

@ -11,10 +11,30 @@ task:
- apt-get install -y libcap-dev - apt-get install -y libcap-dev
path_script: path_script:
- source testdata/move_to_gopath.bash - source testdata/move_to_gopath.bash
fetch_script: matrix:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/... - env:
- go generate github.com/namecoin/x509-compressed/... GO111MODULE: "off"
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/... fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- x509_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- cd ../
- git clone https://github.com/namecoin/x509-compressed.git
- cd x509-compressed
- go mod init
- go mod tidy
- go generate ./...
- go mod tidy
- go install -v ./...
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
lint_script: lint_script:
- cd $(go env GOPATH)/src/github.com/$CIRRUS_REPO_FULL_NAME/ - cd $(go env GOPATH)/src/github.com/$CIRRUS_REPO_FULL_NAME/
- golangci-lint run --no-config --enable-all --disable gochecknoglobals,gomnd $GOLANGCI_ARGS -v --timeout 5m --out-format json > $CIRRUS_WORKING_DIR/lint-report.json - golangci-lint run --no-config --enable-all --disable gochecknoglobals,gomnd $GOLANGCI_ARGS -v --timeout 5m --out-format json > $CIRRUS_WORKING_DIR/lint-report.json
@ -59,11 +79,38 @@ task:
- apt-get install -y libcap-dev - apt-get install -y libcap-dev
path_script: path_script:
- source testdata/move_to_gopath.bash - source testdata/move_to_gopath.bash
fetch_script: matrix:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/... - env:
- go generate github.com/namecoin/x509-compressed/... GO111MODULE: "off"
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/... fetch_script:
test_script: go test -tags "$GOX_TAGS" -v github.com/$CIRRUS_REPO_FULL_NAME/... - go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- x509_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- cd ../
- git clone https://github.com/namecoin/x509-compressed.git
- cd x509-compressed
- go mod init
- go mod tidy
- go generate ./...
- go mod tidy
- go install -v ./...
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
# Get the test suite
- mkdir -p $(go env GOPATH)/src/github.com/hlandau
- cd $(go env GOPATH)/src/github.com/hlandau
- git clone https://github.com/hlandau/nctestsuite.git
test_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go install -tags "$GOX_TAGS" -v ./...
- go test -tags "$GOX_TAGS" -v github.com/$CIRRUS_REPO_FULL_NAME/...
env: env:
GOX_TAGS: "" GOX_TAGS: ""
GO_VERSION: latest GO_VERSION: latest
@ -86,17 +133,37 @@ task:
- go get github.com/mitchellh/gox - go get github.com/mitchellh/gox
path_script: path_script:
- source testdata/move_to_gopath.bash - source testdata/move_to_gopath.bash
fetch_script: matrix:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/... - env:
- GOOS=windows GOARCH=amd64 go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/... GO111MODULE: "off"
- go generate github.com/namecoin/x509-compressed/... fetch_script:
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/... - go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- GOOS=windows go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- go generate github.com/namecoin/x509-compressed/...
- go get -tags "$GOX_TAGS" -d -v -t github.com/$CIRRUS_REPO_FULL_NAME/...
- x509_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- cd ../
- git clone https://github.com/namecoin/x509-compressed.git
- cd x509-compressed
- go mod init
- go mod tidy
- go generate ./...
- go mod tidy
- go install -v ./...
fetch_script:
- cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- go mod init
- go mod tidy
- go mod edit -replace github.com/namecoin/x509-compressed=../x509-compressed
- go mod tidy
build_script: build_script:
- rm -rf idist - rm -rf idist
- CGO_ENABLED=1 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" github.com/$CIRRUS_REPO_FULL_NAME/... - cd $(go env GOPATH)/src/github.com/"$CIRRUS_REPO_FULL_NAME"
- CGO_ENABLED=0 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'darwin/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/ppc64 openbsd/386 openbsd/amd64 netbsd/386 netbsd/amd64 netbsd/arm dragonfly/amd64 solaris/amd64 windows/386 windows/amd64' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" github.com/$CIRRUS_REPO_FULL_NAME/... - CGO_ENABLED=1 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'linux/386 linux/amd64 linux/arm linux/arm64 linux/ppc64le' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" ./...
- mv $GOPATH/releasing/idist ./idist - CGO_ENABLED=0 gox -tags="$GOX_TAGS" -parallel=8 -osarch 'darwin/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/ppc64 openbsd/386 openbsd/amd64 netbsd/386 netbsd/amd64 netbsd/arm dragonfly/amd64 solaris/amd64 windows/386 windows/amd64' -output "$GOPATH/releasing/idist/$CIRRUS_REPO_NAME-$CIRRUS_TAG-{{.OS}}_{{.Arch}}/bin/{{.Dir}}" ./...
dist_script: dist_script:
- mv $GOPATH/releasing/idist ./idist
- bash "testdata/dist.bash" - bash "testdata/dist.bash"
binaries_artifacts: binaries_artifacts:
path: "dist/*" path: "dist/*"

Loading…
Cancel
Save